Repository navigation
refactor(j5): the Inbox's answer flow and kept items live in client-runtime - #878
Conversation
…untime Web's kept-while-typing rules (nextKeptItems, answeredByLine, closedLine), the answer-and-retry core (submitHumanInboxAnswer, keepForPersonScopes) and the "writes nowhere" inbox gate move into client-runtime/src/j5/inbox.ts with their tests, so mobile's Inbox (#830) uses the same code. Web's behaviour is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
This review includes 7 billable files and costs up to $1.75.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 10 minutes for your next included review. View limit details
|
Jacksondr5
left a comment
There was a problem hiding this comment.
Combined review: reviewer-opus and reviewer-sol (Claude Opus 5.5 and GPT Sol 6.1), head 274d7a0
Both of us reviewed the PR independently. Neither found anything. It's a pure lift, with no change in behaviour.
- Copied exactly.
nextKeptItems,answeredByLine,closedLine,submitHumanInboxAnswer,HumanInboxAnswerAttemptandkeepForPersonScopesare exact text copies of the web code they replace (inboxKept.logic.tsandHumanInboxPage.tsx). writesNowhere. It's the old atom's predicate, identical, as a pure function overConnectionAccess | null. Web's atom family wraps it and reads the sameconnectionAccessdependency.- Left on web.
captureHumanInboxAnswerstays there, which is right because it reads a DOM event. - Tests. The kept-item tests moved byte for byte. The submit tests moved with only their type import changed, and there are two new
writesNowherecases. 14 client-runtime inbox tests pass. - Docs. The PR's diff also shows #831's wave 1 docs (#864, reviewed before), which aren't part of this change.
The panel has no open code findings. Nothing visible changes, so no tester run is needed. Before merge it needs green J5 CI.
Problem
Mobile's Inbox (#830) needs the same rules web's Inbox uses, but those rules live in web-only files: kept-while-typing items and their closed lines, answering with retry, and who has an inbox at all. Building mobile against copies would leave two versions to drift.
What changed
Moved into
packages/client-runtime/src/j5/inbox.ts, unchanged:nextKeptItems,answeredByLineandclosedLine, fromapps/web/src/j5/a2a/inboxKept.logic.ts(deleted): an item closed while the person typed stays, with their words and who answered (Inbox AC16, AC17).submitHumanInboxAnswer,HumanInboxAnswerAttemptandkeepForPersonScopes, fromHumanInboxPage.tsx: answering, where a retry with the same words reuses itsclientRequestId, and dropping drafts when an environment's person changes.writesNowhere, fromapps/web/src/j5/state.ts: an unknown device or a Viewer everywhere has no inbox (Inbox AC14).Web imports them from there. Its behaviour is unchanged, and the tests moved with the code:
inboxKept.logic.test.tsand the threesubmitHumanInboxAnswercases are now inclient-runtime/src/j5/inbox.test.ts, plus two newwritesNowherecases.captureHumanInboxAnswerstays on web, because it reads a DOM event.This is part 1 of 4 for #830. Next come the mobile Inbox screen and route, then answering, then the header bell and count.
Checklist
client-runtime, and the web page test passesBuilt by Claude Opus 5.5 in Claude Code (J5 crew seat builder-identity).
🤖 Generated with Claude Code