Skip to content

Sharing polish: server-enforced read-only, portable Download/Load, deprecate chat mode#22

Open
davidackerman wants to merge 4 commits into
mainfrom
feature/sharing-polish
Open

Sharing polish: server-enforced read-only, portable Download/Load, deprecate chat mode#22
davidackerman wants to merge 4 commits into
mainfrom
feature/sharing-polish

Conversation

@davidackerman

Copy link
Copy Markdown
Owner

Follow-up to #21 — polishes the sharing story and starts the cleanup.

  • Read/write protection, now server-enforced. A ?view=1 viewer registers with viewOf and may never persist — enforced at the bridge, not just client-side, so a recipient who speaks the WS protocol still can't write back to the owner's saved session. (Remaining gap, noted in code: a peer registering as the owner's own id needs a write-token capability — a future hardening.)
  • Portable, forkable Download / Load workspace. ⬇/⬆ buttons — download the workspace (viewer state + table data + plot images) as a .json; anyone loads it into their own copy, no live bridge needed on their side. This is the answer to off-VPN sharing ("here's some cool stuff, load it yourself"). Computed layers stay portable as long as their source is http/s3-reachable.
  • Agent trace defaults collapsed (and exportable) — provenance you tuck away or export to reproduce, not always-on chrome.
  • Deprecate chat mode. workspace is now the default; ?mode=chat still works but logs a deprecation warning and will be removed after a window.
  • Bridge announces its LAN IP on register, so a shared/hosted session's computed-layer artifact URLs target the host machine instead of localhost (reachable by LAN/VPN peers).

- Read-only sharing is now enforced at the bridge, not just client-side: a
  connection that registers with `viewOf` (a ?view=1 viewer) may NEVER persist,
  so a recipient who speaks the WS protocol still can't write back to the shared
  session. (A peer registering as the owner's own id is still possible without a
  write token — a future capability-token hardening.)
- The Agent Trace panel defaults collapsed (it's provenance you can expand or
  export, not always-on chrome).
Adds ⬇ Download / ⬆ Load buttons to the workspace panel. Download writes the
current snapshot (viewer state + table data + plot images — the same shape
persistence uses) to a portable .json file. Load applies a file into the
loader's OWN session (their own copy), so it's a forkable share that needs no
live bridge on the recipient's side — the answer to off-VPN sharing ("here's
some cool stuff, load it yourself"). Computed layers stay portable as long as
their source is reachable (http/s3); the bridge /artifacts/ is the LAN version.
DEFAULT_MODE flips to "workspace" — the agent-driven workspace is the product.
Legacy ?mode=chat still works but is deprecated: it logs a one-time console
warning and will be removed after a deprecation window. New work should drive
the workspace from an external agent, not chat mode.
On register the bridge reports its first non-internal IPv4 (host:port); the
page uses it for computed-layer artifact URLs instead of "localhost", so a
shared/hosted session's layers are fetchable by a LAN/VPN peer (not just the
owner). Falls back to the page's connect host if no IP is found.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 11, 2026

Copy link
Copy Markdown

Deploying tourguide with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8ea26a8
Status: ✅  Deploy successful!
Preview URL: https://0a3ce733.tourguide-8j4.pages.dev
Branch Preview URL: https://feature-sharing-polish.tourguide-8j4.pages.dev

View logs

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