Skip to content

feat(dashboard): adopt entity chips on runs/inbox/activity/sessions + run→inbox provenance#747

Merged
Oolab-labs merged 1 commit into
mainfrom
feat/chip-adoption-followup
May 20, 2026
Merged

feat(dashboard): adopt entity chips on runs/inbox/activity/sessions + run→inbox provenance#747
Oolab-labs merged 1 commit into
mainfrom
feat/chip-adoption-followup

Conversation

@kungfuk3nnyyy
Copy link
Copy Markdown
Collaborator

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:

  1. /runs list — recipe cell now RecipeChip(variant="row") linking to /recipes/<key> via canonicalRecipeKey. Row click still toggles expand; chip uses stopPropagation. Same swap on the mobile run-card head.
  2. /runs/[seq] detail — H1 → RecipeChip(variant="link"). Per-step rows render ToolChip when step.tool is set; agent steps stay plain text. CausalChainCard rebuilt around RunChip + RecipeChip. Session-id-on-run: not present in the run record on the bridge side (RecipeRun has no sessionId field in src/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.
  3. /inbox provenance header — confirmed provenance is returned by /inbox and /inbox/[filename] in src/inboxRoutes.ts (PR feat(bridge): inbox provenance + run→inbox + approval→run linkage data model #742). When selected.provenance is 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 prefers provenance.recipe and falls back to inboxItemKey() only when provenance is missing.
  4. /activity rows — removed deceptive cursor:pointer (no row handler existed). Recipe → RecipeChip(row), tool → ToolChip(row), approval-decision → ApprovalChip(row), lifecycle-with-sessionId → SessionChip(row). Surfaced callId and full sessionId from metadata for the chips.
  5. /sessions list + /sessions/[id] — Session card converted from <button> to role="button" div so nested <a> Links are legal. Mislabel "recipe" (it was firstTool) fixed to "First tool" rendered with ToolChip. Tool/Files/Pending stats are now drill-down Links to /activity?session=, /sessions/[id], /approvals?session= respectively. On detail page, RelationStrip Activity + Approvals items now session-scoped.
  6. /recipes detail panel "Recent runs"RunRecord gains seq?: number (bridge /runs already returns it). When present, rows render RunChip(row) linking /runs/[seq]; fallback to StatusPill keeps older data working.
  7. /traces recipe column — picked option (a): kept the existing expand button + added a RecipeChip(link) next to it. Approval-trace rows additionally render ApprovalChip(link) when body.callId is present.
  8. Overview ActivityThread — recipe → RecipeChip(row), tool kind → ToolChip(row). Chip is the click target; row is no longer a link.
  9. Run-detail "Output → Inbox" — added inboxOutputs?: Array<{filename, deliveredAt}> to the local RunDetail type (bridge already writes it via RecipeRun.inboxOutputs) and rendered a "Delivered to inbox" card with InboxChip per filename, sitting between CausalChainCard and the steps panel.

Test plan

  • Type-check: npx tsc --noEmit in dashboard/ (✅ verified locally, clean exit)
  • Visual walkthrough — dev server not running in this agent's sandbox, so the walkthrough below is the recommended manual verification:
    • /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>
    • /recipes detail 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

… 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>
@kungfuk3nnyyy kungfuk3nnyyy force-pushed the feat/chip-adoption-followup branch from 68975bc to 9e213b4 Compare May 20, 2026 11:43
@Oolab-labs Oolab-labs merged commit 8352244 into main May 20, 2026
18 checks passed
@Oolab-labs Oolab-labs deleted the feat/chip-adoption-followup branch May 20, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants