feat(dashboard): brain:// links open a live decrypted document pane - #578
Draft
futurepaul wants to merge 1 commit into
Draft
feat(dashboard): brain:// links open a live decrypted document pane#578futurepaul wants to merge 1 commit into
futurepaul wants to merge 1 commit into
Conversation
Phase 2c of the brain:// live viewer plan. Clicking a brain:// link in an agent reply opens the preview pane in live document mode; the browser decrypts and renders Brain data client-side and follows updates without a reload. - chat-preview-urls: brain:// detection (markdown links and prose); brain-doc-url parsing for the rename-proof brain://<brain-id>/<folder-id>/<path> shape - hosted-web-chat: preview items become a site | brain-doc union; brain:// markdown links click through to the pane (react-markdown urlTransform admits the brain scheme on top of the safe defaults); desktop panel and mobile drawer render BrainDocPanel - brain-viewer-crypto: the browser mirror of the Rust crypto — ephemeral nostr keypair (tab memory only), NIP-98 auth headers, NIP-44 unwrap of the wrapped Folder Key, AES-256-GCM opening of finite-folder-object-v1 envelopes against the canonical-JSON AAD, and client-side record replay into a path index (ADR-0005 pattern) - BrainDocPanel: mint session via /api/brain/viewer-sessions (hosted device signs as the signed-in principal), poll for the agent's wrap, unwrap, encrypted-read, decrypt, render markdown-only (the renderer is the sanitizer), fetch-streamed SSE (EventSource cannot carry the NIP-98 header) with delta fetches and silent TTL renew - honest states: waiting for your agent, session expired, revoked, folder too large, decrypt/config failures - browser suite: fake Brain server (CORS-decorated like the real middleware, Rust-format envelopes, NIP-44 wraps, SSE) proves click → waiting → wrap → decrypted render → no durable key storage → SSE edit → re-render without reload → delta fetch observed - finite-nostr: fixed-vector test pinning the nostr-tools ↔ Rust NIP-44 boundary the wrap unwrap depends on
This was referenced Aug 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack: #576 → #577 → #578 → #579. Browser side of the viewer.
Phase 2c of the brain:// live viewer plan. Clicking a brain:// link in
an agent reply opens the preview pane in live document mode; the
browser decrypts and renders Brain data client-side and follows
updates without a reload.
brain-doc-url parsing for the rename-proof
brain://// shape
brain:// markdown links click through to the pane (react-markdown
urlTransform admits the brain scheme on top of the safe defaults);
desktop panel and mobile drawer render BrainDocPanel
ephemeral nostr keypair (tab memory only), NIP-98 auth headers,
NIP-44 unwrap of the wrapped Folder Key, AES-256-GCM opening of
finite-folder-object-v1 envelopes against the canonical-JSON AAD,
and client-side record replay into a path index (ADR-0005 pattern)
device signs as the signed-in principal), poll for the agent's wrap,
unwrap, encrypted-read, decrypt, render markdown-only (the renderer
is the sanitizer), fetch-streamed SSE (EventSource cannot carry the
NIP-98 header) with delta fetches and silent TTL renew
folder too large, decrypt/config failures
middleware, Rust-format envelopes, NIP-44 wraps, SSE) proves click
→ waiting → wrap → decrypted render → no durable key storage → SSE
edit → re-render without reload → delta fetch observed
NIP-44 boundary the wrap unwrap depends on
Stack created with GitHub Stacks CLI • Give Feedback 💬