Skip to content

feat(mobile): shared conversations name who wrote and who answered - #859

Merged
Jacksondr5 merged 2 commits into
j5/mainfrom
j5code/mobile-shared-authors
Nov 1, 2026
Merged

Jacksondr5 merged 2 commits into
j5/mainfrom
j5code/mobile-shared-authors

Conversation

@Jacksondr5

@Jacksondr5 Jacksondr5 commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

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.

  • Timeline: an authored message shows as typed. Another person's sits on the left under their name. The reader's own message says "Edited by …" only when someone edited it while it was queued. The note the platform gave the agent is one muted line that opens to its words. A message whose author isn't read yet is held back, or shown as this client typed it, so no line meant for the agent is drawn.
  • Answered by: settled questions and approvals say "· answered by Priya", or "you". A question's answers lose the platform's mark.
  • Queue: a queued message's row, and the text an edit loads, are the words typed.
  • Search: a hit names its author from the server's author field (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's createSharingEnvironmentAtoms. The pure reading moves from apps/web/src/j5/sharing/sharedTimeline.logic.ts into packages/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 shared is 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 is 8b6e93d80a, except the queue and search rows, which nothing after 4d69545a12 changed.

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.

Before After
Another person's message and the folded platform note, before Another person's message and the folded platform note, after

Expanded platform note: the note opens beneath its line.

Before After
Expanded platform note, before Expanded platform note, after

Questions answered by the collaborator and the reader: answers without [Answer from …], and "· answered by Priya" or "· answered by you".

Before After
Questions answered by the collaborator and the reader, before Questions answered by the collaborator and the reader, after

Approval answered by the collaborator: a long label truncates and "· answered by Priya" stays visible.

Before After
Approval answered by the collaborator, before Approval answered by the collaborator, after

Reader's message edited by the collaborator: "Edited by Priya" above the reader's own message.

Before After
Reader's message edited by the collaborator, before Reader's message edited by the collaborator, after

Collaborator's queued message: the queued row shows her typed words.

Before After
Collaborator's queued message, before Collaborator's queued message, after

Editing the collaborator's queued message: Edit loads her typed words, without the author header.

Before After
Editing the collaborator's queued message, before Editing the collaborator's queued message, after

Search result for the collaborator's message: the hit reads "Priya:".

Before After
Search result for the collaborator's message, before Search result for the collaborator's message, after

Search result for the reader's message: the hit still reads "You:".

Before After
Search result for the reader's message, before Search result for the reader's message, after

Unshared conversation: unchanged.

Before After
Unshared conversation, before Unshared conversation, after

Notes:

  • The base has no collapsible note, so the folded-note "before" shows the note as prose in the bubble.
  • The two queue pairs come from separate holds on the same home, so their surroundings differ.

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 artifact test-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 at 8b6e93d80a and was re-checked visually, along with short question rows.

Exercised:

  • Priya's message and the note line, folded and opened.
  • Two real native questions, one answered by Priya and one by the owner.
  • A real Supervised approval answered by Priya.
  • The owner's message, edited by Priya while queued.
  • Priya's queued row, and its Edit. Web's Ctrl-click Queue held the message, because Haiku otherwise takes it into the running turn.
  • Search labels.
  • A thread that was never shared, which is unchanged.

