Skip to content

fix(chat): tie cached and press-read conversations to the pane's session - #2576

Merged
devswha merged 6 commits into
mainfrom
fix/conv-cache-session-bind
Nov 1, 2026
Merged

devswha merged 6 commits into
mainfrom
fix/conv-cache-session-bind

Conversation

@devswha

@devswha devswha commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

What

Ties every conversation answer that src/lib/api.ts caches or prefetches to the pane's session it was read for. Two HIGHs found in Codex Terra reviews of the merged PRs #2562 and #2545 are fixed:

  1. perf(chat): start an agent chat's first read when its tab or row is pressed #2562 (press-read prefetch): a press read answered for session A. herdr then moved the pane to session B, and the chat the click opened took A's answer with no new request. A stayed on screen until the next push or backstop, and the copied answer could pass as finish evidence.
  2. fix(chat): stop drawing turns again on a notice, a reopen or /clear #2545: a held from page of session A that answered after B's plain read overwrote the plain cache, so a chat opened again drew A.

How

  • api.ts keeps each pane's session as the roster names it: the herdr lifetime, the agent, and agent_session. observePaneSessions fills it at both roster entry points in useMachineRoster.ts, next to paneLifetimes.observe, so it is set before any chat renders from that roster. Panes the roster no longer lists drop their entry.
  • Each press read and cached answer records its session. A press read is taken, a cached page drawn (peekPaneConversation) or revalidated (ETag), and an answer kept only while the pane is still on that session.
  • A read whose pane moved to another session while it was in flight reads the newest page again, at most once, and the old answer is never cached. This holds even when a newer read already owns the cache.
  • A held (from) read also claims the plain page in lastNewestRead, so a plain read that starts later owns that page (fix(chat): stop drawing turns again on a notice, a reopen or /clear #2545).
  • A press read is started and taken only for a pane whose session herdr reports (agent_session); a pane without one asks the server on mount, as before perf(chat): start an agent chat's first read when its tab or row is pressed #2562.
  • From a PC's session-changed or pane-exited event until a roster whose read started after that event (the refetch the event schedules; a poll already out or a pushed roster does not count), reads of its panes are bound to a token of their own (paneSessionsMoving). An answer that arrives in that window is neither drawn nor taken for the session the roster names next.
  • A 409 for a session the pane has left no longer purges the new session's pages.
  • ChatView takes an agentSession prop (App → PaneTerminal → ChatView) and reads again as soon as the roster moves its pane to another session.

The normal case keeps #2562's speed win: when the session has not changed, the mount read takes the press read with no extra request. The existing press tests still pass; their fixture now names each pane's session, as herdr reports it for the agents it knows. A session change costs one extra read. Following the existing comment in PaneTerminal.tsx, the herdr session stays out of ChatView's key, so the binding only decides whether a cached answer may be reused.

The design follows the session-scoped caches of the Codex and Claude apps, where a thread's cached messages belong to that thread id and are never shown for another.

Not covered here (same as main before #2562; follow-up)

  • A read that crosses two session changes can return the middle session once.
  • The old timeline stays visible while a slow or failed read for the new session is in flight.

Reviews

  • omo code reviewer: APPROVE, no blockers. Its medium point was that the case where the roster arrives after the click had no test; it is now covered in the browser script.

  • Codex Terra 6.1 (xhigh), three passes:

    • Pass 1: all HIGHs fixed (read in flight while the session changes, the gap between the event and the roster) except the no-agent_session case, fixed in round 2 below. Its MEDIUM (herdr replacement and pane reuse) and LOW (stale 409 purge) are fixed.
    • Pass 2: the two HIGHs (a read overtaken by a newer one, reads within the event gap) are fixed.
    • Pass 3: its MEDIUM (retries without a bound) and LOW (ownership entries left after a failed read) are fixed. Its HIGH (a stale roster after the event) is fixed in round 2 below.
  • Merge pass (round 2): two remaining cases fixed exactly as asked: a pane with no agent_session now gets no press-read reuse, and a stale roster read before the event no longer clears the moving token. Codex Terra delta review: HIGH=0 MEDIUM=0 LOW=0.

Validation

  • Failing first. Each new test failed on the code before its fix:
  • Round 2: the no-agent_session and stale-roster cases (in the merge pass's ordering) fail on 7eeb9d0 and pass now.
  • bun test src/lib/conversationFetch.test.ts: 48 pass.
  • bun scripts/chat-history-browser-qa.ts (real React and Chromium, controlled HTTP timing): all PASS.
  • bun run check fast: green on the final commit.
  • Not run: check integration browser (CI runs it).

A press read answered for session A was taken by the chat a click opened after herdr moved the pane to session B, and a held page of session A that answered after B's plain read overwrote the page a chat opened again draws. Each conversation answer now carries the session the roster named for its pane when it was read: a press read is taken, a cached page drawn or revalidated, and an answer kept only while the pane is still on it, and a plain read started after a held one owns the plain page. The chat reads again when the roster moves its pane to another session.
…id-read

A read whose pane moved to another session while it was out now reads the newest page again for the current session instead of handing back the old one. A PC's session-changed or pane-exited event drops its press reads until the roster that names the new sessions arrives. A pane's session includes herdr's lifetime, and panes that leave the roster drop theirs. A 409 for a session the pane has left no longer purges the new session's pages.
…an overtaken read

From a PC's session-changed or pane-exited event until the roster after it, a read of its panes is bound to a token of its own, so an answer that arrives in between is neither drawn nor taken for the session the roster names next. A read whose pane moved to another session now reads again, also when a newer read already owns the cache.
@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between c47806a and 235a9ba.

Files selected for processing: 9
  • changelog.d/chat-session-bound-cache.md
  • scripts/chat-history-browser-qa.ts
  • scripts/chat-history-fixture.tsx
  • src/App.tsx
  • src/components/ChatView.tsx
  • src/components/PaneTerminal.tsx
  • src/lib/api.ts
  • src/lib/conversationFetch.test.ts
  • src/lib/useMachineRoster.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

Summary

Summary by CodeRabbit

  • Bug Fixes
    • Fixed chat history showing an outdated session when an agent moves to another session. Chats now refresh to show the current session, including when the change arrives while the chat is opening or is detected during a later update. Stale conversation results are no longer shown as the current session’s history.

Pane session identity now flows from machine rosters to chat views. Conversation reads and cached answers are tied to that session, with stale reads rejected or retried. Tests and browser QA cover session changes during reads and chat opening.

Changes: Chat session history

Layer / File(s) Summary
Track pane sessions and refresh chats
src/lib/api.ts, src/lib/useMachineRoster.ts, src/App.tsx, src/components/PaneTerminal.tsx, src/components/ChatView.tsx, scripts/chat-history-fixture.tsx, changelog.d/chat-session-bound-cache.md
Roster updates record pane sessions and mark sessions as moving after pane events. The pane’s session key reaches ChatView, which polls when the session changes without a pane ID change. The fixture exposes session updates, and the changelog describes the stale-session scenario.
Bind conversation reads and cache to sessions
src/lib/api.ts, src/lib/conversationFetch.test.ts, scripts/chat-history-fixture.tsx, scripts/chat-history-browser-qa.ts
Prefetches, cached answers, and conversation reads are checked against the pane’s reported session. Newest-page reads retry once after a session change, and stale answers are not cached. Unit tests and browser scenarios cover session changes during reads and chat opening.

Estimated code review effort: 4 (Complex) | ~45 minutes

Severity of issue fixed: Low

Possibly related issues

  • devswha/ovis#2314: The issue describes stale Letta session reporting that can make Chat show a conversation the pane has left. This change uses reported pane sessions to bind reads, but does not fix the stale Letta report.

Suggested reviewers: jpcarranza94, charleoyang

Merge Risk: Minimal · up to 235a9

No merge-blocking regression is established. Remote chats may briefly show prior-session history while a refreshed roster is pending.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 76.92% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: scoping cached and press-read conversations to the pane session.
Description check Passed The description explains the problem, implementation, limitations, review context, validation results, and skipped checks. It uses “What” and “How” instead of the template’s “Change” heading and does …
Linked Issues check Passed The only linked issue is #2562. It is closed, so it supplies background only. No active directly linked target remains, so no linked-issue coding requirements apply. The PR objectives state the same. …
Out of Scope Changes check Passed The changed files, per the summary, are src/lib/api.ts, src/lib/useMachineRoster.ts, src/components/ChatView.tsx, src/components/PaneTerminal.tsx, src/App.tsx, src/lib/conversationFetch.test.ts, scrip…
Full details: Description check

Explanation

The description explains the problem, implementation, limitations, review context, validation results, and skipped checks. It uses “What” and “How” instead of the template’s “Change” heading and does not explicitly state contract-test coverage, but it is otherwise complete and directly related to the change.

Full details: Linked Issues check

Explanation

The only linked issue is #2562. It is closed, so it supplies background only. No active directly linked target remains, so no linked-issue coding requirements apply. The PR objectives state the same. No requirement exists that this PR must satisfy, so none can fail.

Full details: Out of Scope Changes check

Explanation

The changed files, per the summary, are src/lib/api.ts, src/lib/useMachineRoster.ts, src/components/ChatView.tsx, src/components/PaneTerminal.tsx, src/App.tsx, src/lib/conversationFetch.test.ts, scripts/chat-history-browser-qa.ts, scripts/chat-history-fixture.tsx, and changelog.d/chat-session-bound-cache.md. All of them serve the stated purpose: binding cached, prefetched, and in-flight conversation reads to each pane's reported agent_session. This follows up the press-read prefetch from #2562 and the held-read overwrite described for #2545. The test and fixture changes support that behavior, and the changelog entry documents it. No change in the summary is unrelated. This verdict rests on the file summaries and PR description. No diff hunks were read.

Full details: Docstring Coverage

Explanation

Docstring coverage is 76.92% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 13 functions across 8 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@devswha

devswha commented Nov 1, 2026

Copy link
Copy Markdown
Owner Author

Merge-pass review of 7eeb9d0 (my repros from the Terra pass on #2562/#2545, plus a fresh Codex Terra xhigh pass on this PR):

Fixed: the late held page (#2545) no longer overwrites the newer plain cache, and a press read is no longer taken once the roster names the pane's new session (the mount read makes a second request and gets session B).

Still serves the wrong session (blocks 0.4.22 per the owner's bar):

  1. Limit 1, panes with no agent_session: reproduced. Press read answered for A, the agent switches to B, the roster still says agent_session: null: the mount read returns A with one request. Before perf(chat): start an agent chat's first read when its tab or row is pressed #2562 the mount read always asked the server, so this is a regression perf(chat): start an agent chat's first read when its tab or row is pressed #2562 introduced and this PR leaves. Smallest fix: take a press read (and skip the mount read) only when the pane's session key names an agent_session; a pane without one keeps main's behaviour (the mount read asks the server). Please add that case as a test.
  2. Limit 2, a stale roster right after the event: Terra shows a concrete ordering. session-changed queues a refresh while an earlier roster read is still running, and that older roster (still naming A) clears the moving token, so a press or a cached page of A is taken again until the next roster. Please keep the token until a roster that was read after the event (for example the refetch the event schedules) arrives, not any roster, and add a test for the stale-roster order.

Not blocking (same as main before #2562, follow-up only): a read that crosses two session changes returns the middle one once (Terra's #3); the old timeline staying visible while a slow or failed read for the new session is out (Terra's #4).

…PC's panes unknown until a roster read after its event

A pane whose agent_session herdr does not report can change conversation with nothing on the client changing, so no press read is started or taken for it: its chat asks the server on mount, as before #2562. A PC's event now keeps its panes' sessions unknown until a roster whose read started after that event arrives (the refetch it schedules); a poll that was out, or a pushed roster, no longer clears it.
@devswha

devswha commented Nov 1, 2026

Copy link
Copy Markdown
Owner Author

Merging into 0.4.22: ties every conversation answer the client caches or prefetches to the pane's session (herdr lifetime, agent, agent_session), fixing the two HIGHs the merge pass reproduced in the post-merge Codex Terra review: #2562's press read served session A after the pane moved to B, and #2545's late held page overwrote the newer plain cache with A.

Merge-pass review: re-ran both reproductions on 235a9ba. A press read is now taken only while the roster names the same session and that session has an agent_session; after a switch the mount read asks the server (session B, a second request); a pane without an agent_session asks the server on mount, as before #2562; the late held page leaves the cache on B. After a session-changed or pane-exited event, only a roster whose read started after the event clears the moving token, so an older poll or push can no longer bring back A. Codex Terra on 7eeb9d0 found the two remaining limits this round closes; its delta pass on 235a9ba is clean. Not blocking, filed with the #2562/#2545 follow-ups: a read crossing two session changes returns the middle one once, and the old timeline stays while a slow or failed read for the new session is out (both as on main before #2562). src/lib/conversationFetch.test.ts 48 pass.

@devswha
devswha merged commit b537877 into main Nov 1, 2026
22 of 24 checks passed
@devswha
devswha deleted the fix/conv-cache-session-bind branch November 1, 2026 23:26
@devswha devswha mentioned this pull request Nov 1, 2026
devswha added a commit that referenced this pull request Nov 2, 2026
…dupe

Merge main 2b62046. Folds #2554 (by @iwangjie), #2560, #2562 and #2564 (by @jpcarranza94), #2570, #2571, #2572 and #2575 (with their reporters), #2574, #2576, #2577 and #2578; deletes their fragments. IMPROVED summary: Quote replaces the spacing line, in en, ko, ja and zh.
devswha added a commit that referenced this pull request Nov 2, 2026
## Release 0.4.22

The release PR, prepared by step 1 of
[docs/development.md#releasing](https://github.com/devswha/ovis/blob/main/docs/development.md#releasing)
on main `41492320` (#2453 the last merge), refreshed to main `99a6671f`
(#2582 the last merge).

**Do not merge yet:** the owner tests main and judges the final build
before release. No tag and no Release run from this PR's author.

- **Version:** `version` is 0.4.22 in `package.json` and
`herdr-plugin.toml`.
- **Changelog:** `bun scripts/changelog-fold.ts 0.4.22` (2026-10-31,
local) folded 20 fragments into the 2026-10-31 section of `CHANGELOG.md`
(23 entries with the hand entry), linked their PRs and deleted the
fragments; `changelog.d` holds only `README.md`.
- `by @login` on every outside contributor's PR link: #2453 @jokkopucko,
#2452 @jokkopucko, #2442 @nahwan-kim, #2463 @zerodice0, #2468
@Yoonwoo-Ha, #2065 @rabbitson87 (both entries), #2466 @jpcarranza94,
#2467 @jpcarranza94, #2457 @YuuuXie, #2420 @cheol-95 (both entries),
#2459 @Haeminway1, #2450 @briantcl1992, #2448 @briantcl1992.
- One outside PR had no fragment and got an entry by hand: #2448
(installer test no longer finds the host's Node, Maintenance).
- Issue reporters: #2442's entry credits @Ploppy3, who asked for
herdr-core support in #2439. The other fixed issues were filed by the
PR's own author (#2460 @zerodice0, #2464 @jpcarranza94, #2419 @cheol-95,
#2089 @rabbitson87) or the maintainer (#2444), so the PR credit covers
them.
- Two fragments ran past the changelog's width (#2443, #2446); their
entries are re-wrapped, words unchanged.
- Folded after the PR opened (merge of main `653613cb`, by hand per the
release steps): #2474 (Pi Chat message with leading/trailing spaces, a
tab or a trailing `@mention` no longer stuck "waiting for transcript",
Fixed), credited `reported by @BeerBelly69` (he reported issue #2454;
the PR is the maintainer's, so the earlier `by @BeerBelly69` was
corrected in `90536524`). Its fragment is deleted; `changelog.d` holds
only `README.md`. The release summaries are unchanged: their fixed list
is already at five lines.
- Folded in a second refresh (merge of main `98c1f5e0`, by hand): #2475
(a reconnecting or reloading browser gets back its follow-up's lost
"sent" receipt, Fixed), credited `reported by @christso`, who filed
#2421 and proposed the approach. Its fragment is deleted; `changelog.d`
holds only `README.md`. The release summaries are unchanged (fixed list
already at five lines).
- Folded in a third refresh (merge of main `af20e0a4`, by hand): #2490
(Chat keeps its messages mounted when the pane's skill names load, so a
decoded image no longer drops back to its loading slot, Fixed), credited
`by @nocstah` (outside PR, no linked issue); #2483 (a Copilot turn stays
whole when its pictures pass the page window, Fixed); #2479 (Chat shows
the pictures in a Copilot CLI session, Added); #2482 (Chat shows the
picture attached to a Hermes prompt, Added). #2483, #2479 and #2482 are
maintainer PRs; #2483's issue #2478 is the maintainer's, so no reporter
credit. #2480 (site only) had no fragment. Their fragments are deleted;
`changelog.d` holds only `README.md`. The release summaries are
unchanged: the fixed list is already at five lines, and the two new
picture features stay in the changelog only (the new list has room for
them if the owner wants them there).
- Folded in a fourth refresh (merge of main `4ca7d24d`, by hand): #2481
(Grok pictures in Chat), #2477 (svg figures, `reported by @affeek`, who
filed #2441 and co-authored the PR), #2498 (dollar math, `reported by
@kjohnsen`, #2407), #2484 (Expand thinking / Collapse work defaults,
`reported by @altgans and @Ploppy3`, #2346 and #2228) under Added; #2494
(`by @todor-a`), #2491 (`by @nocstah`), #2487, #2486, #2472 (`reported
by @matiemer`, #2462) and #2476 (relay session uses the server's port)
under Fixed. 10 fragments deleted; `changelog.d` holds only `README.md`.
Every entry's credit was re-checked with GraphQL (PR author, closing
issues' authors, commit authors): #2487's #2374, #2486's #2485 and
#2483's #2478 are the maintainer's, so no reporter credit.
- Folded in a fifth refresh (merge of main `f5370d54`, by hand): #2503
(Claude question card steps and Back, `reported and co-authored by
@jpcarranza94`, who filed #2465 and co-authored the fix), #2502 (tab
name from its first message, `reported by @vibewriter-hand`, #2019) and
#2505 (a note on a diff line goes into the next message; #1603 is the
maintainer's, so no credit) under Added; #2506 (OmO, Codex and Hermes
question cards move between questions without answering; it closes no
issue, so no credit) under Fixed. 4 fragments deleted; `changelog.d`
holds only `README.md`. #2499's hand-written relay entry is kept. All
four PRs are the maintainer's; credits re-checked with GraphQL (PR
author, closing issues' authors, commit authors).
- Sixth refresh (merge of main `feb3ae09`, head `e3b0dc37`): main had no
fragment left to fold. #2504 (the owner's PR, no fragment) gets a hand
entry under Added next to #2499's: the PC side of the relay, which
answers the relay's server proof, `/api/relay` start/stop routes
restricted to the owner and to direct connections, and a relay QR from
`plugin pair`; off by default with no Settings switch yet. No credit
(maintainer PR). It stays out of the release summaries (off by default,
no UI).
- Seventh refresh (merge of main `a683e3ff`, head `7855c73c`): folded
#2509's two fragments by hand, two entries under Added (the phone side
of the relay: the hosted shell that pairs from the PC's relay QR and
opens the app end-to-end encrypted; files and chat images through the
relay) and one under Fixed (the iOS and Android apps no longer show the
hosted shell's home-screen hint). Each says the relay is off by default.
#2499's entry now says Ovis uses the relay only once a PC's relay link
is started. No credit (maintainer PR). The fragments are deleted;
`changelog.d` holds only `README.md`. The relay stays out of the release
summaries.
- Eighth refresh (merge of main `0b215abf`, head `f76f3ae4`): folded
#2514's three fragments by hand under Fixed (relay connection limits and
the 30 s wait for an absent PC, proof of the PC's relay key, the hosted
shell's copy-on-select and relay-control requests) and added a hand
entry for #2514 under Added: remote access through the Ovis relay can be
turned on in **Settings → Phone & devices** (off by default), with the
iOS and Android apps opening a relay-paired PC from its link;
app.ovis.sh is deployed separately. #2499, #2504 and #2509's entries no
longer say there is no Settings switch: they now say the relay is turned
on in Settings. No credit (maintainer PR). Also folded #2511 (Claude
task-list scan on file workers, Fixed, `by @duytbp`) and #2518 (feedback
typed on Claude Code's plan card keeps Claude planning, Fixed, `by
@jpcarranza94`, who also reported #2517, so no separate reporter
credit). #2515 is docs only, no fold. 5 fragments deleted; `changelog.d`
holds only `README.md`.
- Ninth refresh (merge of main `fbb97b62`, head `44048d5f`, fold in the
merge commit): folded 23 fragments by hand: 7 entries under Added
(#2514's rewritten relay-identity entry, which replaces its old Fixed
entry about the PC's relay key; #2519 Letta model pill `by @homebodify`;
#2522 relay bulk window and the relay overview, self-hosting and
hosted-shell attestation; #2524 DeepSeek Harness in the catalog), 3
under Changed (#2533 Connect a phone dialog and the `tailscale serve`
box; #2539 chat pictures shown whole) and 26 under Fixed: #2508; #2512
`by @lifeofpi-ux`; #2516; #2521, #2526, #2531, #2538, #2541, #2543,
#2545, #2547, #2549 and #2551 `by @jpcarranza94`; #2527 `reported by
@duytbp` (#2510); #2532; #2535 `reported by @devtm1123` (#2513). #2532's
#2523 is the maintainer's; @jpcarranza94's issues (#2525, #2537, #2540,
#2542, #2544, #2546, #2548, #2550) are covered by his PR credit. #2529
(perf) is not merged and stays out of 0.4.22. 23 fragments deleted;
`changelog.d` holds only `README.md`.
- Tenth refresh (merge of main `afdfb1e0`, head `1cfcfab7`, fold in the
merge commit), on the owner's OK for both: folded #2567 (Connect a phone
shows three choice cards and opens on the relay whenever it is offered,
with the relay's switch on its card on a tailnet; maintainer PR, no
credit) under Changed and #2555 (the New workspace folder picker's
compact row; `by @iwangjie`, no linked issue) under Fixed. 2 fragments
deleted; `changelog.d` holds only `README.md`. The IMPROVED summary line
now says the relay needs no Tailscale, in en, ko, ja and zh.
- Eleventh refresh (merge of main `2b620462`, head `13fa0181`, fold in
the merge commit), on the owner's go for each: folded 13 entries from 12
fragments by hand. Changed: #2562 (a chat starts loading when the press
begins, `by @jpcarranza94`), #2574 (Quote a selection into the message
box), #2578 (the relay's switch, reset and failures only in Connect a
phone). Fixed: #2564 and #2560 (two entries) `by @jpcarranza94`; #2554
`by @iwangjie`; #2577; #2576 (the session-bound conversation cache,
fixing the two HIGHs the post-merge Codex Terra review reproduced in
#2562 and #2545); #2572 `reported by @rkqksk` (#2557); #2570 `reported
by @nathanvale` (#2566); #2571 `reported by @altgans` (#2568); #2575
`reported by @matiemer` (#2558). @jpcarranza94's own issues (#2559,
#2561, #2563) are covered by his PR credit. 12 fragments deleted;
`changelog.d` holds only `README.md`. IMPROVED summary: "Select words in
a Chat reply to quote them into your message." replaces the spacing
line, in en, ko, ja and zh.
- Twelfth refresh (merge of main `64ae5e72`, head `3ae2133e`), on Dori's
go: folded #2580 under Fixed (the Cloudflare relay closes both ends of a
pair after a frame send fails, so they reconnect at once; maintainer PR,
no credit) and deleted its fragment. #2579 (guide only) has no fragment.
Summaries unchanged.
- Thirteenth refresh (merge of main `99a6671f`, head `aebaabbf`), on
Dori's go: folded #2582 under Fixed (`by @iwangjie`: the folder picker's
Show hidden waits for a loading folder; the path bar wraps at very
narrow widths) and deleted its fragment. Summaries unchanged.
- Maintainer PRs without a fragment and without a user-facing change
have no entry: #2436 (relay crypto/mux foundations, not wired yet),
#2445 (CI contract test against a pinned hc).
- **Release summaries:** en, ko, ja and zh each have 8 new, 8 improved
and 8 fixed lines (8 is the most a list the app reads may hold, 90
characters a line). New: remote access through the Ovis relay, turned on
in Settings (off by default), with app.ovis.sh shipping separately
(#2514); pictures in Chat for Copilot, Grok and Hermes (#2479, #2481,
#2482); svg figures (#2477); math with dollar signs (#2498); Portal
sign-in with watch-only visitors (#2065); DeepSeek Harness in Settings →
Agents with its conversations in Chat on Linux (#2524, #2453); tab names
from the first message (#2502); notes on diff lines (#2505). Improved:
Expand thinking / Collapse work defaults (#2484), Chat spacing that
follows the font size (#2491), key bar drag reorder (#2463), same-host
links in an in-app popup on phones (#2459), Claude question cards with
steps and Back (#2503), OmO, Codex and Hermes cards with Back and Next
(#2506), one Connect a phone dialog (#2533), pictures shown whole
(#2539). Fixed: panes again on Safari 16.4–17.3 and iOS 16.4+ (#2535),
Stop with a queued follow-up keeps the stopped message (#2547), a first
message reaches Claude Code (#2526), Codex Chat after a finished answer
(#2443), question cards show at once and stay (#2543), Chat no longer
redraws turns or jumps (#2538, #2545), a setting kept across a quick
reload (#2487), Claude's plan card in narrow panes (#2541). Moved to the
changelog only to fit the 8-line lists: Codex behind Kiro (#2420), Pi
messages with spaces (#2474), the Claude question card between questions
(#2466, #2467, now covered by the question-card line), short-phone
overlap (#2494), cross-tab settings (#2486), the Antigravity note
(#2472), plus the subagent poll perf (#2527), relay transport (#2516),
herdr-core no-watch (#2512) and the other Fixed entries above.
- **Remote bundle:** `REMOTE_BUNDLE_VERSION` rises from 40 to 41 because
the bundle inputs (`server/`, `shared/`, `bun.lock`) changed since
remote-v40. After merge: push `remote-v41` on the merged commit and wait
for the Remote PC bundles workflow before running Release.
- **Telemetry:** `telemetry/worker.ts` and `shared/telemetry.ts` are
unchanged since `telemetry/deployed.json`; no Worker deploy.

## Validation

- `bun scripts/release-guards.ts --base v0.4.21`: before the bump it
asked to raise `REMOTE_BUNDLE_VERSION` from 40 to 41 and nothing else;
after it, "Release 0.4.22: remote bundle, telemetry Worker and release
metadata are in order."
- `UNIT_TEST_WORKERS=4 dori heavy rel0422 -- bun run check fast` on this
branch: workflow syntax, generated types and themes, typecheck, build,
unit tests all ok. Unit: 9827 pass, 0 fail, 41 skip in 623 files.
- After folding #2474 (head `3de63b49`): `bun scripts/release-guards.ts
--base 653613c` "Release 0.4.22: remote bundle, telemetry Worker and
release metadata are in order."; `UNIT_TEST_WORKERS=4 dori heavy
refresh2473 -- bun run check fast` all ok, unit 9827 pass, 0 fail, 41
skip in 623 files.
- After folding #2475 and correcting the #2474 credit (head `90536524`):
`bun scripts/release-guards.ts --base 653613c` "Release 0.4.22: remote
bundle, telemetry Worker and release metadata are in order.";
`UNIT_TEST_WORKERS=4 dori heavy refresh2473b -- bun run check fast` all
ok, unit 9851 pass, 0 fail, 41 skip in 623 files.
- After folding #2490, #2483, #2479 and #2482 (head `0da3756d`;
`e6eb7df6` removed the fragments and `0da3756d` adds their CHANGELOG
entries, which that commit left out): `bun scripts/release-guards.ts
--base 98c1f5e` "Release 0.4.22: remote bundle, telemetry Worker and
release metadata are in order."; `UNIT_TEST_WORKERS=4 dori heavy
refresh2473c -- bun run check fast` all ok, unit 9855 pass, 0 fail, 41
skip in 623 files (with `TMPDIR` off the quota'd `/tmp` tmpfs; an
earlier run with the default `TMPDIR` hit `EDQUOT` there).
- After the fourth refresh (head `af31fa98`): `bun
scripts/release-guards.ts --base v0.4.21` and `--base origin/main` both
"Release 0.4.22: remote bundle, telemetry Worker and release metadata
are in order." main still has `REMOTE_BUNDLE_VERSION` 40 (no commit
since v0.4.21 touches it) and `remote-v41` is not tagged yet, so this
PR's 41 stays the one raise. `UNIT_TEST_WORKERS=4 dori heavy rel2473 --
bun run check fast` all ok, unit 9973 pass, 0 fail, 41 skip in 624
files.
- After the fifth refresh (head `b602a998`, merge of main `f5370d54`):
`bun scripts/release-guards.ts --base v0.4.21` and `--base origin/main`
both "Release 0.4.22: remote bundle, telemetry Worker and release
metadata are in order." (`REMOTE_BUNDLE_VERSION` stays 41).
`UNIT_TEST_WORKERS=4 dori heavy rel2473c -- bun run check fast` all ok,
unit 10107 pass, 0 fail, 41 skip in 631 files.
- After the sixth refresh (head `e3b0dc37`, merge of main `feb3ae09`):
`bun scripts/release-guards.ts --base v0.4.21` and `--base origin/main`
both "Release 0.4.22: remote bundle, telemetry Worker and release
metadata are in order." (`REMOTE_BUNDLE_VERSION` stays 41).
`UNIT_TEST_WORKERS=4 dori heavy rel2473d -- bun run check fast` all ok,
unit 10123 pass, 0 fail, 41 skip in 632 files.
- After the seventh refresh (head `7855c73c`, merge of main `a683e3ff`):
`bun scripts/release-guards.ts --base v0.4.21` and `--base origin/main`
both "Release 0.4.22: remote bundle, telemetry Worker and release
metadata are in order." (`REMOTE_BUNDLE_VERSION` stays 41).
`UNIT_TEST_WORKERS=4 dori heavy rel2473e -- bun run check fast` all ok,
unit 10314 pass, 0 fail, 41 skip in 644 files.
- After the eighth refresh (head `f76f3ae4`, merge of main `0b215abf`):
`bun scripts/release-guards.ts --base v0.4.21` and `--base origin/main`
both "Release 0.4.22: remote bundle, telemetry Worker and release
metadata are in order." #2514's and #2511's `server/` changes land
before `remote-v41` is tagged, so `REMOTE_BUNDLE_VERSION` stays 41.
`UNIT_TEST_WORKERS=4 dori heavy rel2473g -- bun run check fast` all ok,
unit 10363 pass, 0 fail, 41 skip in 649 files.
- After the ninth refresh (head `44048d5f`, merge of main `fbb97b62`):
`bun scripts/release-guards.ts --base v0.4.21` and `--base origin/main`
both "Release 0.4.22: remote bundle, telemetry Worker and release
metadata are in order." (`REMOTE_BUNDLE_VERSION` stays 41; `remote-v41`
is not tagged yet). `UNIT_TEST_WORKERS=4 dori heavy rel2473 -- bun run
check fast` all ok, unit 10511 pass, 0 fail, 41 skip in 654 files;
`server/release-notes.test.ts` and `src/lib/updateNotes.test.ts` 52
pass.
- After the tenth refresh (head `1cfcfab7`, merge of main `afdfb1e0`):
`bun scripts/release-guards.ts --base v0.4.21` and `--base origin/main`
both "Release 0.4.22: remote bundle, telemetry Worker and release
metadata are in order." (`REMOTE_BUNDLE_VERSION` stays 41; both PRs are
client-only). `UNIT_TEST_WORKERS=4 dori heavy rel2473j -- bun run check
fast` all ok, unit 10511 pass, 0 fail, 41 skip in 654 files;
`server/release-notes.test.ts` and `src/lib/updateNotes.test.ts` 52
pass.
- After the eleventh refresh (head `13fa0181`, merge of main
`2b620462`): `bun scripts/release-guards.ts --base v0.4.21` and `--base
origin/main` both "Release 0.4.22: remote bundle, telemetry Worker and
release metadata are in order." (`REMOTE_BUNDLE_VERSION` stays 41;
`remote-v41` is not tagged). `UNIT_TEST_WORKERS=4 dori heavy rel2473k --
bun run check fast` all ok, unit 10551 pass, 0 fail, 41 skip in 656
files; `server/release-notes.test.ts` and `src/lib/updateNotes.test.ts`
52 pass.
- After the twelfth refresh (head `3ae2133e`, merge of main `64ae5e72`):
both release guards "in order" (`--base v0.4.21` and `--base
origin/main`); `UNIT_TEST_WORKERS=4 dori heavy rel2473l -- bun run check
fast` all ok, unit 10553 pass, 0 fail, 41 skip in 656 files;
release-notes tests 52 pass.
- After the thirteenth refresh (head `aebaabbf`, merge of main
`99a6671f`): both release guards "in order" (`--base v0.4.21` and
`--base origin/main`); `UNIT_TEST_WORKERS=4 dori heavy rel2473m -- bun
run check fast` all ok, unit 10553 pass, 0 fail, 41 skip in 656 files;
release-notes tests 52 pass.
- Not run: `bun run check full` (integration and browser), left to CI;
no hands-on test of main, which is the owner's.

This is a release-metadata PR: it changes no code path. Per the release
steps, merge it after CI and the owner's go, then push `remote-v41`,
wait for its bundles, and run Release with `0.4.22`.






 [exit 0]
devswha added a commit that referenced this pull request Nov 2, 2026
## Change

Returning to a chat can wait for a request started before the chat was
hidden. Recent tabs stay mounted, but `ConversationRefresh.stop()`
previously stopped timers without cancelling the active read, leaving
the serial read lane occupied until the old request or its 15-second
local / 30-second remote deadline settled.

Tie newest-page, gap-fill, older-page and terminal-fallback reads to the
visible screen's lifetime. Hiding or replacing the screen cancels that
lifetime, including when the transport ignores abort, so the next
visible read can start promptly. A pending press-read prefetch transfers
its cancellation ownership to the one screen that takes it. Cancellation
also reaches the existing single session-change retry.

Preserve #2576's pane/session cache ownership, stale-409 protection and
bounded session retry. Signals are transport-only; there are no new
HTTP/WS fields, settings, dependencies or server changes.

The lifecycle design follows the effect-owned fetch cancellation in
[Paseo's
DocumentFrame](https://github.com/getpaseo/paseo/blob/7efa14238d0d95e814fc68b82584ca1deab1a456/packages/app/src/file-panels/document-frame/index.web.tsx#L14-L28),
applied to Ovis's existing mounted-chat behavior from #1061. No code or
visual assets were copied.

## Validation

- `bun test src/lib/chatReadDeadline.test.ts
src/lib/conversationFetch.test.ts src/lib/api.test.ts
src/components/ChatFallback.test.ts`: **80 passed, 0 failed**. The same
four files also passed inside the full-fast attempt.
- Failing first: with the original `64ae5e72` scheduler/deadline
helpers, the controlled-clock regression fails because the replacement
reader never starts while the obsolete request is held. The candidate
passes that same case.
- `bun scripts/chat-history-browser-qa.ts`: the new same-mounted-key
hide/return cases passed at 390px (83ms) and 1440px (69ms), with the
obsolete HTTP request cancelled and fresh rows visible before it was
released. These are controlled React/Chromium fixtures, not device or
WAN timings. **The whole existing script is not green:** its later
`.chat-new-messages` wait times out identically on the original
`64ae5e72` source and the candidate; assertions and timeouts were not
relaxed.
- `bun run check fast`: generated types/themes, typecheck and production
build passed. **The unit gate did not pass.** There were failures in 15
files outside this patch; the final `server/usage-login-private.test.ts`
process stalled for over five minutes and was interrupted through the
check runner after the other 655 of 656 files completed. Owned recorded
descendants were confirmed gone.
- Focused checks on the original `64ae5e72` source reproduced **22 of
the 23 named failures** from those 15 files. The additional
`server/remote-entry.test.ts` case, `reclaims a startup lock whose PID
another process now holds`, passed in the focused baseline and remains
unexplained here. The original private-login file also exceeded a
bounded 20-second comparison. These checks use the same Bun/dependencies
but `check run` adds isolated XDG/config/state, whereas `fast` runs unit
tests with the plain allowlisted environment; this is not an
identical-environment full-suite comparison.
- Environment: macOS arm64, Bun 1.4.2, Node 26.9.0. The runner warned
that CI uses Node 22. Workflow syntax was automatically skipped on macOS
because actionlint is pinned for Linux x64.
- Not run: `check full`, the full integration/browser lanes,
WebKit/physical iPhone or native Windows checks.

<details>
<summary>Files with local unit failures outside this patch</summary>

```text
server/codex-processes.test.ts
server/session-history.test.ts
server/codex.test.ts
scripts/check.test.ts
scripts/self-hosted-runner.test.ts
server/statusline-install.test.ts
server/letta.test.ts
scripts/install-star.test.ts
scripts/shell-deploy-workflow.test.ts
scripts/ci-browser.test.ts
server/remote-entry.test.ts
scripts/shell-preview-workflow.test.ts
scripts/ci-browser-parallel.test.ts
server/core/composer-framing.test.ts
scripts/relay-ios-sim.test.ts
```

</details>

AI tools assisted implementation and static review.

---------

Co-authored-by: June K <[email protected]>
Co-authored-by: devswha <[email protected]>
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.

1 participant