Repository navigation
Show where a research child came from - #381
Conversation
|
Hold — please don't merge yet. Adds a new read route; an authorization-focused review is in progress. I'll post the verdict here. 🤖 Generated with Claude Code |
|
Review: Looks good I checked the code and ran it on a fake-GitHub server with the seeded parent and research child. I took screenshots at desktop 1440×900 and phone 390×844. Security (new
Tests
UX
CI. |
ffcd97c to
8eca419
Compare
|
Thanks for the review. Follow-ups are in ffcd97c (rebased onto main as 8eca419):
Rebasing resolved a conflict with main's new |
|
Hold lifted. |
A research child now opens with a quiet provenance line naming its parent, who started it and its source count, with the brief one click away. The parent name returns to the research card that produced it. The child's Chat starts in the parent's open or closed state and explains itself when empty. The server exposes a read-only provenance route for a child. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Verify the parent shares the child's repository node ID before returning provenance, cover the route's success and denial cases, drop the unused start time, keep each meta segment on one line, balance the empty Chat line, and use spacing tokens for the provenance styles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8eca419 to
84a80b1
Compare
Why
A research child had no provenance. It opened with Chat collapsed even when the parent had Chat open, its Chat was a blank pane with no explanation, and nothing said where the report came from or linked back to the card that produced it.
What changed
GET /api/channels/:childId/research-provenancereturns the brief, source count, starter handle and request id for a published child, via a newresearch.findPublished(parentId, childId)storage lookup (memory + PostgreSQL, covered by the shared publication contract). A child without a research request gets 404 and shows no line.PlanEditorgains a host-ownedprefaceslot in the prose column; when it changes height it announces a scroll so comment markers re-measure.No child research, Background Work, tasks, grandchildren, or research-workspace threads are introduced.
Screenshots
Before, desktop: parent with Chat open → child opens with Chat collapsed, no provenance


After, desktop: Chat inherited, empty-state line, provenance with brief open


After, desktop: the parent link returns to the focused research card

Before / after, phone



Testing
bun run types— passbun test --timeout 30000 apps/web packages/editor apps/server/src/research— 1070 pass, 1 fail:placement-close.test.tstimes out identically onmain(pre-existing, unrelated)bun test apps/server/src/storage— pass (includes the newfindPublishedcontract assertions)bun run ci— fails only on the design-contract exceptions belowresearch-child-surface.e2e.ts(child Chat now inherits the parent's open state) andresearch-child-recovery.e2e.ts(new provenance, brief, empty Chat and return-to-card assertions). Local E2E is suspended for this run; relying on CI's browser-integration job.Needs a design-contract review
bun run cireports reviewed dynamic owners changed (no new style or class logic; only props/data flow moved):apps/web/src/document-workspace-host.tsx(scripts/design-contract/exceptions/dynamic-web.json): the childworkspaceProps(...)case now includes theparentprovenance object; the old exact case is stale.apps/web/src/workspace.tsxlines 150/161/179/188/385 (dynamic-web.json): owner hash changed becauseinitialWorkspaceStatelost its unused profile argument.packages/editor/src/plan-editor.tsxlines 356/367 (dynamic-editor.json): owner hash changed because of the newprefaceprop and its resize effect.🤖 Generated with Claude Code