Repository navigation
Description
Context
Part of #3150. Found while picking up #3155.
#3154 records each read_attachment call's outcome and scope in attachment_reads (migration 078). The decision record says it "drives #3155's sent-row status and never reaches a provider" (docs/decisions/chat-attachments.md, "What #3154 built"). Nothing delivers it to a client:
listAttachmentReads(packages/ui-server/src/attachments/store.ts:225-235) and the draft store'sattachmentReads(sessionId)(packages/ui-server/src/drafts/store.ts:845-847, re-exported atpackages/ui-server/src/drafts/writes.ts:41) have no caller in any route, WebSocket frame or history replay.- The SDK has the outcome vocabulary (
AttachmentReadOutcome,packages/ui-sdk/src/tool-contracts/attachment.ts:26) but no client-facing shape for a recorded read.
#3155's acceptance criteria require sent rows to keep "not read yet, successful read of a stated scope, partial/truncated read, unavailable reader and failed content read" distinct, from the design's sent-row table (docs/plans/chat-attachments.md §8.4). Without this, a sent row can show only name, kind and size, and must not claim a read state.
Out of scope
The sent-row rendering and copy (#3155). The reader, its bounds and what it records (#3154). Anything that enters provider history: reads stay UI evidence only (provider history).
Scope
An additive, authorized way for a client to get the recorded reads of the session it is viewing, and to learn of a new read without a reload.
Acceptance criteria
- A client viewing a session gets, for each original that session's messages name, its recorded reads (outcome and scope, no text), only under the existing session/principal authorization: another principal's or another session's reads are never returned.
- A read recorded during a live turn reaches a connected client viewing that session without a reload.
- The shape is additive and documented in the contract; a host without it is detectable, so a client shows no read state rather than a wrong one.
- Nothing about reads enters the provider-facing conversation; the keyless provider-history guards for both backends stay green on the affected paths.
Verification
Route or frame tests through bun run test covering the authorization boundary (another session, another principal) and a live read reaching the client, with a mutation dropping the session filter failing the boundary test. bun run check:pr --base origin/epic/3150-attachments.
Contract impact
Additive: a new HTTP route or WebSocket field, documented in docs/integration-contract/ in the same commit, with the contract label, CONTRACT: commits and a minor changeset. The concrete route or frame is the implementer's choice within those rules.
Activity
schlessera commentedon Nov 4, 2026
Claiming for implementation (claim token
orch-3589-a1). Branch:feat/3589-attachment-reads, PR againstepic/3150-attachments.Collision report: path collision on
packages/ui-sdk/src/protocol.tswith draft #3582 (unrelated Apify contract work); closure-only reports otherwise.schlessera commentedon Nov 6, 2026
2026-11-06 readiness check: the citations still point at what the issue claims, but two have moved since it was filed. On
epic/3150-attachmentsat0ec44c466, after #3593 grew the draft store:listAttachmentReadsis atpackages/ui-server/src/attachments/store.ts:230-240(was:225-235).attachmentReads(sessionId)is atpackages/ui-server/src/drafts/store.ts:981-983(was:845-847).drafts/writes.ts:41andAttachmentReadOutcome(tool-contracts/attachment.ts:26) are unchanged. Neither is a scope change.CONTRACT: docs(http): classify GET /api/sessions/:id/attachment-reads…
test(ui-server): give the attachment-read delivery test a wall-clock …
CONTRACT: feat(ui-server): deliver recorded attachment reads to the b…
Merge pull request #3656 from schlessera/epic/3150-attachments
1 remaining item
CONTRACT: feat(ui-react): show what the agent read of each sent origi…
CONTRACT: feat(ui-react): show what the agent read of each sent origi…
CONTRACT: feat(ui-react): show what the agent read of each sent origi…
CONTRACT: feat(ui-react): show what the agent read of each sent origi…
CONTRACT: feat(ui-react): show what the agent read of each sent origi…
CONTRACT: feat(ui-react): show what the agent read of each sent origi…
CONTRACT: feat(ui-react): show what the agent read of each sent origi…
CONTRACT: feat(ui-react): show what the agent read of each sent origi…
CONTRACT: feat(ui-react): show what the agent read of each sent origi…
CONTRACT: feat(ui-react): show what the agent read of each sent origi…
CONTRACT: feat(ui-react): show what the agent read of each sent origi…
CONTRACT: feat(ui-react): show what the agent read of each sent origi…
CONTRACT: feat(ui-react): show what the agent read of each sent origi…
CONTRACT: feat(ui-react): show what the agent read of each sent origi…