UI Screens
BrowseGenius ships with multiple chrome-extension surfaces under src/pages/. Each screen targets a specific workflow, from capture to monitoring. Use this guide to understand where each page lives in the codebase and how it behaves.
Popup (src/pages/Popup)
- Entry file:
Popup.tsxrenders the shared<App />component fromsrc/common/App.tsx. - Purpose: Primary control centre for testers. Includes the Capture wizard, AI phase discovery, eval management, test generation, suite execution controls, and report downloads.
- Key subcomponents:
CapturePhase– captures up to five screens, manages saved evals, and handles eval selection.SavedPlansSection– displays saved evals with "Select Eval" and quick-run actions.DiscoveryPhase– AI-powered phase discovery identifying navigation sections.PlanPhase– displays discovered phases with per-phase "Generate Tests" buttons (up to 10 tests per phase).ExecutePhase– runs tests across all phases or per-phase with real-time status.ReportsPhase– displays test results with summary stats and download options.SetAPIKeyandModelDropdown– manage OpenAI/OpenPipe credentials and model selection.
- Hotkeys:
Cmd+Shift+Y/Ctrl+Shift+Yopens the popup.
DevTools Panel (src/pages/Devtools)
- Entry file:
index.jsregisters a DevTools panel labelled BrowseGenius. - Purpose: Observability surface during test execution. The panel is populated by the same
<App />tree, giving parity with the popup while providing more real estate for logs and artifacts. - Usage tips:
- Open Chrome DevTools and switch to the BrowseGenius tab.
- Monitor the GPT-4 action stream, inspect state via
window.getState, and cross-check error toasts in the console.
Panel (src/pages/Panel)
- Entry file:
Panel.tsxalso renders<App />. - Purpose: Hosts the extension inside a dedicated panel context (used when the popup is undocked). Functionally identical to the popup view, so code changes in
App.tsxautomatically propagate here.
Options Page (src/pages/Options)
- Entry file:
Options.tsx(withindex.jsxbootstrapping). - Purpose: Placeholder page for Chrome’s “Options” link. Currently shows a minimal container (
{title} Page). Extend this surface if you need a richer settings experience outside the popup (e.g., org-wide defaults, telemetry toggles). - Styles:
Options.cssgives the page its basic layout.
New Tab Page (src/pages/Newtab)
- Entry files:
Newtab.jsx+ associated CSS/SCSS. - Purpose: Development scaffold for an overridable new-tab experience. Today it mirrors the default React starter (logo, edit instructions, sample link). Replace this implementation if you want BrowseGenius to provide a custom new-tab dashboard.
- Note: The extension currently doesn’t register the new-tab override in
manifest.json. To enable it, update the manifest’schrome_url_overridessection.
Background Worker (src/pages/Background)
- Entry file:
index.js, currently empty except for comments. - Purpose: Service worker target for manifest V3. While not a visible screen, it’s the lifecycle hook that powers orchestrator tasks (
src/background). Expand it when you need background listeners or alarms.
Content Scripts (src/pages/Content)
- Entry file:
index.tsregisters RPC watchers for DOM capture utilities. - Purpose: Injected into web pages to annotate the DOM, support ripple effects, and service popup requests. Interaction happens via
pageRPC.ts. - Note: Although not a screen, this module underpins the capture experience; review it when troubleshooting DOM extraction issues.
Adding new screens
- Scaffold under
src/pages/<Name>with anindex.(ts|js)xentry and HTML template. - Declare the surface in
webpack.config.jsand, if needed, updatemanifest.json. - Document the screen here so QA engineers know how to access it and what it does.
Keeping this guide up-to-date ensures contributors can navigate the extension quickly, understand ownership areas, and avoid duplicating UI work.