Skip to content

fix(ui): wire Meus cofres to the real /net flow (demo-gated netMode) - #87

Merged
danielgorgonha merged 1 commit into
mainfrom
fix/wire-helper-meus-cofres
Aug 3, 2026
Merged

fix(ui): wire Meus cofres to the real /net flow (demo-gated netMode)#87
danielgorgonha merged 1 commit into
mainfrom
fix/wire-helper-meus-cofres

Conversation

@danielgorgonha

Copy link
Copy Markdown
Member

Problem

On konclave-demo, clicking Meus cofres shows the demo vault and Criar cofre opens the demo/local form, even with demo off. Vaults created on the (now-deleted) net-preview domain don't appear.

Root cause: the /vaults home keys netMode on helperConfigured() alone. konclave-demo never had VITE_HELPER_BASE set (only VITE_RELAY_BASE), so netMode=false → the screen falls back to MOCK (the "Tesouraria Comum" demo vault) and create → local /create. net-preview had VITE_HELPER_BASE, which is why the real /net flow worked there.

Fix (two parts)

1. Code (this PR): gate netMode = helperConfigured() && !IS_DEMO in Vaults.tsx. So once the helper is wired on one origin, ?demo=1 still shows the mock demo vault while the real entry lists the device's browser-native (/net) vaults and "Criar cofre" opens the DKG flow. Without this, wiring the helper would break the demo (it'd show an empty real list).

2. Config (ops, not in this PR): set VITE_HELPER_BASE=https://konclave-helper-production.up.railway.app on konclave-demo (prod + preview). The hosted helper (/api/health → 200) and relay are both live.

Note

IndexedDB is per-origin. Vaults created on konclave-net-preview.vercel.app do not carry to konclave-demo.vercel.app (different origin; net-preview deleted) — a fresh vault must be created on the consolidated origin.

Verification

  • pnpm -C ui build — typecheck + build clean.
  • helper unit tests pass.
  • Screens gating on IS_NET (Dashboard/Ledger/Proposals) already carry && !DEMO; /net (NetVault) is always the real flow by design — unchanged.

…one origin

With a hosted helper wired (VITE_HELPER_BASE), the /vaults home was showing the
real /net vault list even in demo mode, since netMode keyed only on
helperConfigured(). Gate it with !IS_DEMO so ?demo=1 keeps the mock demo vault
while the real entry lists the device's browser-native (/net) vaults + DKG create.
@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
konclave-demo Ready Ready Preview Aug 3, 2026 3:08pm

Request Review

@danielgorgonha
danielgorgonha merged commit f4ab011 into main Aug 3, 2026
7 checks passed
@danielgorgonha
danielgorgonha deleted the fix/wire-helper-meus-cofres branch August 3, 2026 16:32
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