feat(desktop): what waits in the Inbox carries each item's agent and question

Merged
DA
6d ago
+90-14

Summary

  • Factory v1, PR 1 of 3. Main's account-wide Inbox read already holds each open item's agent, title, and posting instant (account-inbox-wire.ts); the app-state slice it writes (inbox.waiting) kept only each item's id. Each waiting item now carries { id, agentId, title, postedAt }, so the Factory tab (PR 3) can name each question and the agent stalled on it from main's one read, with no read per plan and no server work.
  • The toast's withdrawal reads the ids off the items; the sidebar count is unchanged.
  • waitingOf joins #testing/plans-control as the shared builder for a waiting item (two callers here, the Factory model's tests next).
  • Builds on the Inbox, which stays; Chat is separate.

Evidence

  • Platform-independent checks: pnpm check:affected exit 0 (typecheck, lint, 470 desktop tests); ./scripts/check.sh exit 0.
  • New test what waits carries each open item's agent, what it asks, and when it was posted… in agent-notices.test.ts; it fails on main's agent-notices.ts and passes here.
  • macOS Electron verification (./scripts/verify.sh): not run — no UI changes; nothing drawn differs.

Visual evidence

  • Fixture screenshots inspected: not attached (no UI change).

Physical-device evidence

  • Screenshot or screen recording: not attached
  • Device/display configuration: not recorded

Invariants

  • ./scripts/check.sh green; renderer/UI PRs also ./scripts/verify.sh with evidence inspected. (CI) — not a UI change.
  • JSON Schema goldens unchanged (LUKE_UPDATE_FIXTURES not run, or diff explained line by line). (CI)
  • Every behavior change has, in this PR, the test that fails without it; no change-detector test added. (manual; root AGENTS.md "Testing")
  • Gateway envelope goldens unchanged. (CI)
  • No new as type assertion outside the allowlisted files. (CI via anti-slop)
  • No Effect.runPromise/runSync/runFork outside the runtime edges and the shims tools/oxlint/anti-slop/effect-edges.json records. (CI via anti-slop/no-run-promise-outside-edges)
  • No new setTimeout/setInterval/new Promise/AbortController/fs.watch outside the files tools/oxlint/anti-slop/effect-edges.json records. (CI via anti-slop/no-raw-async-primitives)
  • No Effect, Stream, or Layer written as a statement and dropped; a description a caller walks past runs nothing. (CI via pnpm discarded-effect)
  • Test count equals the pre-PR count or the delta is listed. (manual: vitest run --reporter=json) — +1 desktop test.
  • Each hand-rolled file the PR replaces is deleted, or the part that remains is a permanent adaptor named in root AGENTS.md's "The permanent adaptors" with the reason it stays.
  • Every CLAUDE.md/AGENTS.md sentence naming a changed part is edited; root pair stays byte-identical. (CI for pair existence; manual for wording) — none names the slice.
  • PRIVACY.md unchanged, or the change is a product decision called out in the PR body.
  • Package package.json deps match what the sources import by bare specifier; effect via catalog:. (CI)
  • Barrel/door rule: no Node-reaching Effect module (@effect/platform-node, effect/sql) behind a barrel the renderer or a web function opens. (CI: existing renderer node: grep plus a new grep for those specifiers in renderer bundles)

Notes

  • Blockers or follow-up verification: None. Next: the Factory model (stacked on this), then the view, which ships behind the Experimental flag.

🤖 Generated with Claude Code


Open workspace in Conductor


Devin Review


Summary by cubic

The Inbox waiting slice now carries each item's agent, question, and posting time alongside its id, so the Factory tab can name what each agent is stalled on from main's single account-wide read without per-plan reads.

  • inbox.waiting items are now { id, agentId, title, postedAt } instead of bare ids; the sidebar count and toast withdrawal behavior are unchanged.
  • waitingOf in #testing/plans-control is the shared test builder for a waiting item.
  • Adds a test asserting one account-wide read groups waiting items by plan with each item's full detail.