Strong shares phase 2: recipient viewer with vendored age (#19) #115
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/strong-shares-ui"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 2 of #19: the recipient now gets a normal, readable file instead of a
.ageblob.Viewer.
/s/<token>on a strong file share serves a small page that fetches?payload=1(the ciphertext minted by phase 1), decrypts it in the browser, and hands over the plain file. Key material never reaches the server: fragment mode readslocation.hashlocally (browsers don't transmit fragments); password mode keeps the typed passphrase in a JS variable — it goes to the gate, which needs it anyway to authorize the download and derive the payload key.Vendored age implementation — decision recorded. In-browser decryption needs an age implementation, and we have no JS build pipeline. Approved approach: a pinned, self-contained esbuild bundle of typage (Filippo's official TypeScript age — same author as
filippo.io/age, crypto primitives are@noble/*, all inlined) committed tointernal/share/assets/age.jsand embedded in the binary viago:embed, served from/s/_assets/age.js.?bundle, which returned a shim still importing from the CDN — a self-containment check in the vendoring recipe caught it and failed the build. The committed artifact is now verified to contain no external imports.Gate changes. The password gate answers JSON (
204/401) when the viewer'sfetchasks for it, and strong shares render the viewer before the gate so the password can be collected in-page. Directory shares keep the server-rendered form; only file shares get the viewer.Dialog. Share creation now carries the selected mode when a
sharedlg-modecontrol exists (the control itself, plus showing the fragment link, is the remaining UI slice).Full suite green. Next: phase 3 — dialog mode selector + handbook page with the claim boundary, then a dogfood pass on
.249.