Skip to content

feat: add extension extractor router#207

Merged
steipete merged 1 commit intosteipete:mainfrom
solomonneas:codex/extension-reddit-extractor
Apr 26, 2026
Merged

feat: add extension extractor router#207
steipete merged 1 commit intosteipete:mainfrom
solomonneas:codex/extension-reddit-extractor

Conversation

@solomonneas
Copy link
Copy Markdown
Contributor

@solomonneas solomonneas commented Apr 25, 2026

Summary

  • add a background-side extractor router for extension summarize/chat flows
  • add a Reddit thread extractor that fetches /comments/<post>.json asynchronously and formats post metadata plus nested comments
  • preserve the shouldPreferUrlMode hard switch so media/preferUrl URLs skip new extractors and log extractor.route.preferUrlHardSwitch

Fixes #174

Verification

  • pnpm -s test tests/chrome.extractor-router.test.ts tests/content.url.test.ts tests/chrome.panel-session-actions.test.ts tests/sidepanel.panel-cache.test.ts tests/chrome.chat-context.test.ts
  • pnpm -s test tests/chrome.extractor-router.test.ts tests/chrome.extension-logs.test.ts tests/extension.firefox.manifest.test.ts
  • pnpm -C apps/chrome-extension exec playwright test -c playwright.config.ts --project=chromium tests/sidepanel.core.spec.ts:26 --reporter=line
  • pnpm -C apps/chrome-extension test:chrome (50 passed, 3 skipped)
  • pnpm -C apps/chrome-extension build
  • pnpm exec oxfmt --check apps/chrome-extension/src/entrypoints/background.ts apps/chrome-extension/src/entrypoints/background/extract-cache.ts apps/chrome-extension/src/entrypoints/background/panel-summarize.ts apps/chrome-extension/src/entrypoints/background/extractors/router.ts apps/chrome-extension/src/entrypoints/background/extractors/reddit-thread.ts apps/chrome-extension/src/entrypoints/background/extractors/page-readability.ts apps/chrome-extension/src/entrypoints/background/extractors/url-daemon.ts apps/chrome-extension/src/entrypoints/background/extractors/types.ts tests/chrome.extractor-router.test.ts
  • git diff --check

Notes

  • The first test:chrome attempt failed because the Playwright Chromium binary was missing locally. Installed it with pnpm -C apps/chrome-extension exec playwright install chromium, then reran the Chrome tests successfully.

@solomonneas solomonneas marked this pull request as ready for review April 25, 2026 05:48
@steipete steipete merged commit 0a455ac into steipete:main Apr 26, 2026
1 check passed
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.

[Feature] Chrome extension: Extractor Router framework & Reddit .json thread extraction (preserve preferUrl logic)

2 participants