Repository navigation
feat(mobile): agents' messages read as letters, not envelopes - #843
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
This review includes 16 billable files and costs up to $4.00.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 4 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 441833aef5
Both of us reviewed the PR independently and checked each finding against the source. One finding blocks merge; we found nothing else.
Blocking
- Copy drops the context payload for every ordinary sent message (
ThreadFeed.tsx:1756, inline below). Details in the inline comment.
Checked and fine
- The notice split matches web's
renderThreadA2ADelivery. A silence is one line. A system delivery that no parser reads becomes a "Raw A2A delivery" card. A Crew notice stays a raw card, as the brief asks. Upstream'srestart-continuation,pr-watchand platform notices go to upstream's row, as they do on web. j5SenderThreadRefandj5MessageAuthorNamewere lifted from web verbatim. Web'sThreadA2ARendererandSpawnBrieftests pass unchanged, andarchiveFlowClientkeeps its behaviour on an empty list and on a failure.useParticipantIdentitieskeys its result on the environment and the sorted ids. It waits forconnectedand drops a stale answer. The React Compiler is on in mobile, so the newj5TimelineinextraDatadoesn't rebuild visible rows on every render.- The fold header with
label: ""plus the author line above it is the same as upstream's label for an agent message J5 didn't unwrap: the sender thread's title, else "Agent". - The queue-row formatter covers the only place a queued run's text shows (
ThreadQueueSheet). - FORK.md case 97, the seam-table update, the file-index rows and both
upstreamSeams.test.tsrows are present. - Tests: the mobile timeline and seam tests (28), the shared participant-identity and user-message tests (42), and the matching web tests (17) all pass locally.
Not yet done (merge gates, not code findings)
- Before and after captures (Android, and iOS since this changes what you see) and the tester's live run are still pending. The checklist correctly leaves both unticked.
| @@ -1725,7 +1753,7 @@ function renderFeedEntry( | |||
| <UserMessageCopyButton | |||
| text={presentation.text} | |||
| onCopy={ | |||
| message.context && presentation.attribution !== "guest" | |||
| message.context && presentation.attribution !== "guest" && !presentation.j5 | |||
There was a problem hiding this comment.
Blocking: Copy drops the context payload for ordinary user messages. resolveJ5UserMessagePresentation returns a non-null j5 for every ordinary user message: presentJ5UserMessage ends with { group: "person", unwrapped: false } (userMessagePresentation.ts:538). So !presentation.j5 is false for every message the person sends. Copying a sent message that carries terminal, file or thread context then writes plain text instead of writeComposerContextClipboard, and pasting it into the composer loses the records. Sol reproduced this from client-runtime: for an ordinary user message, the old guard is true, the new guard is false, and the corrected guard is true.
Only a letter J5 took out of an envelope should skip the structured copy, since message.text is then the envelope:
message.context && presentation.attribution !== "guest" && !presentation.j5?.unwrappedWeb draws the same line with literalContext (j5?.unwrapped).
Jacksondr5
left a comment
There was a problem hiding this comment.
Combined review: reviewer-opus and reviewer-sol, head a9127e53ce
The blocking copy-guard finding is fixed. ThreadFeed.tsx:1756–1758 now tests !presentation.j5?.unwrapped, so an ordinary sent message copies its context records again, and a letter J5 took out of an envelope still copies as plain text. Nothing else changed since 441833aef5.
The panel has no open code findings. Still needed before merge: the before/after captures (Android and iOS), the tester's live run, and green J5 CI.
Jacksondr5
left a comment
There was a problem hiding this comment.
Combined review: reviewer-opus and reviewer-sol, head 15490da86e
We both checked the CI fix (15490da86e) against a9127e53ce and found nothing new.
useJ5Timelinemoves unchanged intoj5/a2a/timelineState.ts. That keepsconnection/runtime, and so expo-crypto, out oftimeline.tsx's imports.filePreview.test.tsmocks it beside upstream's state mocks.- That test file is upstream's, so this edit is recorded in case 97 and in a seam row, as it should be.
ParticipantAuthorLinemounts the sender-thread lookup only for a participant's row, so a person's rows add no hook and the hooks stay unconditional. The other-person branch passessenderThreadTitle: undefined, which matches the old behaviour: the lookup only ever answered for participants.
The panel has no open code findings. Before merge it still needs the before/after captures (Android and iOS), the tester's verdict and green J5 CI.
Mobile drew J5 deliveries in upstream's rows: raw envelopes and reply footers, spawn briefs as XML, platform notices and Inbox replies as the reader's own words, and every sender as "Agent". Mobile now calls the shared classifier through FORK.md's reserved Timeline delegate and Queue-row formatter (case 97): letters fold on the left under an identity line named by the identity read, spawn briefs read "<spawner> · brief", Open thread reaches spawners and peers, silence notices are one muted line, unread notices and Crew notices keep a labelled raw card, and queued deliveries read "From <sender>: <line>". The identity helpers move from web into client-runtime so both clients share them. Refs #699 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Only a letter J5 took out of an envelope copies as plain text; the classifier reads every ordinary message as the person's, so the guard tests unwrapped. Co-Authored-By: Claude Opus 5.5 <[email protected]>
filePreview.test.ts renders ThreadFeed with every state module mocked; the new identity and access hook reached the connection runtime and failed on the expo mock. The hook moves to timelineState.ts, which the test mocks beside upstream's state, and the author line's thread lookup mounts only for a participant's row. Co-Authored-By: Claude Opus 5.5 <[email protected]>
15490da to
9bf629e
Compare
Jacksondr5
left a comment
There was a problem hiding this comment.
Combined review: reviewer-opus and reviewer-sol, head 9bf629e (rebase onto da0458f)
We both checked the rebase onto trunk, which now has #845 and the shared client-runtime/j5/archiveFlow.ts. Neither of us found anything.
- The shared identity read. Trunk's
readParticipantIdentitiesnow maps its response through the sharedparticipantIdentitiesFromResponse, the same mapping as trunk's loop. A failure still gives empty maps. - Mobile.
useParticipantIdentitiesnow calls that shared read. The keying and the dropping of a stale answer are unchanged. A failed read now stores empty maps under the current key instead of leaving the old result, and both show no names. - Unchanged from 15490da86e.
participantIdentity.tsand web'sThreadA2ARenderer.tsxare byte-identical to the reviewed head.
The panel has no open code findings. Before merge it still needs the before/after captures, the tester's verdict and green J5 CI.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* feat(mobile): read artifacts, and open artifacts/… links in chat Mobile had no way to read the plans, specs and handoffs agents write, and an `artifacts/…` link in chat opened as a workspace file that isn't there. Two thread-scoped J5 screens land through the reserved Route registration seam: the project's artifact list and a read-only viewer (Markdown, text, images; HTML as source; no delete). The reserved Link resolver seam sends `artifacts/…` links to the viewer. Web's artifact path, preview-kind and HTTP read move to client-runtime so both clients share them. Closes #833 Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(j5): artifacts on mobile Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(mobile): artifact links open as artifacts everywhere, and a new artifact never shows the old body A viewer reused for another artifact kept showing the previous body until the new read landed; only a refresh of the same artifact keeps its body now, and links push the viewer instead of reusing it. Long-pressing an artifact link offers Open artifact and Copy path, not workspace-file actions that find nothing, and links inside a Markdown artifact open as artifacts, as on web. Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore(j5): artifacts are FORK case 98 after #843 took 97 Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Problem
The native app drew J5's agent messages in upstream's rows: raw envelopes and reply-tool footers, spawn briefs as
<j5_spawn_context>XML, platform notices and Inbox replies as the reader's own words, and every non-local sender as "Agent". Closes #699.What changed
Mobile now calls the shared classifier (
packages/client-runtime/src/j5/userMessagePresentation.ts) through FORK.md's two reserved seams, which land as case 97:ThreadFeed.tsx). A letter from an agent, automation, outside agent, peer or spawner folds on the left under an identity line. The line names the sender from the identity read, falling back to the sender thread's title and then "Agent", and shows at most one tag or badge (Automation, Outside agent, Expects reply, Replied). A spawn brief reads "⟨spawner⟩ · brief" and previews the spawner's own first line. The folded preview and the opened body are the letter only. Open thread reaches the identity read's thread, on this server or a peer, and a brief's spawner thread. An Inbox reply is the reader's own ("You · via Inbox") only when the reader sent it; anyone else's sits on the left under their name. Copy never includes the envelope.ThreadQueueControl.tsx). A queued delivery in "Up next" readsFrom <sender>: <first line>.Shared logic now lives in one place:
presentParticipantIdentity, the queued-delivery formatter, the identity-read mapping, and the sender-thread and author-name rules move fromapps/web/src/j5/a2aintopackages/client-runtime/src/j5/participantIdentity.ts. Web imports them from there, with no change in behaviour (web's A2A tests pass unchanged).Not in this PR: authors in shared threads, answered-by and search authors (#832, next on the same seam). The grey notice and prompt redesign is #698.
UI changes
Android 16 emulator, 1080×2400 in the light theme, the same isolated home and data on both sides. Before is base
31447c91c6. After is head15490da86efor the first two rows anda9127e53ce(the same UI) for the rest.<j5_spawn_context>" and letters preview[Cross-agent …on the right; after, each sits on the left under the sender's name, with "· brief" and "Expects reply"[Message from …]wrapperNotes:
Live testing
The crew's tester ran Android 16 on an isolated test server with real Claude Haiku 5.5 and GPT Luna agents: pass for the flows exercised. The full run was at
a9127e53ce. At the head,15490da86e, the tester spot-checked the changed area (the identity line's split and the timeline-state module move), and the focused tests passed. Report: project artifacttest-reports/j5code-mobile-wave1a-tester/15490da86e.md.Exercised:
Not exercised live:
Upstream impact
apps/mobile/src/features/threads/ThreadFeed.tsx: case 97 (Timeline delegate).apps/mobile/src/features/threads/ThreadQueueControl.tsx: case 97 (Queue-row formatter).apps/mobile/src/lib/filePreview.test.ts: case 97 (it mocksj5/a2a/timelineState.tsbeside upstream's state).All three are listed in
apps/mobile/src/j5/upstreamSeams.test.ts. Upstream's product is unchanged: these rows are J5's own messages, under register D38.Checklist
timelinePresentation.test.ts,participantIdentity.test.ts, the seam rows)FORK.md(case text and file-table row) in this PRthread-a2a-rendering.mdalready says mobile takes the same treatments; nothing to rewriteClaude Opus 5.5 in J5 Code (Claude Code harness).
🤖 Generated with Claude Code