{{ message }}
Repository navigation
fix(app): calm loading state for Home sessions - #57679
Merged
Merged
Conversation
kitlangton
force-pushed
the
home-loading
branch
from
October 21, 2026 08:24
0263cca to
47a1058
Compare
kitlangton
added a commit
that referenced
this pull request
Oct 21, 2026
This was referenced Oct 21, 2026
kitlangton
added a commit
that referenced
this pull request
Oct 21, 2026
kitlangton
force-pushed
the
home-loading
branch
from
October 21, 2026 15:54
47a1058 to
ea3ebf9
Compare
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.

Home showed a "Loading" heading over four dark slabs while its session list loaded, sometimes for several seconds.
Why it was slow
Home's list is one request per server:
GET /api/session?limit=5000&order=desc&parentID=null. On a real database with about 1,900 sessions the server answers it in 2–30 ms. The wait happened in the client:gcTime, so going back to Home after working in a session for a while started again from an empty list and showed the loading state.server thrashing detected(a request waiting more than 2 s for a slot) every 10 s.Changes
gcTime: Infinityon the Home session query (the index is already bounded per directory). Going back to Home shows the last list right away and refreshes it in the background.GET /api/sessiontakes the next free slot ahead of queued requests. Other requests keep their order, and the 4-slot limit is unchanged.bg-layer-02on the base surface, with a slow highlight that sweeps in reading direction (reversed in RTL) and is turned off under reduced motion.Measurements
Mock server, production build, headless Chromium. Times are measured in the page.
Proof
Before is on the left and After on the right. Each clip uses a delayed session-list response in the mock app.
First open, list answers in 1.5 s
open-1500.mp4
First open, list answers in 100 ms
open-100.mp4
Back to Home after 6 minutes, list answers in 1.5 s
return-1500.mp4
Home from a session after restart, server busy (other reads take 800 ms)
start-busy.mp4
Switching projects. The list is already loaded, so there is nothing to wait for and no dimmed previous list to keep.
switch.mp4
Crossfade, frame by frame (animations paused when the list arrives, then stepped 8 ms at a time; about 8× slower)
crossfade-8x-slow.mp4
The headless screencast captures about 5 frames per second, so the real-time clips step. The frame-by-frame clip shows the actual transition.
bun run lint:changed origin/betastill reports 5 findings, all on lines this PR does not touch:request-queue.ts:43,request-queue.test.ts:12,157,175andview.tsx:46.