Conversation
helix4u
marked this pull request as ready for review
August 27, 2026 23:35
helix4u
marked this pull request as draft
August 27, 2026 23:44
helix4u
marked this pull request as ready for review
August 27, 2026 23:49
This was referenced Aug 28, 2026
helix4u
force-pushed
the
feat/desktop-session-resume-fast-path
branch
from
August 28, 2026 10:18
7032df9 to
6a7d804
Compare
5 tasks
Collaborator
Author
helix4u
force-pushed
the
feat/desktop-session-resume-fast-path
branch
from
August 29, 2026 03:31
6a7d804 to
f217472
Compare
Collaborator
|
Thanks — reviewed against current origin/main. Main already paints the durable transcript-tail cache on cold resume (f8767d1 / #89206, profile-scoped by #94828): transcript visible at ~1.43-1.48 s, under the boot overlay until ≥2.1 s, so a pre-boot prepaint cannot be seen. The early setMessages()/$selectedStoredSessionId claim from a useLayoutEffect also bypasses the persisted-display provenance gate (b6eb17d), and the prefetched-REST early paint landed via #101227. Closing as redundant. |
4 tasks done
8 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What does this PR do?
Desktop can already have the exact remembered session's bounded transcript snapshot before backend/profile hydration and
session.resumefinish binding a live runtime. Without an early navigation claim, the cold/route can expose a usable fresh composer during that window and later replace what the user was doing when remembered navigation resolves.This claims remembered navigation before first paint, restores only the exact connection/profile-scoped transcript snapshot, and keeps that presentation provisional until the live session list validates ownership. Cached text may remain visible while the runtime binds, but the composer and fresh-session intro remain unavailable until the remembered route owns a live runtime.
Current
mainalso keeps the loader visible when the session list says a routed session has history but no display-authoritative transcript has arrived. The rebased implementation preserves that behavior: a brand-new routed draft with a bound runtime may be empty, while known history, route mismatch, missing runtime binding, or unresolved remembered navigation remains pending. The transcript loader is suppressed only when cached text is already visible; the composer gate remains active.The explicit last-opened session is authoritative when a torn shutdown left the remembered route and session ID disagreeing. The route is healed only after live validation. Cached text never creates or impersonates a runtime, and stale, missing, cross-profile, or unnameable remote targets fail closed and clear only the provisional paint.
Desktop performance series
This change is one independently reviewable layer of the same Desktop startup and first-interaction performance pass.
hermes serveentry path.This PR owns remembered-session presentation and pending-runtime gating. It does not change backend startup, session-list caching, transcript snapshot bounds, or Bot Mode roster behavior.
Related Issue
None.
Type of Change
Changes Made
/cannot expose a competing fresh composer before session hydration.session.resumebind the runtime.How to Test
apps/desktop, runnpx vitest run --project ui --maxWorkers=4 src/app/contrib/hooks/use-desktop-integrations.test.tsx src/app/session/hooks/use-route-resume.test.tsx src/app/chat/index.test.tsx src/app/chat/thread-loading.test.ts.npm run typecheck.Expected result: the exact scoped cached transcript can paint before live hydration; cached text stays visible while runtime binding is pending; the composer remains gated; known-history sessions do not flash blank; new empty drafts remain usable after runtime binding; and invalid ownership fails closed.
Focused result: 4 Vitest files passed with 56 tests. Desktop renderer, Electron, and E2E typechecks passed. Affected-file ESLint and
git diff --checkpassed.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passThe Python suite was not run because this is a renderer-only change.
Documentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
Not applicable. This changes loading behavior without changing the visual design.