Repository navigation
feat(web): the browser's address bar searches, and agent typing no longer highlights the whole page - #907
Merged
Conversation
…he whole page When an agent typed with "replace what is there", the app clicked the target and then sent the browser's "select all" to whatever had focus. If the click had not put focus in a text field (a button, a label, a layer over the field, a date picker), that selected every word on the page, typed nothing, and told the agent it had worked. Typing now asks the page what would take the text first (textReceiverScript.ts): a text input, a textarea, rich text, an editor that draws its own text, or nothing. With nothing, no key is sent and the call fails saying nothing was typed. Clearing happens inside the page, in the same step that checks the field still has focus, and only on that field. It is judged by the focused element, so a cursor left in a field typed in earlier does not pass for focus, and it is refused once the user has taken the tab over.
…ou choose The address bar said "Search or enter URL" but only loaded addresses, so typed words went nowhere or to a made-up host. Words are now searched: an entry is an address when it has a scheme, a path, a port, a dotted host, a full IP address or is localhost, and a search otherwise. A leading "?" forces a search. Agent navigation and link opening are unchanged. Settings > General > Browser search engine picks Google (the default), DuckDuckGo, Bing, Brave Search or Kagi, kept on this computer with the browser.
…ts' browsing history
Each choice under Settings > General > Browser search engine now leads with the engine's mark: Google's four-color G, and the Simple Icons glyphs (CC0) for DuckDuckGo, Bing, Brave and Kagi in each brand's color. The marks live with the label component, not in the app-wide icon file, so they load with Settings and add nothing to startup.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
…ser panel, not at startup The first cut put resolveAddressEntry in previewUrl.ts and the search URLs beside the engine names, and both modules load at startup: link opening needs previewUrl, and the Settings catalog needs the names. Only the browser panel reads the address bar, so the rules move to addressEntry.ts and the names move to the catalog with the other choice labels, leaving browserSearch.ts with just the URLs.
…earch engine setting
This branch was previously 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.
Two browser panel changes wanted before the next stable.
The address bar searches
Problem. The address bar said "Search or enter URL" but only loaded addresses, so typed words went nowhere or to a made-up host.
Fix.
resolveAddressEntryreads an entry the way a browser does. It is an address when it has a scheme, a path, a port, a dotted host, a full IP address or islocalhost; anything else is searched. A leading?forces a search. Agent navigation and link opening are unchanged. Settings > General > Browser search engine picks Google (the default), DuckDuckGo, Bing, Brave Search or Kagi, each shown with its mark, kept on this computer with the browser. The setting is in the app guide catalog, so agents can find and change it when asked.Choices worth knowing: a lone word such as
devboxnow searches (devbox/loads it), and a search adds the search engine's site to the project's allowed sites, as typing its address already did.Agent typing no longer highlights the whole page
Problem. With
browser_typeandclear, the app clicked the target and then sent the browser's "select all" to whatever had focus. When the click had not put focus in a text field (a button, a label, a layer over the field, a date picker), that selected every word on the page, typed nothing, and told the agent it had worked.Fix. Typing first asks the page what would take the text (
textReceiverScript.ts, run in the frame that holds the keyboard): a text input, a textarea, rich text, an editor that draws its own text, or nothing. With nothing, no key is sent and the call fails saying nothing was typed. Clearing happens inside the page, in the same step that checks the field still has focus, with the browser's own "select all" on that field only, and is refused once the user has taken the tab over. It goes by the focused element, so a cursor left in a field typed in earlier does not pass for focus. Known gap: an EditContext editor inside a closed shadow root reads as nothing to type into.Checks
vp fmt,vp lint,vp run typecheck; shared, contracts, desktop tests; web and server tests around the change; the full web browser suite.