Skip to content

Say "Connecting…" only when connecting is slow - #12

Merged
Lakr233 merged 1 commit into
mainfrom
issue-7-delayed-connecting
Sep 25, 2026
Merged

Lakr233 merged 1 commit into
mainfrom
issue-7-delayed-connecting

Conversation

@Lakr233

@Lakr233 Lakr233 commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

Reopening the app a few seconds after closing it flashed "Connecting to the
inspector service…" for a few hundred milliseconds: long enough to see, too
short to read. The spinner went up the moment the phase turned to
.connecting, however quickly the daemon answered.

DelayedLoadingIndicator keeps the time instead. A wait that ends inside
three quarters of a second shows a blank list and then the rows; a wait that
runs longer shows the indicator, which then stays at least half a second so
it doesn't blink off, and rows that land in that half second are drawn when
it ends. A failure or an empty result never waits: it replaces the
indicator, or the blank, at once. The wait for the first sample after
connecting counts too, so a slow connection no longer drops from the
spinner to an empty list before the rows arrive.

The detail tables had the same flash on every push while their records
loaded, and use the same indicator. Because the indicator now turns up on a
screen that is already showing, VoiceOver is told the layout changed.

The first sample itself is not delayed: firstSampleDelay is the gap
before the second one, which is what CPU use needs. make harness now
steps the indicator through its grace period, minimum time, failure and
retry on macOS.

Fixes #7

🤖 Generated with Claude Code

Reopening the app a few seconds after closing it flashed "Connecting to the
inspector service…" for a few hundred milliseconds: long enough to see, too
short to read. The spinner went up the moment the phase turned to
`.connecting`, however quickly the daemon answered.

DelayedLoadingIndicator keeps the time instead. A wait that ends inside
three quarters of a second shows a blank list and then the rows; a wait that
runs longer shows the indicator, which then stays at least half a second so
it doesn't blink off, and rows that land in that half second are drawn when
it ends. A failure or an empty result never waits: it replaces the
indicator, or the blank, at once. The wait for the first sample after
connecting counts too, so a slow connection no longer drops from the
spinner to an empty list before the rows arrive.

The detail tables had the same flash on every push while their records
loaded, and use the same indicator. Because the indicator now turns up on a
screen that is already showing, VoiceOver is told the layout changed.

The first sample itself is not delayed: `firstSampleDelay` is the gap
before the second one, which is what CPU use needs. `make harness` now
steps the indicator through its grace period, minimum time, failure and
retry on macOS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Lakr233
Lakr233 merged commit 5725c09 into main Sep 25, 2026
1 check passed
@Lakr233
Lakr233 deleted the issue-7-delayed-connecting branch September 25, 2026 13:08
@Lakr233 Lakr233 mentioned this pull request Sep 25, 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.

冷启体验优化

1 participant