feat(panel,host): the windows' inbox reads become pushed follows, and the held inbox reads are retired

Merged
CH
5d ago
+727-1147

The window's inbox reads become pushed follows, and the held inbox reads are retired. This is stacked on #3264.

What changes

  • Panel: the Inbox tab, the Inbox page, Home and Factory hold one codingAgents.inboxFollow stream per plan or agent they show (use-followed-inboxes.ts). Each holds the items as each change arrives.
    • There's no read loop or cursor any more.
    • "Mark all read" no longer re-reads, because each change carries the reader's own read markers.
  • Currency: a plan counts as current once its pushed items are as new as main's word of it. So a link to a brand-new item waits for it rather than saying "Not found".
  • Retired: the held reads codingAgents.inbox and codingAgents.agentInbox are removed, together with their act-port kinds and procedures, Gateway methods, host calls, and parameter schemas.

Tests

  • testing/followed-inboxes.ts stands in for the host's inbox streams.
  • Rewritten on it: use-inbox-items.test.ts, the inbox tests in desktop-inbox, desktop-home, desktop-factory, person-page, inbox-link-chips, inbox-side-panel, read-failure, desktop-tasks and composer-drafts, and use-inbox-read-marks.
  • Tests of behaviour that no longer exists were dropped, such as an older read being overtaken or held reads diverging.

To check by hand

  1. Open a plan's Inbox tab. Its items show. Answer one, and the card updates.
  2. Have an agent post an item. Within about a second, it shows in the Inbox tab, the Inbox page, Home and Factory, without reopening anything.
  3. Click a notification for a new item. The Inbox opens on it, with no "Not found".