Skip to content

Extension: start tasks from the New Tab page and other Chrome pages - #40

Merged
ahamsel merged 1 commit into
mainfrom
claude/extension-chrome-pages
Sep 28, 2026
Merged

ahamsel merged 1 commit into
mainfrom
claude/extension-chrome-pages

Conversation

@ahamsel

@ahamsel ahamsel commented Sep 28, 2026

Copy link
Copy Markdown
Owner

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: attaches chrome.debugger only when a task first needs the page. Chat-only replies never touch the tab or show the debugging bar.
  • A task starting on a Chrome page moves the tab to its website with 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 (configurable fallbackSearchUrl) instead of failing; the start-page prompt knows STAY isn't possible there.
  • When the panel runs as a tab (tests), it targets the last-used other tab of any kind.

Testing

  • npm test (46), npm run lint, npx tsc --noEmit, npm run extension:build
  • npm 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

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>
@ahamsel
ahamsel merged commit 3dc8572 into main Sep 28, 2026
1 check passed
@ahamsel
ahamsel deleted the claude/extension-chrome-pages branch September 29, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant