Repository navigation
fix(native-chat): show every user message on the message rail, not just loaded ones - #22558
Conversation
…st loaded ones The message rail was built only from transcript rows the renderer had loaded, so any prompt above the loaded page had no tick, and the rail lost ticks when a long live session trimmed its retained window. The host now answers `agentSession.conversationOutline`: every user message in a structured session's journal (item id, creation sequence, a preview cut to 200 characters, image count) plus the journal position it is current through. It is derived from the reduced journal on each request with the same projection the transcript runs, so an entry's id and preview are what the loaded row shows. The reply is bounded like a history page: previews shorten, then drop, and only then do the oldest entries go. The renderer asks only while the pane is visible and older history is unloaded, uses outline entries only for messages older than its loaded window (the window is authoritative for the rest), and falls back to loaded messages while the outline is stale (epoch change, or the window trimmed past what it covers). Selecting a tick with no row pages older history in until the row exists, then uses the existing rail jump. The method is negotiated with `agent-session.conversation-outline.v1`; a client never calls a host that does not advertise it, and any failure leaves the rail on loaded messages.
…low and cancelling itself A rail jump started by a reader following the end stopped a few pixels above the bottom instead of reaching the message. Paging older history in for a jump always leaves the reader following at the very end, so jumps to unloaded messages hit it every time; a jump to a loaded message from the end did too. The jump scrolls smoothly, and only its landing is marked as the application's own scroll. Its first frames move a pixel or two, still inside the band where a reader event re-arms follow, so the list read the jump leaving the end as the reader arriving at it. The next frame, just outside the band, then read as the reader taking over and rebased the view with an instant write, which cancels the smooth scroll. Re-arming follow now needs the reader to be arriving at the end: an unmarked event that moved the view up never reattaches a detached reader.
…lects an item With the whole conversation in the rail, its hover list overflows and opens scrolled to the message being read. Clicking an older item did nothing: pressing it focuses it, which turns the hover preview interactive, and that switch re-ran the effect that scrolls the lit row into view and focuses it. The list moved under the pointer between press and release, so the click landed on the list instead of the item, and focus jumped to the lit row. Revealing the lit row now follows the list opening (and its rows shifting), not the switch between hover and interactive. Entering interactive moves focus into the list only when focus is not already on one of its items.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe change adds a structured agent-session conversation-outline RPC. The host projects and bounds user-message entries, and the renderer checks outline freshness before merging entries into the native-chat rail. Selecting an unloaded rail entry can page older history before jumping to its loaded row. The change also updates transcript follow-state handling to use distance from the end. Priority: ⬇️ Low Merge Risk: 🔵 Low · up to The message rail can show a few prompts out of transcript order at a history-page boundary. Navigation remains available, so this is mergeable with owner awareness. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 35bb3690-61e9-4e14-a8c2-ae936bfe08d7
⛔ Files ignored due to path filters (1)
src/shared/rpc-contract/rpc-params-catalog.generated.tsis excluded by!**/*.generated.*
📒 Files selected for processing (43)
src/main/native-chat/agent-session-wire/agent-session-conversation-outline.test.tssrc/main/native-chat/agent-session-wire/agent-session-conversation-outline.tssrc/main/runtime/rpc/methods/structured-agent-session-conversation-outline.test.tssrc/main/runtime/rpc/methods/structured-agent-session-conversation-outline.tssrc/main/runtime/rpc/methods/structured-agent-session-gate-classification.test-fixture.tssrc/main/runtime/rpc/methods/structured-agent-session-rpc.test-fixture.tssrc/main/runtime/rpc/methods/structured-agent-session.test.tssrc/main/runtime/rpc/methods/structured-agent-session.tssrc/renderer/src/components/native-chat/NativeChatBackgroundTaskRun.test.tsxsrc/renderer/src/components/native-chat/NativeChatMessageList.rail-history-jump.test.tsxsrc/renderer/src/components/native-chat/NativeChatMessageList.stream-render.perf.test.tsxsrc/renderer/src/components/native-chat/NativeChatMessageList.tsxsrc/renderer/src/components/native-chat/NativeChatMessageRail.test.tsxsrc/renderer/src/components/native-chat/NativeChatMessageRail.tsxsrc/renderer/src/components/native-chat/NativeChatMessageRow.tsxsrc/renderer/src/components/native-chat/NativeChatStructuredSession.tsxsrc/renderer/src/components/native-chat/native-chat-autoscroll.test.tssrc/renderer/src/components/native-chat/native-chat-autoscroll.tssrc/renderer/src/components/native-chat/native-chat-message-rail-items.test.tssrc/renderer/src/components/native-chat/native-chat-message-rail-items.tssrc/renderer/src/components/native-chat/native-chat-rail-outline-parity.test.tssrc/renderer/src/components/native-chat/native-chat-row-height-estimate.tssrc/renderer/src/components/native-chat/native-chat-transcript-slots.tssrc/renderer/src/components/native-chat/structured-agent-session-rail-outline.test.tssrc/renderer/src/components/native-chat/structured-agent-session-rail-outline.tssrc/renderer/src/components/native-chat/use-native-chat-live-session.tssrc/renderer/src/components/native-chat/use-native-chat-message-rail.test.tssrc/renderer/src/components/native-chat/use-native-chat-message-rail.tssrc/renderer/src/components/native-chat/use-native-chat-rail-history-jump.test.tssrc/renderer/src/components/native-chat/use-native-chat-rail-history-jump.tssrc/renderer/src/components/native-chat/use-native-chat-transcript-scroll.tssrc/renderer/src/components/native-chat/use-structured-agent-session-rail-outline.test.tsxsrc/renderer/src/components/native-chat/use-structured-agent-session-rail-outline.tssrc/renderer/src/components/native-chat/use-structured-agent-session.tssrc/renderer/src/runtime/structured-agent-session-client.test.tssrc/renderer/src/runtime/structured-agent-session-client.tssrc/shared/agent-session-conversation-outline.tssrc/shared/native-chat-prose.tssrc/shared/native-chat-row-content.tssrc/shared/protocol-version.tstests/e2e/cross-version-wire/cross-version-agent-session-wire.unit.test.tstests/e2e/cross-version-wire/structured-agent-session-host-fixture.tstests/e2e/cross-version-wire/structured-agent-session-surface-manifest.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review.
…mmed window slides A long live session holds a head-trimmed window, so every new row moved the oldest-loaded edge and rebuilt the outline view even when no user message crossed it. The rail then re-merged, re-rendered and re-read the scroll geometry on each new row. The view is now reused while the set of entries older than the edge is unchanged.
Scrolling to the top of the loaded window asks for the next older page. A rail jump made while that page was in flight asked again, got the lane's immediate no-op return, read it as a page with no progress, and dropped the click. The jump now waits for the in-flight page to land before deciding.
…der onto the end The rule that stops a smooth scroll leaving the end from re-arming follow compared offsets, so it also refused a reader whose offset dropped because settled content folded away beneath them and the browser clamped them onto the end. They sat at the bottom without following, and the next reply grew out of view. Re-arming now requires closing on the end rather than moving down, which still rejects a scroll leaving it.
Both hooks wrote a ref while rendering, which React may replay or discard. The rail's structural-sharing baseline is now recorded after commit, and the history jump calls the lane's page loader from its effect instead of through a render-updated ref.
A jump to an unloaded message keeps paging older history until it lands. A pick made meanwhile lost to it: a loaded message scrolled into view, then the earlier jump finished and pulled the reader away; another unloaded message was ignored. Picking a loaded message now cancels the paging jump, and picking an unloaded one retargets it without asking for a second page.
There was a problem hiding this comment.
ℹ️ Minor suggestion only — the feature works and I found no blocking issue.
Reviewed changes
- Host outline read.
readAgentSessionConversationOutlinederives every user message the transcript would draw from the journal snapshot per request, degrading previews (200→60→'') before dropping oldest entries, bounded by the history-page byte budget. - RPC + capability. New
agentSession.conversationOutline(samerequireStructuredHostgate as history,OptionsParams), advertised asagent-session.conversation-outline.v1; client probes it through the shared capability helper before calling. Cross-version manifest and fixtures updated;STRUCTURED_AGENT_SESSION_METHODS28 → 29. - Shared preview parity.
nativeChatUserMessagePreviewandprojectAgentSessionConversationOutlinemoved tosrc/shared/, so a loaded row and an outline entry for the same message preview identically. I checked the projection againstnative-chat-turn-fold(user rows never fold) andhasImages === imageCount > 0— no parity gap on those paths. - Rail merge.
mergeNativeChatRailOutlineplaces unloaded outline entries before loaded items, lets a loaded item replace its entry, and allowsslotIndex: null. The loaded window wins for everything it covers. - Jump through history.
use-native-chat-rail-history-jumppages older history until the target has a slot, then runs the existing jump (one at a time, 1000-page cap, stops on no progress). The real structured lane'sloadOlderis() => Promise<void>resolving after the page applies, so the commit-driven loop works. - Scroll fixes.
nextFollowingEndnow requires motion toward the end before re-arming follow. I verified programmatic writes bypass it,previousScrollTopRefordering is correct, and prepend/measurement writes are marked — no regression found. - Hover-list press. The reveal now runs on open rather than on the hover→interactive transition, with a focus guard, so pressing an overflow item no longer slides the list.
Technical details
# A stale-after-arrival outline is never re-read for the rest of the epoch
## Affected sites
- `src/renderer/src/components/native-chat/use-structured-agent-session-rail-outline.ts:37` — `const requestKey = enabled && view.kind === 'stale' ? state.epoch : null`
- `src/renderer/src/components/native-chat/use-structured-agent-session-rail-outline.ts:52` — effect deps `[requestKey, sessionId, target]`
- `src/renderer/src/components/native-chat/structured-agent-session-rail-outline.ts:42-48` — staleness is `outline.cursor.sequence < oldestLoadedSequence - 1`
## Required outcome
If a successful read lands but the view is still stale (the loaded-window edge advanced
past `outline.cursor.sequence` while the read was in flight), the hook should schedule
exactly one more read for that epoch. Today `requestKey` is the same `state.epoch` string
before and after `setOutline`, so React does not re-run the effect and the rail falls back
to loaded messages until the epoch changes or the pane is re-enabled. Reachability is
narrow — per `src/shared/structured-agent-session-reducer.ts` the front edge only advances
once the retained-item floor (~1024) is hit, so it needs >1024 items applied during one
round trip, or a same-epoch window replacement landing mid-flight — which is why I've
filed it as minor rather than blocking.
## Suggested approach
Include the window edge in the trigger while stale (e.g. `state.epoch` + `oldestLoadedSequence`),
guarded by a ref recording the edge the in-flight/last read was issued for, so a read that
lands fresh still costs nothing and a moved edge that leaves the view stale issues one
follow-up rather than a fetch per streamed batch.
## Open questions for the human
Is the "one read per gap" comment in the file header intended to tolerate a read that
returns already-stale, or should that case self-heal?DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| oldestLoadedSequence: state.items[0]?.sequence ?? null, | ||
| hasOlder: state.hasOlder | ||
| }) | ||
| const requestKey = enabled && view.kind === 'stale' ? state.epoch : null |
There was a problem hiding this comment.
The read is keyed on the epoch, so a read that lands already-stale — the loaded-window edge advanced past outline.cursor.sequence while it was in flight — leaves requestKey unchanged and schedules no follow-up read for that epoch; the rail then falls back to loaded messages until the epoch changes or the pane is re-enabled. It is narrow (needs the front edge to move ~1024+ items during one round trip, or a same-epoch window replacement landing mid-flight), hence a minor note rather than a blocker.
Technical details
# A stale-after-arrival outline is never re-read for the rest of the epoch
## Affected sites
- `use-structured-agent-session-rail-outline.ts:37` — `requestKey = enabled && view.kind === 'stale' ? state.epoch : null`
- `use-structured-agent-session-rail-outline.ts:52` — deps `[requestKey, sessionId, target]`
- `structured-agent-session-rail-outline.ts:42-48` — stale when `outline.cursor.sequence < oldestLoadedSequence - 1`
## Required outcome
After a read lands with the view still stale, schedule exactly one more read for that epoch;
a read that lands fresh must still cost nothing.
## Suggested approach
Include the window edge in the trigger while stale (e.g. `state.epoch` + `oldestLoadedSequence`),
guarded by a ref recording the edge the last read was issued for, so a moved edge issues one
follow-up rather than one fetch per streamed batch.
## Open questions for the human
Does the file header's "one fetch per stale edge" intend to tolerate a read that returns already-stale?The step that requests the next page wrote the pending jump from the value its effect closed over, so a pick or cancel queued since that commit would be overwritten.
There was a problem hiding this comment.
ℹ️ No critical issues — one minor suggestion inline.
Reviewed changes
Reviewed the six commits pushed since the prior pullfrog review (d980bf5796…a8ffe1abd2) — follow-up fixes to the rail jump and follow-rearm logic, one outline-cache optimization, and their tests.
- Rail outline cache keyed on the covered count.
selectStructuredRailOutlinereuses the previous view when the number of entries older than the loaded edge is unchanged, so a live window that head-trims past no user message no longer produces a new entries array. - History jump waits out an in-flight page. The hook takes
loadingEarlierand holds its step until an older page already loading (e.g. from scrolling to the top) lands, instead of reading the lane's ignored request as "no progress". - Latest pick wins; jump is cancellable. A pick while paging retargets the pending message id and the page step is a functional update; selecting a loaded tick cancels the in-flight jump in
NativeChatMessageList. - Follow rearm measured from the end.
nextFollowingEndcompares distance-from-bottom, so content shrinking under a detached reader and clamping them onto the end reattaches follow; the transcript hook trackspreviousDistanceFromEnd. - Ref writes moved out of render.
previousItemsRefand the jump hook'sloadEarlierRefare no longer written during render.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| count += 1 | ||
| } | ||
| } | ||
| // "Older than the edge" only grows or shrinks with it, so an equal count is the same set. |
There was a problem hiding this comment.
The count shortcut is correct only because outline.entries is sequence-ascending (journal order, and the host only drops entries from the front), which makes "older than the edge" a prefix of the list. That ordering is not encoded in AgentSessionConversationOutlineEntry, so a future reorder would let equal counts return a different set while the cache reports a hit. Spelling it out keeps the assumption visible.
| // "Older than the edge" only grows or shrinks with it, so an equal count is the same set. | |
| // Entries are sequence-ascending, so "older than the edge" is a prefix of the list and | |
| // an equal count is the same set. |
…ed loop The jump through unloaded history was an effect-driven state machine that guessed "no progress" from the message list's identity and could not be cancelled by anything but another rail pick. A diff reveal, "Jump to latest" or the reader scrolling left it paging, and when its page landed it pulled the reader away; a history read that kept failing during a live turn could repeat back to back. Loading an older page now reports how it ended, and a second request while a page is in flight joins it instead of being refused. The jump is an awaited loop that reads the rail from a commit after each page, stops on anything but a page that moved the window, and is aborted by any other navigation, reader input (wheel, touch, scroll keys, scrollbar), a session switch or unmount. The latest pick wins.
…rojection The host built the outline from user items alone, while the transcript orders every message by when it was observed, folds tool results into the turn above and then drops harness turns. An imported user row carrying a tool result beside harness text therefore got a rail tick previewing the harness text, and clicking it paged history for a row that never draws. The transcript's order-fold-strip projection now lives in one shared function. The renderer's list projection wraps it with its own tail-row order, and the host runs it over the whole journal and keeps the user rows that draw content, so the outline lists the same messages in the same order.
A failed outline read left the rail on loaded messages until a new gap opened, the pane was shown again or the epoch changed. The client now rejects a failed read (a host without the outline still resolves to nothing, without being called), and the rail retries up to three times with doubling backoff.
…e result contract
…paging The rail forwards its wheel to the transcript, so a reader scrolling there is scrolling the transcript. That wheel never reached the scroller's reader-input handlers, so the jump kept paging and later pulled the reader to its target.
There was a problem hiding this comment.
ℹ️ No critical issues — one minor suggestion inline.
Reviewed changes
Reviewed the five commits pushed since the prior pullfrog review (a8ffe1abd2…ee7b8a75d6): the rail history jump rewritten as one abortable awaited loop, the host outline re-derived from the transcript's own projection, retry-with-backoff for a failed outline read, and the older-page result contract the shared page now carries.
- Abortable jump loop.
use-native-chat-rail-history-jumpis now one awaited loop per jump owning anAbortController; each step reads the rail from a commit made after the last page landed, and the loop stops on any non-appliedpage, a missing target, the 1000-page cap, or an abort from a later pick, any other navigation, reader input, a session switch, or unmount. - Outline from the transcript projection.
projectAgentSessionConversationOutlinenow runs the sharedprojectNativeChatTranscriptMessagesover the whole journal, so an outline entry matches the row the transcript draws (folded tool-result sidecars and observation order included) instead of a user-items-only reading; the parity test was extended with those shapes. - Outline read retry.
readStructuredAgentSessionConversationOutlinerejects instead of returning null, and the hook retries a rejected read up to three times with exponential backoff while never retrying a host that lacks the capability. - Older-page result contract.
loadEarlier/loadOlderreturnNativeChatOlderPageResult, share one in-flight page between concurrent callers (scroll-to-top, the button, a rail jump), and report supersession so a jump can tell "no progress" from a page it joined.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| [run] | ||
| ) | ||
|
|
||
| useEffect(() => abort, [abort, sessionKey]) |
There was a problem hiding this comment.
The loop's commit waiter is resolved by a layout effect, but the session-change abandonment is installed with a passive useEffect, so on a session switch the resumed loop can read the new session's committedRef — and page/jump against it — before this cleanup aborts. The file's contract is that a session change abandons the jump; installing this as a layout effect closes the ordering gap with a one-word change.
Technical details
# Session change can be observed by the jump loop before `abort()`
## Affected sites
- `use-native-chat-rail-history-jump.ts:130` — `useEffect(() => abort, [abort, sessionKey])` (passive)
- `use-native-chat-rail-history-jump.ts:49-56` — dependency-free `useLayoutEffect` that writes `committedRef` and resolves waiters in the same commit
- `use-native-chat-rail-history-jump.ts:73-98` — `run` reads `committedRef.current.items` right after `await nextCommit(signal)`
## Required outcome
When `sessionKey` changes while a jump is parked in `nextCommit`, the jump must abort before its continuation microtask reads `committedRef` (which the layout effect already repointed at the new session's rail). Otherwise the loop may call `loadEarlier`/`jumpToLoaded` for the new session. Observable only when the old target id also exists in the new session, since the loop bails when `railItemById` misses.
## Suggested approach
Use `useLayoutEffect` for the `abort` installer: it runs in the same synchronous commit as the waiter-resolving layout effect (cleanup aborts first), so the loop resumes with `signal.aborted` already true. Alternatively carry `sessionKey` in `committedRef` and bail at the top of each `run` pass when it no longer matches.
## Open questions for the human
Is the session-change path exercised anywhere while the loop is between pages? The suite covers abort/session change only while the loop awaits `loadEarlier`; `act()` flushes passive effects, so the production ordering is not reproduced.There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed one follow-up commit (26c278e3f3) pushed after the previous pullfrog review.
- Rail wheel cancels a paging jump.
NativeChatMessageRailalready forwards a wheel over itself to the transcript scroller (the rail overlays the transcript); it now also calls the reader-scroll callback, so a wheel there aborts a history jump still paging, matching the transcript's own wheel handler. The added test holds the first older page in flight, wheels the rail, and asserts the abandoned jump neither pages further nor pulls the reader to the target.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
…ges in Picking a message that is not loaded yet can take several pages of older history. The list closed on the pick, so its busy item was never seen and the click looked ignored. The list now stays open with that item pulsing until the jump lands or is abandoned, and stops revealing the lit row meanwhile so the rows do not move under the pointer.
There was a problem hiding this comment.
ℹ️ No new issues in this delta. The three prior minor notes remain open and are untouched by this commit, so approval is withheld; nothing here needs a fix.
Reviewed changes
Reviewed one commit (4b90119123) pushed after the previous pullfrog review.
- Rail list held open while a pick pages. Picking a message whose row is not loaded now keeps the hover list open with that item marked
aria-busyand pulsing until the history jump lands or is abandoned, instead of the click closing the list and hiding its own busy state; a loaded pick still closes it. The list also stops scrolling the lit row into view while a pick is pending, so a landed page shifting rows cannot move an item out from under the pointer. Tests cover the held-open/busy state, Escape closing it, the abandon-settles-pick path, and paging continuing on a wheel over the open list.
Verified locally: the two changed renderer test files pass (31 tests) and oxlint is clean on the three changed files.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
…obile The projection moved to src/shared, which mobile's Hermes engine also loads, and switching its sort to toSorted broke the Hermes compatibility guard. Sort a copy made with Array.from instead, as other shared code does.
There was a problem hiding this comment.
ℹ️ No new issues in this delta — the three prior minor notes remain open and are untouched, so approval is withheld; nothing here needs a fix.
Reviewed changes
Reviewed the one commit (7c86186615) pushed since the prior pullfrog review.
- Hermes-safe sort in the shared projection.
projectNativeChatTranscriptMessagessorts a copy (Array.from(messages).sort(compare)) instead ofmessages.toSorted(compare). Moving the projection intosrc/sharedput it in front of mobile's Hermes engine, and mobile'shermes-array-sorting-compatguard rejects.toSorted(undersrc/shared/. The copy-then-sort is equivalent, the tie-breaker onidmakes engine sort stability moot, and the comment's mention oftoSortedstays inert because the guard strips comments before matching.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏



ELI5
The strip of little ticks on the right edge of a chat has one tick per message you sent, plus a preview list on hover. It only knew about the messages the app had loaded so far, so in a long chat your older messages were simply missing. Now the host sends a short list of every message you sent, and the strip always covers the whole conversation. Clicking an older message that isn't loaded yet loads history until it's there, then scrolls to it.
What Changed
Before: the message rail was built only from the transcript rows loaded in the window. History loads in pages, so anything above the loaded window had no tick. The rail could also lose ticks during a long live turn, when the structured lane trims its oldest retained rows. And with only a couple of messages loaded, the rail didn't render at all, because it needs 3.
After (structured chat lane):
agentSession.conversationOutlinemethod returns every user message the transcript would draw. Each entry has the id, journal sequence, a preview cut to 200 characters, and an image count. The reply also carries the journal cursor it is current through. The outline is derived from the host's existing journal snapshot on each request, never stored. It runs the same projection the transcript runs: order, fold tool results into their turn, then strip harness-injected turns. That projection moved intosrc/shared/native-chat-transcript-projection.ts, and the renderer's list projection and the host both call it. So an outline tick exists exactly when the transcript would draw a row for that message.omittedEntries.loadEarliernow returns whether a page was applied, history ran out, or the load failed or was superseded. A second request while a page is loading joins that page instead of being refused. This applies to both chat lanes, and the scroll-to-top trigger and "Load earlier" button behave as before.Two scroll fixes turned up while testing the jump in the app. Both code paths are unchanged from main, but this PR makes them easy to hit:
Old hosts: the method is advertised as the runtime capability
agent-session.conversation-outline.v1. The client checks it through the existing runtime capability cache before calling. A host without it is never called, and the rail stays on loaded messages with no error. The prompt-cancel capability check now shares the same helper.Not covered: the terminal-transcript chat lane. Its host read works backward from the end of the transcript file and reads only the requested window. Listing every user message there would need a new indexed read on the host, which this PR doesn't build. That lane keeps showing loaded messages only; it adopts only the new older-page result contract.
Why
The rail's job is to be a map of the whole conversation. A map that silently leaves out the older part is wrong, not just incomplete. Paging has to stay: the transcript list only limits what is drawn, and a whole long history can't cross an SSH or paired-host connection in one message. So the rail needs its own small, complete source instead of borrowing the paged window.
Alternatives considered:
Linked Issue
None. Reported directly while using the native chat.
Visual Proof
Structured Claude chat with 8 sent messages. For the test, the history page size and the initial read size were both temporarily set to 6 (that edit is not in this PR). After a reload, only turns 7–8 are loaded.
Before (main): with only turns 7–8 loaded there is no rail at all, because two loaded messages is below its minimum of 3. After two "Load earlier" clicks, the list shows only the loaded turns 3–8.


After: with only turns 7–8 in the transcript, the rail has 8 ticks and the list shows all 8 messages with their exact text.

After: clicking unloaded turn 1 from the bottom keeps the list open with turn 1 busy while older pages load (captured 56 ms after the click)...

...then lands turn 1 flush with the top (row top equals scroller top, delta 0).

Testing
In-app on macOS, in a hidden dev window, using the structured Claude chat lane at
7c86186615. The history page size and initial read size were temporarily set to 6, so an 8-turn chat reloads with only turns 7–8 loaded. Results:Automated tests:
Tests fail without the fixes: each fix was checked by deleting it and confirming its test goes red for the stated reason.
Checks:
pnpm tc,check:code-quality:changed,check:react-doctor:changed, oxlint and the max-lines ratchet all pass. CI is green, including Mobile Checks, which scanssrc/sharedfor engine compatibility.Console: paging logs React
flushSync was called from inside a lifecycle methodfrom the list virtualizer measuring rows during commit. Main logs the same during "Load earlier"; this PR's longer jumps log it more times.Not tested: SSH or paired remote hosts end to end (covered by the capability check and the cross-version suite), Linux, Windows, and real 200-item pages.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Review
Known and left alone:
omittedEntriesisn't shown in the UI. Past roughly 20,000 user messages, the oldest ticks are dropped with no marker. The newest entries are kept.Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
agentSession.historyand returns a subset of what history already returns.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)