Repository navigation
feat(mobile): shared conversations name who wrote and who answered - #859
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
This review includes 27 billable files and costs up to $6.75.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 15 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 4d69545
Both of us reviewed the PR independently and checked each finding against the source. Neither found anything that blocks merge.
Checked and fine
- The lift.
sharedTimeline.logic.tsbecomesclient-runtime/j5/sharedConversation.ts, with its tests. It gainsauthorIndex,threadSearchMatchLabel,observeSharedMessagesandsharedQueuedRuns, each line for line from web, and web delegates to them.threadAuthorsandthreadAuthorsChangesmove intocreateSharingEnvironmentAtomswith the same labels. Web's minimap and A2A tests pass unchanged. - The feed.
presentSharedConversationFeedmirrors web'suseSharedConversationEntries:- a message whose author hasn't been read is held back, with one refresh per
pendingKey; - the change feed's revision refreshes the read;
- a note splits out ahead of its message;
- question answers lose the server's
[Answer from …]prefix, so the work log's preview and its expanded answer show the typed words (P4).
- a message whose author hasn't been read is held back, with one refresh per
- Answered-by.
PromptAnsweredByusesisSettledPrompt, so it covers both questions and approvals. - Search.
EnvironmentThreadSearchMatchextends the contract's match, which carriesauthor, sothreadSearchMatchLabelnames another person (#814). - Timeline. Another person's message sits on the left under their name. The reader's own message shows only "Edited by". Copy, and the queue sheet's edit, use the typed text.
Known limitation (not blocking; please say this in the PR body)
The PR body presents the "may be shared" divergence (mobile has no people read, so it doesn't use web's writers > 1 || readsOthers) as mattering only before the first read. It also applies after one.
- Cause. On the server,
sharedisrecorded.length > 0(SharedConversation.ts:747). Sharing a thread doesn't move the authors revision; the first recorded message does (:381). - What happens. A thread open on mobile with a cached
shared: falserecord can receive the first collaborator's message before the refreshed author read comes back. Until that refresh lands, the message renders plain: the server's[Message from …]prefix (and any note) shows, drawn as the reader's own. It switches to the authored view when the read returns. - How long. One read round trip. That's usually short, but it isn't bounded on a slow remote link.
- Scope. It happens for the first person-message of each thread. After that
sharedis true, and later messages are held back until their author is read.
We considered holding back every fresh server message the cached record doesn't cover, and decided against it. Every user-role message in every unshared thread would be delayed and cost an extra read; that includes owner messages from another client and A2A deliveries. Mobile's people read, which wave 2 needs anyway, closes this without that cost.
Tests
184 focused tests pass: 41 shared, 130 mobile, and 13 web (minimap and A2A). diff --check is clean.
Not yet done (merge gates, not code findings)
- Before and after captures of a two-person shared thread, answered-by and search (Android and iOS), the tester's run, and green J5 CI.
Jacksondr5
left a comment
There was a problem hiding this comment.
Combined review: reviewer-opus and reviewer-sol, head 8b6e93d
The tester's truncation fix is a 2-file change: PromptAnsweredBy moves out of the single-line WorkLogLabel and sits beside it, styled shrink-0 pl-1 text-sm, one line. Because the label is min-w-0 flex-1, a long label now truncates first and "· answered by …" stays visible. The seam test still matches.
The panel has no open code findings.
For the captures (not blocking): since the label is flex-1, a short label stretches, so "· answered by Priya" sits at the right edge of the row rather than right after the label. If the tester's capture shows that reading badly next to web, the fix is a layout tweak, not a logic change.
Before merge it still needs the before/after captures (Android and iOS), the tester's verdict and green J5 CI.
In a shared thread the native app showed another person's message as the reader's own, with the platform's note and author lines as prose, a raw [Answer from …] mark on answered questions, and "You:" on every search hit. Mobile now reads the shared-conversation record (case 98): messages show as typed, another person's sits on the left under their name, the note to the agent is one muted line, settled questions and approvals say who answered, queued rows and edits carry the typed words, and search names the author. The record's atoms and its pure reading move from web into client-runtime so both clients share them. Refs #832 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The suffix sat inside the one-line work-row label, so a long approval label ellipsized it away. It is now a sibling that does not shrink, as on web, and the label truncates first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8b6e93d to
bcc35dc
Compare
Jacksondr5
left a comment
There was a problem hiding this comment.
Combined review: reviewer-opus and reviewer-sol, head bcc35dc (rebased onto #851)
We both checked the rebase.
- Code. The code changes are line-for-line identical to the reviewed head, 8b6e93d. The only difference is that this PR's FORK case is renumbered from 98 to 99, because #851 took 98 for artifacts.
- FORK.md and seams. Case 99 matches the old 98, artifacts' case 98 is untouched, and the artifact seam rows are kept.
- Answered-by. It is still outside
WorkLogLabel.
172 focused tests pass (127 mobile, 45 shared). There are no new findings. The documented first-shared-message limitation is unchanged.
The panel has no open code findings. Before merge it still needs the captures, the tester's verdict and green J5 CI.
Problem
In a shared conversation, the native app showed another person's message as the reader's own. The platform's note to the agent and the author line appeared as prose, and an answered question showed a raw
[Answer from <name> (<level>)]mark (live finding P4). Every search hit read "You:". Closes #832.What changed
Mobile now reads the shared-conversation record (who wrote each message, who answered each prompt), the same one web reads (case 80). It's wired through FORK.md case 99, beside case 97's timeline seam.
authorfield (fix(j5): Cmd+K names who wrote another person's message #814), instead of "You:" for every user-role hit.The record's atoms (
threadAuthors,threadAuthorsChanges) move into client-runtime'screateSharingEnvironmentAtoms. The pure reading moves fromapps/web/src/j5/sharing/sharedTimeline.logic.tsintopackages/client-runtime/src/j5/sharedConversation.ts: the message view, typed text, answers without their mark, seen-message tracking, queued rows and the search label. Web imports all of them from there, with no change in behaviour; web's sharing and a2a tests pass unchanged.Mobile decides "may be shared" from the record alone; web also reads who reaches the thread, and mobile has no people read yet (People page, P9). That leaves one gap. The record's
sharedis true only once an author is recorded, and sharing a thread doesn't move the record's change counter. So on a thread open on mobile with a cached record that says not shared, the first collaborator's message can show raw, with its note and author line, drawn as the reader's own. It stays that way until the record's refresh for that message lands: one read round trip, once per thread, unbounded on a slow link. A people read on mobile would close the gap.UI changes
Android 16 emulator, 1080×2400 in the light theme. Each pair uses the same isolated home and the same persisted messages. Before is base
c0d994b8ce. After is8b6e93d80a, except the queue and search rows, which nothing after4d69545a12changed.Another person's message and the folded platform note: Priya's message moves to the left under her name, with only her words; the note to the agent becomes one muted line.
Expanded platform note: the note opens beneath its line.
Questions answered by the collaborator and the reader: answers without
[Answer from …], and "· answered by Priya" or "· answered by you".Approval answered by the collaborator: a long label truncates and "· answered by Priya" stays visible.
Reader's message edited by the collaborator: "Edited by Priya" above the reader's own message.
Collaborator's queued message: the queued row shows her typed words.
Editing the collaborator's queued message: Edit loads her typed words, without the author header.
Search result for the collaborator's message: the hit reads "Priya:".
Search result for the reader's message: the hit still reads "You:".
Unshared conversation: unchanged.
Notes:
Live testing
The crew's tester ran Android 16 on an isolated test server, using real Claude Haiku 5.5 turns, the Test owner's web session and a collaborator Priya's web session: pass at
8b6e93d80a. Report: project artifacttest-reports/j5code-mobile-wave1a-tester/8b6e93d80a.md.The run found one problem at
4d69545a12: a long approval label cut off "· answered by Priya". It's fixed at8b6e93d80aand was re-checked visually, along with short question rows.Exercised:
Since the tested head,
bcc35dc2a4rebases onto trunkf5822cde4d(#844, #851, #854). The only changes to this PR's own lines are the FORK case number, 98 → 99 because #851 took 98, and the matching comments and seam-test labels. Nothing this PR draws changed, so it was not re-tested live. The focused tests andcheck:changedpass on the rebased head.Not exercised:
Upstream impact
All four are listed in
apps/mobile/src/j5/upstreamSeams.test.ts:apps/mobile/src/features/threads/ThreadRouteScreen.tsx: case 99 (the feed passes throughuseSharedConversationFeed).apps/mobile/src/features/threads/thread-work-log.tsx: case 99 (PromptAnsweredByafter a work row's label).apps/mobile/src/features/threads/ThreadQueueControl.tsx: case 99 (useSharedQueuedRuns).apps/mobile/src/features/threads/thread-search-match.tsx: case 99 (threadSearchMatchLabel).apps/mobile/src/lib/filePreview.test.ts: it now also mocksj5/sharing/sharedConversation, as it does case 97's state module.What upstream's product does is unchanged. These are J5's shared-conversation rows, under register D33.
Checklist
sharedConversationFeed.test.ts,timelinePresentation.test.ts, client-runtimesharedConversation.test.tsandthreadSearchMatchLabel.test.ts, the seam rows)FORK.md(case text and file-table row) in this PRpeople-and-sharing.mdstill correctly says mobile does not share, leave or rename.Claude Opus 5.5 in J5 Code (Claude Code harness).
🤖 Generated with Claude Code