You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(desktop): keep the browser address visible while loading - #9883
Entering a URL in an empty browser pane replaces the address with the empty placeholder until navigation commits. On a slow response, this makes the entered URL disappear while the page is still loading.
Keep a transient pending address for the toolbar. Committed URLs continue to drive history, persistence, and page actions. A main-frame commit displays the actual destination, including redirects; completing or aborting a load clears its pending address. An older aborted request cannot clear a newer attempt, even when both use the same URL.
Refs #8145, specifically the address loss during pending navigation. CLI pane registration succeeded in this reproduction.
How I tested it
Automated CDP mouse/keyboard input against an isolated dev desktop (renderer localhost:3185, CDP 9262), with the local test organization and workspace route verified. A browser pane starts at about:blank; a local HTTP fixture holds the requested response:
Before: the server has a request pending and the guest is loading, but the address control shows “Enter URL or search…”.
After: the requested URL stays visible while the guest's committed URL is still about:blank.
Releasing the response completes navigation normally. A subsequent 302 displays the actual /fast destination instead of the requested /redirect address.
No console errors occurred during these measured interactions.
Registry: 20 tests pass. The new pending-address regression fails on main; added coverage checks abort cleanup and an older cancelled request finishing after a newer one.
Browser subtree: 46 tests pass.
bun run lint:fix, then clean bun run lint: pass.
bun run typecheck: 42/42 tasks pass, repeated after rebase.
bun run test --continue on the verified snapshot: desktop 8982 tests pass; monorepo 28/30 tasks pass. The unchanged shared BYHOUR timezone-format test and two agent-setup system-CLI fallback tests fail. The full suite is not reported as passing.
UI evidence was captured on 6c69c8a4ca23a07ad228a950905cf10e9eaebdb0; the three changed source/test files have identical blobs on final head f68c1fa8c3e468539fb3211cda411f65620c08ae. Browser tests, lint and all typechecks passed again on the fresh base. Task dev services were stopped after verification.
Codex assisted with implementation and automated verification. No human review or manual testing is claimed.
Checklist
PR title follows conventional commits (type(scope): subject)
bun run lint and bun run typecheck pass (CI fails on lint warnings too)
"Allow edits from maintainers" is checked on fork PRs
I have signed the CLA (the bot asks on your first PR)
Summary by cubic
Fixes the browser address bar showing the empty placeholder instead of the entered URL while a page is loading slowly. Adds a toolbar pendingUrl that stays visible while a navigation is in flight.
A main-frame commit displays the actual destination, including redirects; completing or aborting a load clears the pending address.
An older aborted request can't clear a newer pending navigation, even for the same URL.
Written for commit cc878bc. Summary will update on new commits.
Summary by CodeRabbit
New Features
The browser toolbar now shows the address being navigated to while a page is loading, before it becomes the current address.
Bug Fixes
Failed or canceled navigation no longer replaces the current page address.
When a newer navigation starts, an older canceled navigation no longer clears its pending address.
No actionable comments were generated in the recent review.
Walkthrough
The browser runtime now tracks pending navigation URLs separately from committed URLs. The toolbar displays the pending URL when one is available. Navigation commit and load settlement clear pending state under defined conditions.
Changes: Browser navigation state
Layer / File(s)
Summary
Pending URL lifecycle and display apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/hooks/usePaneRegistry/components/BrowserPane/browserRuntimeRegistry.ts, apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/hooks/usePaneRegistry/components/BrowserPane/components/BrowserPaneToolbar/BrowserPaneToolbar.tsx, apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/hooks/usePaneRegistry/components/BrowserPane/browserRuntimeRegistry.test.ts
The registry stores the sanitized target as pendingUrl and tracks its loadURL promise. It clears pending state when navigation commits or when the current load settles. The toolbar displays pendingUrl when available. Tests cover committed, aborted, and overlapping navigation.
The change keeps the entered address visible in the browser toolbar while a page loads. It is a small renderer-only change with passing tests reported. At worst, the address display may briefly flicker in a rare overlapping-navigation case.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "fix(desktop): keep the browser address visible while loading" follows conventional commit format and names the main change. The changeset adds a transient pendingUrl to BrowserRuntimeState,…
Description check
The description follows the template. It has the 'What & why' section, which explains the problem (the URL disappears while loading) and the fix (a transient pendingUrl), and it links the related issu…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "fix(desktop): keep the browser address visible while loading" follows conventional commit format and names the main change. The changeset adds a transient pendingUrl to BrowserRuntimeState, passes it to the toolbar while a navigation is in flight, and clears it on commit, completion, or abort. The title matches this behavior. It does not cover the abort and stale-request handling, which is expected for a title.
Full details: Description check
Explanation
The description follows the template. It has the 'What & why' section, which explains the problem (the URL disappears while loading) and the fix (a transient pendingUrl), and it links the related issue (Refs #8145). The 'How I tested it' section gives detailed manual CDP testing, before/after screenshots, and test and lint results. The checklist is present and marked. The description is thorough, though it is long and includes some details that are not required by the template.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
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
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 & why
Entering a URL in an empty browser pane replaces the address with the empty placeholder until navigation commits. On a slow response, this makes the entered URL disappear while the page is still loading.
Keep a transient pending address for the toolbar. Committed URLs continue to drive history, persistence, and page actions. A main-frame commit displays the actual destination, including redirects; completing or aborting a load clears its pending address. An older aborted request cannot clear a newer attempt, even when both use the same URL.
Refs #8145, specifically the address loss during pending navigation. CLI pane registration succeeded in this reproduction.
How I tested it
Automated CDP mouse/keyboard input against an isolated dev desktop (renderer localhost:3185, CDP 9262), with the local test organization and workspace route verified. A browser pane starts at about:blank; a local HTTP fixture holds the requested response:
Redirect capture · Measurements, fixture, scripts and validation
Validation with Bun 1.4.3:
bun run lint:fix, then cleanbun run lint: pass.bun run typecheck: 42/42 tasks pass, repeated after rebase.bun run test --continueon the verified snapshot: desktop 8982 tests pass; monorepo 28/30 tasks pass. The unchanged shared BYHOUR timezone-format test and two agent-setup system-CLI fallback tests fail. The full suite is not reported as passing.UI evidence was captured on
6c69c8a4ca23a07ad228a950905cf10e9eaebdb0; the three changed source/test files have identical blobs on final headf68c1fa8c3e468539fb3211cda411f65620c08ae. Browser tests, lint and all typechecks passed again on the fresh base. Task dev services were stopped after verification.Codex assisted with implementation and automated verification. No human review or manual testing is claimed.
Checklist
type(scope): subject)bun run lintandbun run typecheckpass (CI fails on lint warnings too)Summary by cubic
Fixes the browser address bar showing the empty placeholder instead of the entered URL while a page is loading slowly. Adds a toolbar
pendingUrlthat stays visible while a navigation is in flight.Written for commit cc878bc. Summary will update on new commits.
Summary by CodeRabbit