Repository navigation
Description
Problem
J5's platform messages that wait behind a running turn showed up in upstream's "Up next" queue as raw text: a Captain saw a <j5_seat_finished> … </j5_seat_finished> block with its participant and thread ids, and Edit offered to load it into the composer. The queue's only J5 seam (FORK.md case 24, formatJ5QueuedDelivery) reads A2A messages and nothing else.
Every system-authored J5 message can queue this way: seat finished (CrewSeatFinishNotifier), Crew gate, launch and context notices (CrewProposalService, CrewLaunchReporter, CrewDeliveryContext), Playbook steps for a seat (PlaybookCrewRelay), native-question links (NativeQuestionNotifier, always queue_after_active), and delivery notices (DeliveryTransport).
Immediate fix (follows upstream)
Upstream never shows its own platform messages in the queue: getUserQueuedThreadRuns (packages/client-runtime/src/state/threadWorkflows.ts) drops queued runs whose message is a notification or a delegated completion. They still run in order and appear in the timeline when their turn starts. The immediate fix adds J5's system-authored messages to that filter, on web and mobile, and in the queued count. A2A messages still show as From <sender>: <first line>.
What that costs: the person can't see that a Captain has a backlog of seat notices waiting, and can't steer one in early or remove it.
Come back to
- Show each queued message the way its timeline row shows it, in a ghosted (not yet sent) style, instead of hiding platform messages or flattening A2A messages to one line. The rows rely on
TimelineRowCtxdata (participant labels, sender threads), and case 24 currently says not to embed another renderer in the queue, so this needs a design decision. - A person's Inbox reply still queues as raw text: the
[Message from … (human:…)]header plus the instruction footer meant for the agent. The queue formatter only reads agent envelopes. - Edit should not be offered for a message the person did not write.
- Mobile's queue (
apps/mobile/src/features/threads/ThreadQueueControl.tsx) uses the same derivation and formatter, so it needs the same decision.
Possible give-back
Upstream hides its notifications and delegated completions from the queue entirely, so a person can't see or act on them while they wait. A queue that shows non-person messages as ghosted timeline rows might be worth offering. Whether upstream has a direct problem here (rather than a design choice) is for the give-back validation; it is listed in #276.
Activity