Skip to content

fix(sharing): restore private rendering and shorten encrypted links - #297

Merged
ThisIs-Developer merged 2 commits into
mainfrom
fix/encrypted-sharing-rendering
Nov 20, 2026
Merged

ThisIs-Developer merged 2 commits into
mainfrom
fix/encrypted-sharing-rendering

Conversation

@ThisIs-Developer

@ThisIs-Developer ThisIs-Developer commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Encrypted snapshot and Live Share participants now render supported rich content locally, and new invitations use compact fragment formats while retaining AES-256-GCM encryption and existing role authentication. This is a separate alternative for comparison with #296; it does not revert #291.

What changed:

  • Added locally bundled Mermaid, PlantUML, Graphviz, D2, Markmap, Vega-Lite, WaveDrom, inline STL, GeoJSON/TopoJSON, ABC and LaTeX rendering. Renderers receive no share keys; output is a passive SVG image. The iframe has an opaque origin, with D2 isolated in workers. External resources remain blocked.
  • New live links are 105 characters on the production domain; stored snapshot links are 104. Inline snapshots remove redundant encoding (a measured example shrinks from 377 to 255 characters) and keep the existing storage thresholds. Old links and expiry behavior remain supported.
  • Live invitation envelopes use independent edit/view keys and the existing Durable Object admission record. Resolving a compact invite adds one DO request/read and zero Workers KV operations. No additional creation write, KV counters, polling, or plaintext migration is introduced.
  • Covered Cloudflare Pages canonical HTML redirects with the correct renderer CSP on both URL forms. The local server now applies actual header rules and reproduces the redirect.
  • Added relay compatibility diagnostics and a documented Worker-before-Pages rollout. Private exports retain their local rendering policy across asynchronous work. Updated web, Docker, desktop resource preparation, service worker caching and sharing documentation.

Validation:

  • Final head 78f4ae2: all CI checks passed, including CodeQL, secret scanning, Docker, Pages/Vercel deployments, desktop builds and platform acceptance. Release publication is correctly skipped for a PR.
  • All 296 unit tests passed, including encryption/tampering, role isolation, immutable invitation lifecycle, legacy reads, real relay/storage behavior and export policy.
  • 37 targeted browser cases passed across Chromium, Firefox and WebKit: real renderers, both participant roles, subsequent edits, authenticated termination, blocked external resources, headerless static hosting, standalone HTML export, media/recovery, application smoke checks and dynamically loaded TeX extensions. WebKit setup waits for actual initial synchronization before starting the heavy render fixture.
  • Final Cloudflare preview (commit 78f4ae2) passed real hosted acceptance in Chromium, Firefox and WebKit: all 13 fixture images rendered with no external requests or renderer errors. The preview also passed host/join/bidirectional-edit/end checks against the deployed relay.
  • Production relay acceptance passed with both the current production client and the local candidate client: host start, compact guest join, encrypted bidirectional editing, authenticated end and ended-invitation rejection. Synthetic content only; zero Workers KV operations.
  • Build, SEO/static checks, desktop resource preparation, Wrangler dry run and dependency audit passed (zero audit vulnerabilities). Renderer assets total approximately 35.8 MiB, loaded on demand; every file is below the Pages 25 MiB limit. Generated bundles retain licenses and are marked generated for review.

CodeQL review: all 12 insecure-randomness findings were traced to the pinned Three.js renderer's local scene/object UUIDs. They are not cryptographic credentials and the renderer receives no share keys. Each alert was recorded as a false positive with a specific rationale; security scanning remains enabled.

Deployment and limits:

  • The compatible relay is already deployed as version 8fae9717-7864-4409-b3d7-9427860ae0af. Merge/deploy this PR's Pages assets and functions together, then run npm run check:live-relay.
  • Production frontend changes become active when this PR is merged and the matching Pages deployment succeeds. Actual native Windows/macOS/Linux webview acceptance remains separate from resource preparation and browser tests.
  • Private diagram/model previews are static; maps omit external basemap tiles. Remote includes, remote chart datasets and linked STL must be made self-contained. Inline snapshot length still depends on document size.
  • No additional Workers KV operations are required by rendering or link compaction. Durable Objects have separate allowances; this is not a promise of unlimited free usage. See docs/SHARING_USAGE.md and docs/SHARING_RENDERING.md.

@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
markdown-viewer Ready Ready Preview Nov 20, 2026 3:47pm UTC

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Deploying markdownviewer with  Cloudflare Pages  Cloudflare Pages

Latest commit: 78f4ae2
Status: ✅  Deploy successful!
Preview URL: https://d632fce7.markdownviewer.pages.dev
Branch Preview URL: https://fix-encrypted-sharing-render.markdownviewer.pages.dev

View logs

@ThisIs-Developer
ThisIs-Developer merged commit 38750b9 into main Nov 20, 2026
24 checks passed
@ThisIs-Developer
ThisIs-Developer deleted the fix/encrypted-sharing-rendering branch November 20, 2026 16:38
@ThisIs-Developer ThisIs-Developer added ✨ enhancement New feature, improvement, or usability enhancement. 🐛 bug Something is broken or not working as expected. 🔒 security Security vulnerabilities, hardening, CSP, API protection, or related fixes. labels Nov 20, 2026 — with ChatGPT Codex Connector

This branch was successfully deployed

1 active deployment
Preview — 78f4ae24 Deployed Nov 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something is broken or not working as expected. ✨ enhancement New feature, improvement, or usability enhancement. 🔒 security Security vulnerabilities, hardening, CSP, API protection, or related fixes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant