Repository navigation
Show the terminal's loading state, not the empty prompt, while connecting - #598
Open
thiblahute wants to merge 1 commit into
Open
thiblahute wants to merge 1 commit into
thiblahute wants to merge 1 commit into
Conversation
…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.
This branch has not been deployed
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.
Summary
Show the terminal's loading state, not an empty prompt, during the first seconds of a page load.
Why
terminalNavigationLoadingwas 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:terminalNavigationLoadingis also true while the connection isconnecting, and once connected until the first workspace refresh has landed (lastRefreshunset). 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 onmain. The existing "empty, removed, paused, disconnected and failed targets do not spin" still passes.bun run format:check,bun run lint(only the existingTerminalView.tsxwarning),bun run typecheck:bun,bun run build:web,bun run test:quickwith an isolatedHOME/TMPDIR.Manual checks