Skip to content

Show the terminal's loading state, not the empty prompt, while connecting - #598

Open
thiblahute wants to merge 1 commit into
powerfooI:mainfrom
thiblahute:upstream/loading-screen
Open

thiblahute wants to merge 1 commit into
powerfooI:mainfrom
thiblahute:upstream/loading-screen

Conversation

@thiblahute

Copy link
Copy Markdown
Collaborator

Summary

Show the terminal's loading state, not an empty prompt, during the first seconds of a page load.

Why

terminalNavigationLoading was only true once the connection was up and a navigation target was pending. While the bridge connected and until the first workspace list arrived, the terminal area showed an empty prompt, which reads as "nothing is here" rather than "still loading". The loading state itself comes from #130.

What changed

  • web/src/store.ts: terminalNavigationLoading is also true while the connection is connecting, and once connected until the first workspace refresh has landed (lastRefresh unset). Paused or failed connections still never spin.

Verification

  • bun test web/src/browserNavigation.test.ts: new test "initial connection and first workspace refresh stay in loading state"; fails on main. The existing "empty, removed, paused, disconnected and failed targets do not spin" still passes.
  • bun run format:check, bun run lint (only the existing TerminalView.tsx warning), bun run typecheck:bun, bun run build:web, bun run test:quick with an isolated HOME/TMPDIR.
  • Asset budget: initial JS 832.3/833 KiB, gzip 254.4/257 KiB.

Manual checks

  • Reload the page on a slow connection: the terminal shows its loading state until the workspaces appear, never a bare prompt.
  • Pause the connection: no spinner.

…ting

terminalNavigationLoading was only true once the connection was up and a
target was pending, so the first seconds of a page load showed an empty
terminal prompt. It now also holds while the connection is being made and
until the first workspace refresh has landed, unless the connection is
paused or failed.
@github-actions github-actions Bot added the enhancement New feature or request label Nov 18, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant