Skip to content

Add developer mode overlay (spec + README)#131

Closed
djscruggs wants to merge 7 commits into
mainfrom
feature/dev-mode-overlay
Closed

Add developer mode overlay (spec + README)#131
djscruggs wants to merge 7 commits into
mainfrom
feature/dev-mode-overlay

Conversation

@djscruggs

@djscruggs djscruggs commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Draft PR scoping a developer mode overlay for desktop development of the
wallet, where camera hardware and live issuers / relying parties are
unavailable. This PR is currently spec + README only — no feature code yet.

Full design: docs/dev-mode-spec.md.

What's here

  • docs/dev-mode-spec.md — finalized spec.
  • README.md — basic README; documents the library usage and a Developer Mode
    section (marked planned) linking to the spec.

Proposed design (see spec)

  • Trigger: localStorage['wallet.devMode'] flag (off by default) +
    triple-backtick to toggle the panel. Listener never installed unless the flag
    is set, so production behavior is unchanged.
  • Mount point: a global overlay in WalletLayout.vue.
  • Tools:
    • Paste exchange URL (primary) — reuses the existing scanner pipeline via
      a ?devUrl= route param into ScannerExchangePage.
    • Seed test credentials (post-login) — synthetic VCs into the credential
      store to develop display/management UIs without running an exchange.
  • Dropped: client-side login-bypass — the session is server-backed via
    @bedrock/web-session and cannot be faked in the UI layer.
  • README will be expanded with concrete usage once the feature lands.

Privacy / security

No customer or personal data. Fixture VCs (when added) are synthetic. The dev
mode adds no new network surface and does not weaken server-side auth.

Specs a developer-only UI overlay for desktop development, where camera
hardware and live issuers/relying parties are unavailable. Documents a
localStorage-gated, triple-backtick-triggered panel with two tools: paste
an exchange URL (reusing the existing scanner pipeline) and seed synthetic
test credentials into the credential store.

Login-bypass was investigated and dropped: the session is server-backed via
@bedrock/web-session, so it cannot be faked in the UI layer.

Spec only; implementation and README updates to follow in this branch.
Documents the package as a library consumed by a host Bedrock app, the
`initialize()` entry point, and a Developer Mode section (marked planned)
linking to the spec.
@djscruggs djscruggs force-pushed the feature/dev-mode-overlay branch from bc96836 to bed4b9d Compare June 15, 2026 17:26
@codecov-commenter

codecov-commenter commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 12.04%. Comparing base (713e8f6) to head (6ebdd8b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #131   +/-   ##
=======================================
  Coverage   12.04%   12.04%           
=======================================
  Files           6        6           
  Lines          83       83           
=======================================
  Hits           10       10           
  Misses         73       73           

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 713e8f6...6ebdd8b. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Notes that the dev-mode shell (flag, trigger, overlay + tool-registration
API) is reusable across the bedrock-vue-* ecosystem and could be extracted
to a future bedrock-vue-dev-mode package, mounted via @bedrock/vue's
beforeMount hook. Keeps the generic/domain seam clean now without building
the shared package prematurely (single consumer).
Comment thread docs/dev-mode-spec.md Outdated
Comment on lines +121 to +125
**Proposed eventual home:** a new published package **`bedrock-vue-dev-mode`**,
following the existing `bedrock-vue-*` component-library pattern (own repo, CI,
release). It would mount the overlay via `@bedrock/vue`'s existing app-bootstrap
`beforeMount` hook (`@bedrock/vue` already owns root-app creation for every
bedrock web app), so any app gets the panel for free without editing its layout.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need another package, we can just add this to bedrock-vue and trigger it based off of the bedrock frontend config.

Comment thread docs/dev-mode-spec.md Outdated
Comment thread docs/dev-mode-spec.md Outdated
Format the Status/Date/Repo header block as a list so it no longer
renders on a single line.

Add a "Keybinding ownership" section under Trigger: a module should not
unilaterally capture a global key, since it can collide with keys the
host app or other modules use. Documents three mitigations (dev-mode
only scope, configurable bound key, and deferring ownership to the app)
and notes the extracted overlay should accept a toggle signal rather
than install a global listener. Threads this into the Generalization
section and the resolved-questions list.
Resolve the open "eventual home" question in favor of folding the
generic dev-mode shell into @bedrock/vue (mounted via its beforeMount
app-bootstrap hook) rather than a standalone package.

Document layer ownership after the move: bedrock-vue owns the flag
gate, overlay panel, and registerDevTool() API; the trigger is
app-owned (overlay accepts a toggle signal, no global key listener);
the wallet keeps its domain tools and registers them. Note that the
move does not change the wallet's debugging data boundary, record that
production-bundle handling is owned by bedrock-vue, and add a migration
plan.
The developer-mode generic shell is being built in bedrock-vue, so the
spec moves there. Drop docs/dev-mode-spec.md and the "Developer Mode"
README section, leaving this PR as a general wallet README (usage and
initialize()).
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.

4 participants