Skip to content

Mobile: agent history lists large transcripts from their ends; those cards hide their message count - #28933

Closed
brennanb2025 wants to merge 2 commits into
brennanb2025/scan-partial-rows-desktopfrom
brennanb2025/scan-partial-rows-mobile
Closed

brennanb2025 wants to merge 2 commits into
brennanb2025/scan-partial-rows-desktopfrom
brennanb2025/scan-partial-rows-mobile

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​5 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​5
Prod 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​12 $\color{#cf222e}{\Huge{\mathbf{−}}}$​6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​6

ELI5

The phone's agent history list now gets the same fast rows as the desktop. A long transcript is read only at its start and end, and its card shows no message count instead of a guessed one.

Stacked on #28927 (desktop) and #28925 (mechanism).

What Changed

Problem. After #28927 the desktop reads big transcripts by their ends, but the phone does not advertise that it can show such rows. A paired phone therefore makes its host read every one of those transcripts whole. That is slow for the phone, and it is the cost the desktop just removed.

Before / after on the phone. For a large transcript read fresh, the history card no longer shows "N messages". Title, agent, time, last message and the current-worktree badge are unchanged. Small transcripts still show their count.

Mechanism.

  • The mobile app advertises aiVault.list.partial-rows.v1.
  • The card view-model's messageCount becomes null for a row with contentCoverage, and the card hides the label when it is null.
  • Older phone builds don't advertise the capability, so they keep getting whole rows from new hosts.

Why

This uses the same capability gate as the desktop: the host never sends a partial row to a client that would print its count as exact.

Linked Issue

N/A (internal performance lane).

Visual Proof

N/A for screenshots in this PR. The only visible change is the "N messages" label being absent on large rows, the same change as #28927's visual proof, on the mobile card.

Testing

  • agent-history-session-card.test.ts: a partial row's card has no count (17/17 pass).
  • Mobile oxlint is clean. These ran on a Linux machine. Mobile tsc there reports only errors from generated files missing on that machine; CI generates them.

@OrcaWin

OrcaWin commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

Closing the mobile companion after reviewing all three production changes and its test at unchanged head 6424f1f323c3cf41fc8f22e373031a5f1fb63b00.

Its complete functional scope is advertising aiVault.list.partial-rows.v1, turning a marked row's message count into null, and hiding that count. It supplies no independent transcript-reading mechanism or correctness repair. The parent #28927 has now been closed after final-head source review and production reader/parser measurements; the final implementation reads the whole file, returns the complete row/count, and adds selective tokenization rather than the description's bounded head/tail reads. On four synthetic approximately 16 MB Claude/Codex workloads it read the same bytes and produced equivalent rows while increasing reader/parser elapsed time from main's 16.7–23.5 ms to 50.5–56.8 ms. Those are reader/parser measurements, not phone or whole-app latency measurements; methodology and limits are documented in the parent closure comment.

Enabling that declined performance design and suppressing an available exact count has no remaining independent benefit under #27143's free-win/substantial-gain standard. The branch is preserved. A future demonstrated history optimization can introduce the mobile contract appropriate to its actual semantics.

@OrcaWin OrcaWin closed this Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants