Sidebar: per-call harness URLs + child-row status glyphs (0046 follow-up) #120

Merged
chad merged 6 commits from glen/sidebar-harness-session-rows into main 2026-10-17 13:01:19 -04:00
Collaborator

Fixes two regressions from #119 and finishes the tree's "what it did" view.

Bugs

  • Multi-select: every harness call row linked to /h/<harness>/<conversation>, so all calls of one harness in a chat shared a URL and highlighted together. Each call now has its own page, /h/<harness>/<conversation>/<callId>, which shows only events from the call's window (createdAt…settledAt, live while running; getHarnessEvents fromAt/toAt, API ?from=&to=). The session page and legacy redirect are unchanged. Per-call links (wake, child-status card, inspect, harness-call start) point at the call page.
  • Checkmark flood: completed rows no longer show ✓.

Child-row glyphs (lib/child-glyph.ts, pure; components/sidebar/child-glyph.tsx)

Row Running Done Failed Cancelled
Harness call spinner harness mark (muted) ✕ ⊘
Child thread spinner Bot (muted); ⚠ if last turn ran out of steps — —
Historical run unchanged none ✕ ⊘

Exhausted comes from one batched query over the newest assistant row of each child (SidebarItem.threadStatus).

Known gaps (follow-ups)

  • Cancelled/crashed child threads aren't persisted, so they show the done mark. Fixing that needs e.g. conversations.cancelled_at.
  • The per-call page 404s if the harness run row is missing, and only polls while the session's latest run of that harness is live.

Checks: tsc clean; lint 0 errors; vitest 746 passed / 1 failed. The failure is x-chat "orphaned pendings…", which is flaky and also fails on main. No fresh-eyes review thread was run, per your request.

Fixes two regressions from #119 and finishes the tree's "what it did" view. **Bugs** - **Multi-select:** every harness call row linked to `/h/<harness>/<conversation>`, so all calls of one harness in a chat shared a URL and highlighted together. Each call now has its own page, `/h/<harness>/<conversation>/<callId>`, which shows only events from the call's window (createdAt…settledAt, live while running; `getHarnessEvents` `fromAt`/`toAt`, API `?from=&to=`). The session page and legacy redirect are unchanged. Per-call links (wake, child-status card, inspect, harness-call start) point at the call page. - **Checkmark flood:** completed rows no longer show ✓. **Child-row glyphs** (`lib/child-glyph.ts`, pure; `components/sidebar/child-glyph.tsx`) | Row | Running | Done | Failed | Cancelled | |---|---|---|---|---| | Harness call | spinner | harness mark (muted) | ✕ | ⊘ | | Child thread | spinner | `Bot` (muted); ⚠ if last turn ran out of steps | — | — | | Historical run | unchanged | none | ✕ | ⊘ | Exhausted comes from one batched query over the newest assistant row of each child (`SidebarItem.threadStatus`). **Known gaps (follow-ups)** - Cancelled/crashed child threads aren't persisted, so they show the done mark. Fixing that needs e.g. `conversations.cancelled_at`. - The per-call page 404s if the harness run row is missing, and only polls while the session's latest run of that harness is live. **Checks:** tsc clean; lint 0 errors; vitest 746 passed / 1 failed. The failure is `x-chat` "orphaned pendings…", which is flaky and also fails on main. No fresh-eyes review thread was run, per your request.
chad merged commit ae2874a2fa into main 2026-10-17 13:01:19 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
chad/sweatshop-legacy!120
No description provided.