Repository navigation
feat(browser): history controls: Chrome-style Escape, removable suggestions, history view - #31846
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Merge Risk: 🔵 Low · up to
|
3c52d1d to
e749e4c
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
d4064a96-f529-4c86-b634-c6f7b92fba38
📒 Files selected for processing: 37
src/main/browser/browser-guest-shortcut-dispatch.tssrc/main/browser/browser-manager-guest-shortcuts.test.tssrc/preload/api/ui-bridge-tab-and-browser-commands.tssrc/preload/api/ui-command-event-api.tssrc/renderer/src/components/browser-cookie-import-google-disclosure.test.tsxsrc/renderer/src/components/browser-pane/assemble-chrome/BrowserAddressBar.test.tsxsrc/renderer/src/components/browser-pane/assemble-chrome/BrowserAddressBar.tsxsrc/renderer/src/components/browser-pane/assemble-chrome/BrowserAddressBarSuggestionList.tsxsrc/renderer/src/components/browser-pane/assemble-chrome/browser-address-bar-suggestions.tssrc/renderer/src/components/browser-pane/assemble-chrome/browser-navigation-control-row.test.tsxsrc/renderer/src/components/browser-pane/assemble-chrome/browser-toolbar-menu-dropdown.tsxsrc/renderer/src/components/browser-pane/assemble-chrome/browser-workspace-pane.adoption-chrome.test.tsxsrc/renderer/src/components/browser-pane/assemble-chrome/use-browser-address-bar-dismissal.tssrc/renderer/src/components/browser-pane/assemble-chrome/use-browser-address-bar-escape.tssrc/renderer/src/components/browser-pane/assemble-chrome/use-browser-address-bar-row-removal.tssrc/renderer/src/components/browser-pane/assemble-chrome/use-browser-address-bar-suggestion-preview.tssrc/renderer/src/components/browser-pane/assemble-chrome/use-browser-page-chrome-focus.test.tsxsrc/renderer/src/components/browser-pane/assemble-chrome/use-browser-page-chrome-focus.tssrc/renderer/src/components/browser-pane/client-hosted-browser-pane-test-rig.tssrc/renderer/src/components/browser-pane/history/BrowserHistoryDialog.tsxsrc/renderer/src/components/browser-pane/history/BrowserHistoryRowRemoveButton.tsxsrc/renderer/src/components/browser-pane/history/browser-history-row-removal.tssrc/renderer/src/components/browser-pane/history/browser-history-view-rows.test.tssrc/renderer/src/components/browser-pane/history/browser-history-view-rows.tssrc/renderer/src/components/browser-pane/history/use-browser-history-shortcut.tssrc/renderer/src/components/browser-pane/new-tab/BrowserNewTabPage.tsxsrc/renderer/src/components/browser-pane/stream-remote/remote-browser-page-pane.address-bar.test.tsxsrc/renderer/src/components/browser-pane/stream-remote/remote-browser-page-pane.chrome-chords.test.tsxsrc/renderer/src/components/browser-pane/workspace-doc/doc-preview-address-edit.tsxsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/store/slices/browser.test.tssrc/renderer/src/store/slices/browser/browser-history-actions.tssrc/renderer/src/store/slices/browser/browser-slice-contract.tssrc/renderer/src/store/slices/browser/create-browser-slice.tssrc/renderer/src/web/preload-api/web-ui-api.tssrc/shared/keybindings/definitions-core-2.tssrc/shared/keybindings/types.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
e749e4c to
b838a52
Compare
Escape in the address bar now steps back like Chrome's omnibox. History rows come out with an X or Shift+Delete. Cmd+Y (Ctrl+H on Linux/Windows) or the page menu opens a searchable history with clear by time range. Fixes #23762
b838a52 to
27680b2
Compare
ELI5
The built-in browser now handles history the way Chrome does:
What Changed
Escape in the address bar. Each press does the first of these that applies, in the order Chromium's
OmniboxEditModel::OnEscapeKeyPresseduses:Before, Escape only closed the list. The edit stayed, and so did focus.
This works the same on local, client-hosted and streamed pages. In the document preview's address edit, the last step leaves edit mode.
Removing a suggestion. History rows in the dropdown show an X when you hover over them or arrow onto them. Shift+Delete (Shift+Fn+Delete on a Mac laptop) removes the highlighted row. The entry leaves history, so it is no longer suggested in the dropdown, on the new tab page or in the history view. If that row had filled the bar, the bar goes back to what you typed. Rows that aren't history, like "Search Google", leave Shift+Delete to the text field (on Windows that's Cut). Workspace documents previewed in the browser can be removed too.
History view. It opens from the new "History" item in the "..." page menu, or from the shortcut, whether the page or Orca's own UI has focus.
The shortcut is
browser.showHistoryin the keybinding registry, so it can be changed in Settings → Shortcuts.Why
Design
requestBrowserFocus, which local, client-hosted and streamed panes all answer, so no pane needed new wiring.normalizeBrowserNavigationUrlonly allows http, https, file and the blank page). A page would mean a new page kind with persistence and session plumbing across three pane types, plus Back/Forward rules. The address bar is the one component every pane already shares, and it already has the pane's own "open this URL" and "open this document" actions. So the dialog is rendered there, and opening a row works the same for local, client-hosted and streamed pages.data:favicons), and every mounted address bar rebuilds its suggestions. A real raise should move history into its own storage domain first. That's a separate change.Ruled out:
Known differences from Chrome
Open questions for Kelvin
Mobile
The mobile app has no address-bar suggestions or history UI; it drives desktop pages. Parity would need runtime RPCs to list, remove and clear history, served from the desktop store (history isn't in any RPC today), plus a history screen. Not part of this PR.
Sibling work
BrowserAddressBar.tsx, the keybinding definitions andbrowser-guest-shortcut-dispatch.tsare also being edited in the sibling browser branches. My changes there are small.use-browser-address-bar-suggestion-preview.ts.Linked Issue
Fixes #23762
Visual Proof
Escape: type "wiki", arrow to a suggestion, press Escape four times
Before: the first Escape closes the list. The second and third do nothing, and focus stays in the bar.
(screenshot removed: contained real product data)
After: back to "wiki", close the list, revert to the page address with all of it selected, then focus the page. The caption shows the bar text and where focus is after each press.
(screenshot removed: contained real product data)
Removing a suggestion
Before: no X on hover. Shift+Delete does nothing.
(screenshot removed: contained real product data)
After: arrowing onto a row shows its X. Shift+Delete removes it and the bar goes back to "o". Hovering another row and clicking its X removes that one too.
(screenshot removed: contained real product data)
Dark theme:
(screenshot removed: contained real product data)
History view
Before: the "..." menu has no History item, and Cmd+Y does nothing.
(screenshot removed: contained real product data)
After: open History from the menu, search, remove a row with Shift+Delete, clear the last hour, Undo, then Cmd+Y and open a row.
(screenshot removed: contained real product data)
Dark theme:
(screenshot removed: contained real product data)
Testing
Recorded and checked on macOS in a hidden dev build over CDP, on main (before) and this branch (after). Also checked live:
Not tested by hand: Linux, Windows, SSH, client-hosted and streamed panes. Those share the same bar, focus request and shortcut hook, and their pane tests pass.
New tests:
BrowserAddressBar.test.tsx: the Escape order, a retyped address keeping focus in the bar, Shift+Delete removing a history row and restoring the typed text, and Shift+Delete passing through on a non-history row.browser.test.ts: clearing since a time removes pages and documents, and Undo puts back exactly those.browser-history-view-rows.test.ts: all-words search, grouping by local day, and the start of each time range.browser-manager-guest-shortcuts.test.ts: the shortcut is forwarded from a focused page.I checked that the retyped-address test fails without the typed-text check.
Locally:
pnpm run check:code-quality:changed,pnpm run check:react-doctor:changed, the localization verifiers, and the focused suites (479 tests in 43 files).Not run yet: the full lint, typecheck and test suite.
pr.ymlskips every job on a draft PR, so they will run once this is marked ready.I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Review
Codex review, three rounds. Each finding was checked against the code, and those that held were fixed:
I first pushed back on one finding, about floating browser panels, and a later review proved it. With History open from a floating browser, pressing the shortcut again moved the view to the main browser: the search was lost and the next pick opened there. Now, while History is open, the shortcut keeps it on its own page. A two-pane test covers it. Cmd/Ctrl+W from inside any portaled dialog is still a wider, existing issue.
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)