feat(browser): polish embedded browser pane, sidebar parity, OSS auth gates#70
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR polishes the embedded browser-pane UX and aligns workspace chrome behavior by fixing toggle-close lifecycle issues (especially under UndoClosedPanes), adding a configurable default search engine for the URL bar, routing terminal URL clicks into the embedded browser, and relaxing login gating for OSS builds where cloud services aren’t available.
Changes:
- Fix browser pane toggle-close behavior by ignoring hidden-for-close panes and force-cleaning up stale shadows; add
NavigateBrowserPane { url }for internal link handoff. - Add
general.default_search_engine(default Google) and plumb it through URL resolution; introduce a URL bar minimum width and document toolbar/webview layout invariant. - Update tab-bar controls (Globe toggle on native, settings cog on wasm) and adjust left-panel default keybinding to Cmd/Ctrl+B; update OSS login gating for onboarding and remote-control chip.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/workspace/view.rs | Fixes browser pane toggle lifecycle; adds navigate-or-open action handler; updates tab-bar button rendering (Globe vs settings) |
| app/src/workspace/util.rs | Adds mouse state handle for the new browser toggle icon (native) and gates settings icon to wasm |
| app/src/workspace/mod.rs | Adds default keybindings for toggling the left panel (Cmd/Ctrl+B) |
| app/src/workspace/action.rs | Introduces WorkspaceAction::NavigateBrowserPane and excludes it from app-state persistence |
| app/src/terminal/view.rs | Routes URL link clicks to the workspace’s embedded browser instead of the system browser |
| app/src/terminal/general_settings.rs | Adds general.default_search_engine setting backed by SearchEngine |
| app/src/root_view.rs | Skips login gating in OSS builds by also requiring cloud_services_available() |
| app/src/browser/url_input.rs | Adds SearchEngine enum and resolver that uses the selected engine; expands tests |
| app/src/browser/browser_view.rs | Uses selected default search engine; adds URL bar min width; exposes navigate to workspace |
| app/src/ai/blocklist/agent_view/agent_input_footer/mod.rs | Skips remote-control login gate on OSS builds via cloud_services_available() |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+18350
to
+18353
| // Browser-pane toggle replaces the standalone settings cog so the | ||
| // toggle is always reachable next to the left/right panel toggles, | ||
| // mirroring those affordances. Settings remain accessible via | ||
| // Cmd+, , the app menu, and the command palette. |
| .with_custom_action(CustomAction::ToggleWarpDrive), | ||
| .with_custom_action(CustomAction::ToggleWarpDrive) | ||
| .with_mac_key_binding("cmd-b") | ||
| .with_linux_or_windows_key_binding("ctrl-b"), |
… gates
Browser pane:
- Default search engine is now Google (was DuckDuckGo); add user-level
`general.default_search_engine` setting with variants Google /
DuckDuckGo / Bing / Kagi / Brave, plumbed through the URL bar's
resolver.
- Give the URL bar a `URL_BAR_MIN_WIDTH` so it never collapses to icon
width in narrow split layouts.
- Document the toolbar-vs-webview layout invariant that keeps GPUI
toolbar buttons clickable above the native wry overlay.
Sidebar / tab-bar parity:
- Replace the tab-bar settings cog with a browser-pane toggle (Globe
icon) on non-wasm builds; settings remain accessible via Cmd+,, the
app menu, and the command palette. Wasm keeps the cog because it has
no embedded browser.
- Give `workspace:toggle_left_panel` a default `Cmd+B` (Mac) /
`Ctrl+B` (Linux/Windows) keybinding, matching the convention used by
the right panel and browser pane toggles.
Link handoff:
- Terminal-output URL clicks now dispatch a new
`WorkspaceAction::NavigateBrowserPane { url }`. If a browser pane is
open in the active pane group, the click navigates its active tab;
otherwise a new pane is opened pointed at the URL. Wasm falls back
to the platform's external URL handler.
- `BrowserView::navigate` is promoted to `pub(crate)` so the workspace
can populate the open pane.
OSS auth gates:
- `root_view.rs` `requires_login` check now also requires
`cloud_services_available()`, so the public OSS build never blocks
agent or Cast Drive onboarding behind a Warp account.
- Remote-control chip in the agent input footer skips the login gate
on OSS builds for the same reason — there are no hosted services to
authenticate to.
Tests:
- `url_input.rs` covers default-Google behavior, per-engine selection,
and that all engine variants ship distinct URL prefixes.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…hadow) `PaneGroup::close_pane` under `FeatureFlag::UndoClosedPanes` does not destroy the pane — it detaches into a hidden-for-close shadow so Cmd+Z can restore it. `toggle_browser_pane` was calling only `close_pane`, which left two latent bugs: 1. The wry::WebView outlived the visible "close": memory and a detached native overlay stayed around until the tab itself closed. 2. `pane_ids().find(is_browser_pane)` kept reporting the hidden shadow as an existing pane, so the next toggle short-circuited on the early-return in `close_pane` for already-hidden panes — toggle appeared to do nothing. `toggle_browser_pane` now: - filters the lookup to visible (not hidden-for-close) panes, - on the close path, follows `close_pane` with `cleanup_closed_pane` to drop the wry::WebView for real, - on the open path, proactively cleans up any stale hidden shadow before opening a fresh pane. The tab-bar browser-toggle button and `navigate_or_open_browser_pane` use the same visibility filter so the icon's active state and link handoff agree with what the user actually sees. Cmd+W still goes through the undo-friendly path. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
afe96a5 to
3c4efdd
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.
Summary
Closes the user-reported polish items on the embedded browser pane and aligns its toggle with the rest of the workspace chrome.
Browser pane
Tab-bar parity
Link handoff
OSS auth gates
Test plan
🤖 Generated with Claude Code