Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add: debugTrace build-time default + JSONL export schema#222

Merged
twschiller merged 1 commit into
mainfrom
add-debug-trace-build-default
Jun 9, 2026
Merged

Add: debugTrace build-time default + JSONL export schema#222
twschiller merged 1 commit into
mainfrom
add-debug-trace-build-default

Conversation

@twschiller

Copy link
Copy Markdown
Contributor

Summary

  • New reserved key debugTrace in the build-time defaults override file (alongside optionsButton and runOnInactiveTabs). When true, fresh chrome.storage seeds the debug-trace recorder enabled so the popup's Export button can dump a JSONL trace without a human flipping the toggle. Wired via a new EXTENSION_DEBUG_TRACE_DEFAULT build-time substitution, mirroring the existing options-button-toggle.ts / run-on-inactive-tabs.ts pattern.
  • Intended use case: CDP/Browserbase automation that scrapes the IDB-backed trace from a fresh session (e.g. for post-hoc visibility into what the extension touched on each step).
  • Adds extension/data/debug-trace.schema.json — JSON Schema (draft 2020-12) describing the union of entries emitted into the JSONL export, mirroring the DebugTraceEntry union in detection-messages.ts. Linked from the README + install docs so downstream consumers can validate.
  • README and docs/src/content/docs/install.md updated with the new reserved key and a pointer to the export schema. Example overrides file gets a debugTrace line so the knob is visible.

Test plan

  • bun run check (extension/) — biome + eslint clean
  • bun run test (extension/) — full suite, 1885 tests pass, including 4 new loadDefaultOverrides cases and 4 new debugTraceStorage env-default cases (mirrors optionsButtonStorage pattern)
  • pre-commit run on touched docs/JSON — mdformat reflowed install.md once, then passed on re-run
  • bun run build --defaults <{"debugTrace":true}> — verified the substituted bundle contains const raw = "true"; inside resolveDefault() and the storage seeded to true for fresh installs; default build (no override) still seeds false
  • Smoke-test in Chrome: load the override'd dist/, open the popup on a fresh profile, confirm "Debug trace" checkbox starts ticked and exports JSONL

🤖 Generated with Claude Code

Operators can now seed builds with the debug-trace recorder on by default
(via `debugTrace: true` in the defaults override file), so CDP/Browserbase
automation can pull the IDB-backed trace from a fresh session without a
human flipping the popup toggle. Documents the export entry shape as a
JSON Schema for downstream consumers.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agent-browser-shield-demo-site Ready Ready Preview, Comment Jun 9, 2026 1:48am

Request Review

@twschiller twschiller merged commit 430be80 into main Jun 9, 2026
7 checks passed
@twschiller twschiller deleted the add-debug-trace-build-default branch June 9, 2026 01:51
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