feat(web,desktop): an agent's questions badge and notify only the account that started it (workspace clarity D14)
D14 of the workspace clarity plan (docs/proposals/workspace-clarity.md, decision 14, approved by Dean with option A): tell only an agent's starter.
Before this, every member of a shared workspace was told about every member's coding agents. Each was badged on the Dock, counted in the sidebar's Inbox, and sent a notification or toast for each question. An agent runs on its starter's keys and Mac, and asks its starter, so only the starter is told now.
- The account's Inbox read (
account-inbox-wire.ts'saccountInboxEntrySchema) carriesstartedBy, the account id of the agent's starter (coding_agent.user_id). It is an optional key, so an older service still decodes. - Items of agents with no plan (#2745's
planless) carrystartedBytoo and are filtered the same way. agent-notices.tskeeps only the items of agents the signed-in account started (startedBy). Those are the ones written as waiting, which the sidebar and the switcher count, badged on the Dock, and announced.- Every plan holding any member's item is still listed for the Inbox, so a teammate's question is there to read and answer.
- An item whose starter the service doesn't say, or an account stored with no id, counts as the account's own, as every item did before.
compose-desktop.tshands the notices the signed-in account's id beside its email key.PRIVACY.mdsays the read now carries who started the agent, and that only your own agents' items are counted and announced.
Tests
Each fails without this change:
agent-notices.test.ts, "only the items of agents the account started wait on it". A teammate's agent's items are neither written as waiting, badged, nor announced, even a new one, while its plan is still listed for the Inbox.agent-notices.test.ts, "an item whose starter the service does not say waits on the account". This is the compatibility case.apps/web/tests/inbox-store.test.ts: a teammate's account read names the agent's starter.
The JSON Schema goldens for the account Inbox read were re-recorded with LUKE_UPDATE_FIXTURES=1; the diff adds the startedBy property.
Evidence
CI covers the logic. Dock badges and macOS notifications can't be verified here (Linux, no Mac), and CI builds nothing for the Mac.
š¤ Generated with Claude Code