Allow manual browser navigation from the session pane#412
Draft
dot-Justin wants to merge 1 commit intobrowser-use:mainfrom
Draft
Allow manual browser navigation from the session pane#412dot-Justin wants to merge 1 commit intobrowser-use:mainfrom
dot-Justin wants to merge 1 commit intobrowser-use:mainfrom
Conversation
Collaborator
|
ooh I was just making this will work off of this instead hahaha |
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
BrowserPooland session navigation state flow so agent-driven and manual browsing share the same browser source of truth.Details
Manual navigation now flows through
BrowserPool.navigate(), which normalizes the input with a shared helper before callingwebContents.loadURL(). BrowserPool also emits live navigation state updates (url,title,canGoBack,canGoForward,isLoading) on navigation, load, title, and in-page route events. The existingsetOnNavigatepath still updatesSessionManager.updateNavigationFromUrl(), so manual browsing keepsprimarySiteandlastUrlcoherent for session resume and agent context.The renderer subscribes to those navigation-state events in
AgentPaneand renders a compact browser chrome above the embedded browser. Invalid schemes and load failures are surfaced inline without tearing down the session.Manual testing
Tested manually on Linux/Hyprland with:
Automated testing
npm run typechecknpm run lint(passes with existing repository warnings)npm run test(45 files, 345 tests passed; 1 file and 3 tests skipped)Closes #409
Summary by cubic
Adds a compact browser address bar to the session pane with manual navigation and history controls. Aligns with #409 by letting users type or paste URLs, search from the bar, and keep navigation state in sync with agent-driven browsing.
New Features
WebContentshistory APIs.url,title,canGoBack,canGoForward,isLoading) emitted from main and rendered in the pane.sessions:get-navigation-state,sessions:navigate,sessions:back,sessions:forward,sessions:reload, andsessions:navigation-stateevent.Refactors
BrowserPool.navigate()using a shared normalizer inshared/browser-navigation.SessionManager.updateNavigationFromUrl()updates soprimarySite/lastUrlstay correct for resume and context.Written for commit 31804c6. Summary will update on new commits.