Repository navigation
Publish completed investigations as child documents - #506
Merged
Merged
Conversation
MaggieAppleton
force-pushed
the
design-investigate-child-doc
branch
from
October 12, 2026 09:05
7024941 to
d55c5d1
Compare
MaggieAppleton
added this pull request to stack #509
October 12, 2026 09:17
MaggieAppleton
force-pushed
the
design-investigate-child-doc
branch
from
October 12, 2026 09:44
0b03c8e to
c107477
Compare
Collaborator
Author
|
Review: Looks good (one authority gap worth fixing before merge, rest are follow-ups) Checked against the base (#500) in a local build on a fake-GitHub server. I paired a connector, ran Storage and publication: correct
Result → document: safe
Authorization
Smaller follow-ups
UI
CISee the orchestrator report. The container job passes. Validation and e2e were running when I posted this. |
Completion now promotes the candidate and creates a research-shaped child in one fenced commit: the report, an Experiment embed per view, method, limitations and evidence. The record links the child (child_channel_id), the inline card becomes a compact link to it, and the child's embeds read the parent's record by id so selections and decisions stay shared. Reports may no longer embed Investigation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Other tests publish the same fixture into one repository, so a child's title may gain a suffix. The second proposal anchors on its own passage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The navigation-shell.tsx dynamic owner's class data flow (sidebarMotion and sidebarPresence classNames) is unchanged; only the child navigation callbacks now take Pick<Research.ReadyChild, "slug">. Maggie approved renewing it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A child's evidence decisions belong to the parent's record. The record now reports when its owning document is locked so the child disables Record decision. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…parent Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Evidence headings use interface type instead of prose sizes, decisions sit in an inset row with a ghost action, and the filter uses the shared field styling. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaggieAppleton
force-pushed
the
design-investigate-child-doc
branch
from
October 12, 2026 10:19
486b923 to
7d33396
Compare
This was referenced Oct 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Slice 3 of
/investigate(stacked on #500). A completed investigation is now published as a research-shaped child document, and its inline card becomes a compact link to it instead of rendering the long result inline.What changes
complete_experimentpromotes the candidate and creates the child channel in one fenced commit (ExperimentStore.publish, memory + PostgreSQL). The child id is deterministic per investigation; a repeated or concurrent completion returns the same child. The card can never link a child that is not persisted.childIdon the investigation record plus a uniqueexperiments.child_channel_idcolumn (migration019_investigation_children, FK likeresearch_workspaces.published_channel_id).apps/server/src/experiments/document.ts) — title from the report's#heading (else the brief), the report MDX,## Viewswith one<Experiment>embed per view,## Method,## Limitations, and as much raw evidence as fits the 256 KB source limit. Validated with the dialect + Lexical round trip at submit time, so completion cannot fail on content.experiment:changedis broadcast to both rooms, so selections stay one shared state.Investigation · 1 view, the child title and first report paragraph; the whole card opens the child (research ready-card pattern). Recorded decisions from Propose investigations from the slash menu as inline cards #500 stay on the card above the open control.Investigation from <parent> · by … · N views, Brief toggle, return to card). No/investigatein children (V1 rule, follows research). Record decision moved onto each embed; Insert view in document is gone (views are already in the child).Investigation(or any record-backed component); checked in the connector route and again in the document builder.Screenshots
Ready card (with a decision recorded from the child):
Child document (desktop) and its embedded view with Record decision:
Phone:
Tests
document.test.ts— conversion round-trips the dialect, inert markup, tight lists, evidence clipped under the source limit, protected components refused.published()lookup, stale publish returns the existing record.routes.test.ts— child reachable from the child id, list, provenance, idempotent complete, smuggled<Investigation>refused.card.test.tsx— compact ready card, no inline result, decisions on the card.experiments.e2e.ts— completed card → open child, shared selections and Record decision in the child, survives disconnect. Local e2e couldn't run (ports held by the slice-2 agent); relying on CI.Notes
Review fixes
lockedwhen their owning document is locked, so the child disables Record decision. Route test covers both refusals.still published by an investigation) in both adapters, mirroring research; contract test on memory and PostgreSQL. PostgreSQLpublished()joins the parent channel, like memory.investigationSchemais strict, so rolling back past019_investigation_childrencannot decode completed rows that carrychildId; strip the field (and the column) before downgrading..plan-evidencereset over prose sizes); the embed usesborder-edge; the filter uses the sharedfieldstyling; Record decision and a ghost Remove evidence from document share one row; recorded decisions are a quiet inset row with a ghost Insert decision evidence in document.Before → after (ready card, child view):
Follow-up (not in this PR): on a phone the bar chart opens at 1:1 and is cropped until fit is chosen; that is
packages/diagramsbehaviour, not the view component. The table is a contained horizontal scroll lane, and the chart toolbar no longer wraps.Design-contract review
Renewed (Maggie approved for this pass) in a dedicated commit:
apps/web/src/navigation-shell.tsxdynamic owner. Its class data flow (sidebarMotion.className,sidebarPresence.className) is unchanged; only the child navigation callbacks now takePick<Research.ReadyChild, "slug">so investigation children reuse research child navigation. #507 also renews this file; whichever lands second rebases.🤖 Generated with Claude Code