feat(dashboard): adopt entity chips on runs/inbox/activity/sessions + run→inbox provenance#747
Merged
Merged
Conversation
… run→inbox provenance Phase 2b follow-through to PR #746. The structural RelationStrips + low-risk chip swaps shipped earlier; this PR pushes chips into the spine pages where they have the highest payoff: runs list/detail, inbox header, activity rows, sessions cards/detail strip, recipe detail panel, traces, overview thread. - /runs list: recipe cell now RecipeChip linking to /recipes/<key>; row click still expands; mobile card mirrored. formatRecipeName retained for aria. - /runs/[seq]: H1 → RecipeChip(link); step rows render ToolChip when step.tool is present (agent steps stay plain text); CausalChainCard parent/child rows use RunChip + RecipeChip; added "Delivered to inbox" strip backed by run.inboxOutputs (bridge already writes it). Plumbed inboxOutputs onto the local RunDetail type. - /inbox: rendered Produced-by header using selected.provenance (PR #742 frontmatter) — RecipeChip + RunChip. Suppressed legacy "Local agent" fallback when provenance absent. Replay/View-trace action now prefers provenance.recipe over filename guess. - /activity: rows render RecipeChip, ToolChip, ApprovalChip, SessionChip inline. Dropped deceptive cursor:pointer on rows (no row handler). Surfaced callId + full sessionId from metadata. - /sessions list: card converted from <button> to role=button div so inner Links nest legally. ToolChip on first-tool, drill-down Links on tool/file/pending metrics (?session=<id> scoping). Removed the recipe/description mislabel — was rendering firstTool as "recipe". - /sessions/[id]: RelationStrip Activity/Approvals targets now ?session=<id> scoped; added Approvals chip to the strip. - /recipes detail panel: Recent runs row uses RunChip when seq present. Added seq?: number to RunRecord — bridge /runs already returns it. - /traces: kept the existing expand button; added RecipeChip(link) next to the recipe-name button (option a — least invasive). Approval rows also get ApprovalChip linking /approvals/[callId]. - Overview ActivityThread: rows render RecipeChip + ToolChip inline; the chips are the click target, not the row. Type-check: clean (npx tsc --noEmit on dashboard). No EntityTimeline / Breadcrumb / terminology sweep — those stay deferred. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
68975bc to
9e213b4
Compare
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.
Summary
Phase 2b follow-through to PR #746. The earlier PR shipped the structural
additions (RelationStrips, low-risk chip swaps) but deferred the higher-payoff
adoptions on the journey spine. This PR pushes them through.
Per numbered item from the task:
RecipeChip(variant="row")linking to/recipes/<key>viacanonicalRecipeKey. Row click still toggles expand; chip usesstopPropagation. Same swap on the mobile run-card head.RecipeChip(variant="link"). Per-step rows renderToolChipwhenstep.toolis set; agent steps stay plain text.CausalChainCardrebuilt aroundRunChip+RecipeChip. Session-id-on-run: not present in the run record on the bridge side (RecipeRunhas nosessionIdfield insrc/runLog.ts), so the SessionChip in the header is a no-op for now — documented in the commit and left as a follow-up if the bridge starts populating it.provenanceis returned by/inboxand/inbox/[filename]insrc/inboxRoutes.ts(PR feat(bridge): inbox provenance + run→inbox + approval→run linkage data model #742). Whenselected.provenanceis set: "Produced by<RecipeChip />· run<RunChip />". When unset: header strip suppressed AND the legacy "Local agent" sender label is dropped (silence beats a generic guess). The action-row recipe-name guess now prefersprovenance.recipeand falls back toinboxItemKey()only when provenance is missing.cursor:pointer(no row handler existed). Recipe →RecipeChip(row), tool →ToolChip(row), approval-decision →ApprovalChip(row), lifecycle-with-sessionId →SessionChip(row). SurfacedcallIdand fullsessionIdfrom metadata for the chips.<button>torole="button" divso nested<a>Links are legal. Mislabel "recipe" (it wasfirstTool) fixed to "First tool" rendered withToolChip. Tool/Files/Pending stats are now drill-down Links to/activity?session=,/sessions/[id],/approvals?session=respectively. On detail page,RelationStripActivity + Approvals items now session-scoped.RunRecordgainsseq?: number(bridge/runsalready returns it). When present, rows renderRunChip(row)linking/runs/[seq]; fallback toStatusPillkeeps older data working.RecipeChip(link)next to it. Approval-trace rows additionally renderApprovalChip(link)whenbody.callIdis present.RecipeChip(row), tool kind →ToolChip(row). Chip is the click target; row is no longer a link.inboxOutputs?: Array<{filename, deliveredAt}>to the localRunDetailtype (bridge already writes it viaRecipeRun.inboxOutputs) and rendered a "Delivered to inbox" card withInboxChipper filename, sitting betweenCausalChainCardand the steps panel.Test plan
npx tsc --noEmitindashboard/(✅ verified locally, clean exit)/runs: recipe cell links to/recipes/<name>, row click still expands, "Open full run →" still in drawer/runs/[seq]: H1 chip-links to recipe; step rows show ToolChip; CausalChainCard parent/child are clickable RunChips; runs with inbox outputs show the "Delivered to inbox" strip/inbox: pick an item produced by a recent recipe run (frontmatter present) and confirm the "Produced by … · run #N" header; pick an older file without frontmatter and confirm header is suppressed/activity: rows no longer show pointer cursor; click recipe/tool/approval chip lands on the right page/sessions: card stat numbers are Links to the session-scoped variant pages; first-tool renders as a ToolChip/sessions/[id]: Activity/Approvals strip targets are?session=<id>/recipesdetail panel: recent runs are clickable RunChips/traces: recipe-name button still expands the row; the small RecipeChip next to it lands on/recipes/<name>/: ActivityThread rows show inline chips; row containers are not links🤖 Generated with Claude Code