Repository navigation
Extension: start tasks from the New Tab page and other Chrome pages - #40
Merged
Merged
Conversation
Chrome forbids debugging its own pages (New Tab, chrome://, the Web Store), and the side panel refused to run any task from them. Now: - The tab is attached to chrome.debugger only when a task first needs the page (TabBrowser), so chat-only replies never touch the tab or show the debugging bar. - A task starting on a Chrome page navigates the tab to its website with the tabs API first, then takes control. - If no site is obvious from a Chrome page, the task starts from a Google search instead of failing. Extension smoke adds two cases starting from a blank tab; 6/6 pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Reported while testing in Chrome: on the New Tab page (or any
chrome://page) the side panel refused every task. Chrome forbids debugging its own pages, but the tabs API may still navigate them.extension/src/tab-browser.ts: attacheschrome.debuggeronly when a task first needs the page. Chat-only replies never touch the tab or show the debugging bar.chrome.tabs.update, waits for the load, then takes control.lib/core/run-task.ts: from a Chrome page with no obvious site, the task starts from a Google search (configurablefallbackSearchUrl) instead of failing; the start-page prompt knows STAY isn't possible there.Testing
npm test(46),npm run lint,npx tsc --noEmit,npm run extension:buildnpm run extension:smoke: 6/6, including two new cases starting from a blank tab ("cheapest tent at " 4.4s, "look up Voyager 1 on wikipedia" with no site 5.4s)🤖 Generated with Claude Code