> `# AGENTS.md instructions for /Users/pftom/.superset/worktrees/d3aab1a3-c696-403f-9692-7e5bc2dfa1f3/accidental-bolt`
>
> The full root `AGENTS.md` content was pasted into the chat. Important for next agent: follow the real repo `AGENTS.md`, plus `apps/AGENTS.md` and `packages/AGENTS.md` before touching those directories.
- Add browser-use/browser-harness oriented shortcut/task entry so a user can extract page screenshots/design language/assets and apply them to OpenDesign artifacts.
- Browser panel has address input, suggestions, history persistence, back/forward/reload controls, menu actions, reference cards, screenshot saving, page brief saving, and browser-harness task saving.
- Desktop runtime enables Electron `webviewTag` only for the main window and validates embedded browser startup URLs.
- Desktop host bridge exposes browser data clearing for the dedicated browser partition.
- Host package has helper `clearHostBrowserData`.
## Verification Status
Passed:
-`pnpm --filter @open-design/web typecheck`
-`pnpm --filter @open-design/desktop typecheck`
-`pnpm --filter @open-design/host typecheck`
-`pnpm --filter @open-design/host test`
-`pnpm --filter @open-design/packaged test -- desktop-url-allowlist`
- Direct targeted web tests from `apps/web`:
-`pnpm exec vitest run -c vitest.config.ts tests/components/FileWorkspace.test.tsx tests/components/FileWorkspace.design-system.test.tsx`
- Result: 2 files passed, 38 tests passed.
- Root `pnpm typecheck` completed successfully. It emitted existing landing-page warnings/hints but no errors.
Not fully verified:
-`pnpm guard` did not run in this sandbox because `tsx` failed to create its IPC pipe with `EPERM`.
-`pnpm tools-dev run web --daemon-port 17456 --web-port 17573` did not start in this sandbox for the same `tsx` IPC pipe `EPERM`.
- No final visual/browser verification was completed because local runtime startup was blocked by the sandbox.
Observed unrelated test friction:
- Running `pnpm --filter @open-design/web test -- FileWorkspace` or passing paths through the package script unexpectedly exercised the full web test set. It hit unrelated failures/timeouts in `SettingsDialog.execution.test.tsx` or `ExamplesTab.test.tsx`.
- Direct `pnpm exec vitest ...` from `apps/web` correctly scoped to FileWorkspace and passed.
## Next Agent Suggested Checks
- Run `pnpm guard` outside this sandbox or in an environment where `tsx` can create its local IPC pipe.
- Start `pnpm tools-dev run web --daemon-port <free> --web-port <free>` and visually check:
- Design Files row shows the `+` icon.
-`+` opens Browser.
- Blank browser page shows all requested URLs.
- Address input navigates to at least one external site and one local/service URL.
- History suggestions appear after navigation.
- Browser menu actions render and enabled/disabled states make sense.
- In desktop runtime, webview loads and screenshot/page brief/task save into Design Files.
Ran a 5-phase audit/verify/implement workflow over all acceptance requirements. Result: **42/45 requirements met, 0 defects** in static analysis; remaining 3 are partial/judgment (i18n debt, CLI dual-track N/A for an interactive render surface, CSS global-vs-module precedent). The workflow added `apps/web/tests/components/DesignBrowserPanel.test.tsx` (34 cases over the pure helpers — `normalizeBrowserAddress` every branch, history round-trip, harness/brief markdown, etc.) and made those helpers named exports.
### Real runtime verification (computer-use against the live Electron desktop app)
Drove the running desktop runtime via `pnpm tools-dev inspect desktop eval/screenshot`. Confirmed in the real app: `+` → add-menu → **Browser** tab → `DesignBrowserPanel` renders; all **15** reference URLs across MOTION/ASSETS/SYSTEMS; `webviewTag` enabled (`WebViewElement`); host bridge `__od__` exposes `browser.clearData`; navigation commits; the embedded `<webview>` loads and **paints** a real page (`example.com` → `<h1>Example Domain</h1>`, 487×117 layout); and `webview.capturePage()` returns a real 51 KB PNG (the "Take Screenshot" action works).
### Three runtime-only bugs found and fixed (invisible to static/JSDOM checks)
All in `apps/web/src/components/DesignBrowserPanel.tsx`:
1.**`allowpopups` React warning** — bare boolean JSX attr tripped "Received `true` for a non-boolean attribute" when the webview branch mounts. Fixed by setting `allowpopups` imperatively in the ref callback.
2.**`dom-ready` crash** — `updateNavigationState` (and the reload button) called `canGoBack()`/`canGoForward()`/`isLoading()`/`reload()` before the webview attached, throwing "The WebView must be attached…". Guarded with try/catch (matching the existing `safeGetWebviewUrl/Title` pattern).
3.**`ERR_ABORTED (-3)` blank page (critical / made the feature unusable)** — `src={currentUrl}` + a `did-navigate` handler that wrote the committed (trailing-slash) URL back into `currentUrl` caused Electron to re-navigate mid-load and abort it, leaving a blank pane. Fixed by splitting state into `loadUrl` (drives `src`, changes only on user navigation) and `currentUrl` (address bar / history, synced from webview events). Covered by a red→green regression test: `apps/web/tests/components/DesignBrowserPanel.webview.test.tsx`.
### Final verification (all green after fixes)
`pnpm guard` 33 · web `typecheck` clean · desktop `typecheck` clean · web tests **74** (34 pure + 2 webview regression + FileWorkspace + design-system) · desktop **73** · host **14** · packaged **111**. Runtime re-drive on the fixed code: page paints, no error overlays.