Since the tested head, bcc35dc2a4 rebases onto trunk f5822cde4d (#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 and check:changed pass on the rebased head.

Not exercised:

  • iOS: deferred to Checkpoint 1.
  • A first collaborator's message arriving on a slow link: this is the cached "not shared" gap described above, and the run neither shows nor rules it out.
  • The author's loading and error states, remote, relay and multi-environment setups, font scaling, and a clipboard round trip.
  • Native video: the Browser panel records web tabs only. The captures show settled states, not timing.

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 through useSharedConversationFeed).
  • apps/mobile/src/features/threads/thread-work-log.tsx: case 99 (PromptAnsweredBy after 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 mocks j5/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

  • One concern: the description has no "also"
  • Tests cover the changed behavior (sharedConversationFeed.test.ts, timelinePresentation.test.ts, client-runtime sharedConversation.test.ts and threadSearchMatchLabel.test.ts, the seam rows)
  • UI changes: before/after screenshots above (Android; iOS deferred to Checkpoint 1; no video, because nothing here moves)
  • Live testing: the section above says what ran live and what did not
  • Upstream-owned files: each one is recorded in FORK.md (case text and file-table row) in this PR
  • Upstream product: no change to what upstream's product does
  • Surfaces: mobile is the client; web keeps its behaviour through the lifted helpers. No contract changes. The record is read per thread in that thread's environment.
  • Docs: nothing to rewrite. people-and-sharing.md still correctly says mobile does not share, leave or rename.

Claude Opus 5.5 in J5 Code (Claude Code harness).

🤖 Generated with Claude Code

@vercel

vercel Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
j5-code Ready Ready Preview Nov 1, 2026 2:08am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 27 billable files and costs up to $6.75.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

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.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available. Your 53 included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between f5822cd and bcc35dc.

Files selected for processing: 27
  • FORK.md
  • apps/mobile/src/features/threads/ThreadFeed.tsx
  • apps/mobile/src/features/threads/ThreadQueueControl.tsx
  • apps/mobile/src/features/threads/ThreadRouteScreen.tsx
  • apps/mobile/src/features/threads/thread-search-match.tsx
  • apps/mobile/src/features/threads/thread-work-log.tsx
  • apps/mobile/src/j5/a2a/timeline.tsx
  • apps/mobile/src/j5/a2a/timelinePresentation.test.ts
  • apps/mobile/src/j5/a2a/timelinePresentation.ts
  • apps/mobile/src/j5/a2a/timelineState.ts
  • apps/mobile/src/j5/sharing/SharedConversationNote.tsx
  • apps/mobile/src/j5/sharing/sharedConversation.tsx
  • apps/mobile/src/j5/sharing/sharedConversationFeed.test.ts
  • apps/mobile/src/j5/sharing/sharedConversationFeed.ts
  • apps/mobile/src/j5/upstreamSeams.test.ts
  • apps/mobile/src/lib/filePreview.test.ts
  • apps/web/src/j5/a2a/minimapMessages.test.ts
  • apps/web/src/j5/a2a/minimapMessages.ts
  • apps/web/src/j5/sharing/SharedConversationCards.tsx
  • apps/web/src/j5/sharing/searchAuthorLabel.ts
  • apps/web/src/j5/sharing/sharedConversation.ts
  • apps/web/src/j5/sharing/sharedTimeline.ts
  • packages/client-runtime/package.json
  • packages/client-runtime/src/j5/sharedConversation.test.ts
  • packages/client-runtime/src/j5/sharedConversation.ts
  • packages/client-runtime/src/j5/sharing.ts
  • packages/client-runtime/src/j5/threadSearchMatchLabel.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@Jacksondr5 Jacksondr5 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ts becomes client-runtime/j5/sharedConversation.ts, with its tests. It gains authorIndex, threadSearchMatchLabel, observeSharedMessages and sharedQueuedRuns, each line for line from web, and web delegates to them. threadAuthors and threadAuthorsChanges move into createSharingEnvironmentAtoms with the same labels. Web's minimap and A2A tests pass unchanged.
  • The feed. presentSharedConversationFeed mirrors web's useSharedConversationEntries:
    • 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).
  • Answered-by. PromptAnsweredBy uses isSettledPrompt, so it covers both questions and approvals.
  • Search. EnvironmentThreadSearchMatch extends the contract's match, which carries author, so threadSearchMatchLabel names 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, shared is recorded.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: false record 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 shared is 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.

@github-actions github-actions Bot added size:XL 500-999 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Nov 1, 2026

@Jacksondr5 Jacksondr5 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Jacksondr5 and others added 2 commits October 31, 2026 22:06
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>

@Jacksondr5 Jacksondr5 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

This branch was successfully deployed

1 active deployment
Preview — bcc35dc2 Deployed Nov 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mobile: shared-conversation authors, answered-by, and search author labels

1 participant