Skip to content

copper-cloud 0.11.0: canvases served by a linked Canvas Cloud (link proxy + migration) - #3

Merged
astherath merged 11 commits into
mainfrom
feat/canvas-link
Oct 19, 2026
Merged

astherath merged 11 commits into
mainfrom
feat/canvas-link

Conversation

@astherath

@astherath astherath commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Draft — based on 0.10.0 (addons, merged); this is 0.11.0. Release notes: docs/v0.11.0.md.

Canvases move out of copper-cloud into a linked, standalone Canvas Cloud server.

  • Canvas link (crates/canvas-link): copper-cloud proxies the unchanged canvas API (/v1/canvases…, /people, /invites, /canvas-links, /mentions, the y-websocket room) to the linked Canvas Cloud as the signed-in user (app key + acting-user header). Coppers need no update. Users are provisioned lazily and by a reconcile loop/outbox; reconcile never deletes (canvas sync-users --prune does, explicitly). Canvas Cloud events are bridged into /v1/sync/events. Errors: never forwards an upstream 401; 502 canvas_upstream when unreachable, 503 canvas_unavailable when unlinked; WS keepalive + 1011 on upstream loss.
  • crates/canvas removed (it lives on in Canvas Cloud, with history).
  • Migration (crates/canvas-migrate, copper-cloud canvas migrate): copies legacy canvases (ids, members, user ids, invites, share-link digests, mentions, full update history) into Canvas Cloud via its import API, verified per canvas by document digest; idempotent, --dry-run, --only, --replace. Legacy tables are left untouched (rollback documented).
  • Portal: Canvas Cloud page (link/unlink/test/sync), unlinked states for Canvases + Overview.
  • CLI/doctor: canvas link|unlink|status|sync-users|migrate; doctor canvas-link check.
  • Docs: canvas-link.md, canvas-migration.md (runbook + rollback), API/architecture/operations/security updates.
  • Migration 0030_canvas_link.sql.

Validation: fmt, clippy -D warnings, full workspace tests (native PostgreSQL), portal tsc/eslint/prettier. End-to-end rehearsal on a copy of dev1 (old → link → migrate → diff every user's view → rollback drill) in progress.

…nvas crate

copper-cloud no longer stores canvases itself. crates/canvas (now the engine of the
standalone copper-browser/canvas-cloud server, history preserved there) is removed and
replaced by crates/canvas-link:

- reverse proxy for the unchanged /v1 canvas API (canvases, invites, canvas-links,
  mentions, people) inside the instance gate, acting as the signed-in Copper user via the
  app key + X-Canvas-User; upstream 401s are never forwarded (clients would sign out),
  outages are 502 canvas_upstream / 503 canvas_unavailable, never 404 or empty lists
- WebSocket pipe for /v1/canvases/{id}/ws: upstream handshake first, binary-exact frames,
  close codes and reasons forwarded both ways, 1001 on shutdown
- event bridge from /v1/apps/self/events into the per-user SSE (event: canvas)
- user provisioning (batch on link, JIT on unknown_user, 10 min reconcile, outbox for
  disable/delete), optional SHA-256 leaf pin for a self-signed Canvas Cloud
- admin API /admin/api/canvas-link (+ /test), canvases list/delete and overview counts
  sourced from the link, doctor check, CLI copper-cloud canvas link|unlink|status|sync-users
- migration 0030_canvas_link.sql; 0100-0103 stay byte-identical for existing installs
- /v1/info features gains canvas_link
copper-cloud canvas migrate [--dry-run] [--only ID]... [--replace] [--concurrency N] [--json]
streams every legacy canvas (snapshot + updates unsealed with the Copper KEK, members,
invites, share-link digests, mention excerpts) as import format v1 to the linked Canvas
Cloud, with canvas ids, user ids and share tokens preserved. Each import is verified by
document digest and recorded in canvas_migrations; legacy tables are never modified, so
rolling back is reinstalling the previous release.
New console page to link, test, re-key and unlink a Canvas Cloud, with event-bridge status
and the migration ledger summary. The Canvases page and the Overview tiles show an explicit
not-linked / unreachable state instead of numbers.
…ds null names

The 10-minute reconcile used to delete Canvas Cloud app users whose Copper account was
gone, with their canvases. Restoring an older copper-cloud backup would have wiped newer
users' canvases on Canvas Cloud. Reconcile now only counts and logs orphans; deleting them
is an explicit operator action: copper-cloud canvas sync-users --prune.

canvas migrate provisions empty display names as null, like the link does. The migration
test database follows the repo's naming (COPPER_CLOUD_TEST_MIGRATE_DATABASE_URL,
copper_cloud_test_migrate).
…Canvas Cloud

New docs/canvas-link.md (architecture, proxy and error mapping, WebSocket pipe, event
bridge, provisioning, TLS, admin API, CLI, security) and docs/canvas-migration.md (what is
preserved, runbook, re-runs, ledger, troubleshooting, rollback). canvas.md and
canvas-protocol.md become pointers to Canvas Cloud with their anchors kept; architecture,
api, admin-api, operations, security, install, README and deploy/aws updated.
…y process; outbox polled every 5 s); pass Canvas Cloud resync on to every Copper stream; migration docs: pre-0.11 dump, digest-500/unverifiable rows, rollback drops the trigger; people scope
…un fails (not 'already') a canvas edited on the old release since its import
…0.1.0 installer inputs; RDS DATABASE_URL; set ops.extra_url_schemes in place
…canvas {kind: resync} (Copper for Mac refreshes its canvas list and invites only on canvas events)
@astherath
astherath marked this pull request as ready for review October 19, 2026 22:26
@astherath
astherath merged commit 8206855 into main Oct 19, 2026
2 checks passed
@astherath
astherath deleted the feat/canvas-link branch October 19, 2026 22:53
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