# spatial canvas os

- Status: `experiment`
- Track: [post-<a> hypermedia & composable islands](https://aifoc.us/labs/hypermedia-and-islands/)
- Layer: 2. Post-<a> Hypermedia & Composable UI
- Updated: 1 December 2026
- Live demo: https://spatial-canvas-os.kinlan-test.workers.dev
- Source: https://github.com/PaulKinlan/spatial-canvas-os

## Inspired by

- [hypermedia was always the point](https://aifoc.us/hypermedia/)
- [llms are becoming the new super-apps](https://aifoc.us/super-apps/)

## Hypothesis

- **Claim:** Mapping branching research graphs onto a URL-addressed `#cam=` 2D canvas (`OffscreenCanvas` + viewport culling) preserves parallel exploration context better than linear chat scrollback while staying bookmarkable.
- **Confirms it:** Panning, zooming, and expanding branching nodes serialize deterministically into shareable `#cam=x,y,z&g=...` URL hashes that reload the identical spatial viewport state.
- **Falsifies or bounds it:** DOM accessibility (screen readers, keyboard navigation, text selection) suffers on `<canvas>` surfaces unless mirrored alongside a synchronized semantic tree.

> **Why this exists:** A linear chat feed forces branching research—open documents, comparisons, follow-up threads, and live tools—into one chronological scroll bar where context gets buried. Moving work onto a 2D spatial canvas lets related nodes sit side by side while encoding the camera position and graph directly into the URL so any workspace state stays bookmarkable and shareable like a normal web page.


## What this lab tests

[Spatial Canvas OS](https://spatial-canvas-os.kinlan-test.workers.dev) ([GitHub](https://github.com/PaulKinlan/spatial-canvas-os)) renders branching research graphs on [`OffscreenCanvas`](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas) (with 2D Canvas fallback) driven by Pointer Events and serializes full camera coordinates and node state into shareable `#cam=x,y,z&g=...` URL hashes.


## Open questions to iterate on

- How should keyboard focus and accessible screen-reader DOM proxies sync smoothly during frustum culling at 60fps?
- Where is the readability crossover between infinite pan-and-zoom canvas nodes and spatial multi-pane hypermedia cards?

## Iteration log

- **2026-12-01:** Built `OffscreenCanvas` / 2D fallback spatial canvas workspace with Pointer Events and deterministic `#cam=` URL state hashing.
- **2026-12-01:** Moved the OffscreenCanvas workbench above the setup blueprint for 700px embeds, added deterministic `#cam=` round-trip verification and CSP-safe DOM syntax highlighting, and routed static assets through the Worker with `no-cache` headers.

## Primitives tested

- `OffscreenCanvas`
- `WebGPU`
- `SharedArrayBuffer`
- `Pointer Events`
- `URL Viewport Hash`

## Connected labs in other tracks

- [hypermedia islands lab](https://aifoc.us/labs/hypermedia-and-islands/hypermedia-islands-lab/) — Tests trail-based and StretchText hypermedia models that pair with spatial layouts.

---
Canonical: https://aifoc.us/labs/hypermedia-and-islands/spatial-canvas-os/
