Skip to content

feat(documents): preview shielded sign-off inside the Documents section - #377

Merged
QSchlegel merged 1 commit into
preprodfrom
claude/documents-vault-preview
Aug 22, 2026
Merged

feat(documents): preview shielded sign-off inside the Documents section#377
QSchlegel merged 1 commit into
preprodfrom
claude/documents-vault-preview

Conversation

@QSchlegel

Copy link
Copy Markdown
Collaborator

Embeds the demo vault as a working preview at /wallets/[wallet]/documents/preview, reached from a Shielded sign-off button in the Documents header — linked rather than left to be guessed at, since this section has already shipped unreachable once.

What it shows, and what it says it shows

The content is Mesh Multisig's own feature vault, not the wallet's documents, and the panel says so in its first sentence. A demo that let someone believe they were looking at their own records would be worse than no demo.

What it shows honestly is the mechanism they would get: selecting a note reveals the path a proof of it would disclose, and the documents it would keep sealed as hashes. Real content, real hashes, real trust graph — 10 hubs, 62 notes, 52 trust edges.

It reuses VaultBrowser exactly as /vault does — one view prop, all state internal — so there is one browser implementation rather than a second that drifts.

Two things worth reviewing

The throw is wrapped. loadVaultTrustView throws when the vault's trust edges are not a DAG. That is right for a build-time check and wrong on a treasury page: an unrelated Markdown edit must not be able to turn a wallet's Documents section into a 500. The loader degrades to hiding the panel instead. A CI test already asserts the vault is a DAG, so the branch should stay unreachable.

The loading is not in the page. It lives in src/lib/documents/vault-preview.ts, matching the thin-shell shape of every other page under documents/. It also makes the behaviour testable at all — importing the page pulls the whole component tree including ESM-only react-markdown, which the CJS jest project cannot parse.

Tests

Both paths are covered, including that the props survive Next's JSON serialisation. A Map, Set or Date in getServerSideProps props is a runtime "Error serializing" on the deployed page that no type check catches, so the test asserts the round trip is lossless.

Verified against a real build: the route returns 200 and ships the view.

tsc --noEmit clean; 1141 tests pass; next build exit 0.

🤖 Generated with Claude Code

Embeds the demo vault as a working preview at
/wallets/[wallet]/documents/preview, reached from a "Shielded sign-off"
button in the Documents header — linked rather than left to be guessed at,
since this section has already shipped unreachable once.

The content is Mesh Multisig's OWN feature vault, not the wallet's
documents, and the panel says so in the first sentence. A demo that let
someone believe they were looking at their own records would be worse
than no demo. What it shows honestly is the mechanism: selecting a note
reveals the path a proof of it would disclose, and the documents it would
keep sealed as hashes.

Reuses VaultBrowser exactly as /vault does — it takes one `view` prop and
owns its state — so there is one browser implementation rather than a
second that drifts.

TWO THINGS WORTH REVIEWING
- loadVaultTrustView throws when the vault is not a DAG. That is right for
  a build-time check and wrong on a treasury page: an unrelated Markdown
  edit must not turn Documents into a 500. The loader is wrapped and
  degrades to hiding the panel. A CI test already asserts the vault IS a
  DAG, so the branch should stay unreachable.
- The loading lives in src/lib/documents/vault-preview.ts rather than in
  the page, matching the thin-shell shape of every other page under
  documents/. It also makes the behaviour testable at all: importing the
  page pulls the whole component tree, including ESM-only react-markdown,
  which the CJS jest project cannot parse.

Tests cover both paths, including that the props survive Next's JSON
serialisation — a Map, Set or Date in getServerSideProps props is a
runtime "Error serializing" on the deployed page that no type check
catches.

Verified against a real build: the route returns 200 and ships the view
(10 hubs, 62 notes, 52 trust edges).

1141 tests pass; tsc clean; next build exit 0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
multisig Ready Ready Preview Aug 21, 2026 6:28pm

Request Review

@QSchlegel
QSchlegel merged commit 8e4b040 into preprod Aug 22, 2026
8 checks passed
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