# hypermedia islands lab

- 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://hypermedia-islands-lab.kinlan-test.workers.dev
- Source: https://github.com/PaulKinlan/hypermedia-islands-lab

## Inspired by

- [hypermedia was always the point](https://aifoc.us/hypermedia/)
- [A link is all you need](https://aifoc.us/a-link-is-all-you-need/)
- [embedding is the web's composability superpower](https://aifoc.us/embedding/)

## Hypothesis

- **Claim:** Implementing all four hypermedia directions (`A -> B`, `A <- B` StretchText/transclusion, `B -> A` backlinks, `B <- A` shareable `#trail=` hashes) alongside isolated `MessageChannel` islands lets web documents compose context without origin collapse or link rot.
- **Confirms it:** Readers inspect live HTTPS documents inline via SSRF-safe proxy, serialize shareable `#trail=` paths with Text Fragments, and compare all four widget embedding modes without leaking host globals.
- **Falsifies or bounds it:** CSPs, `X-Frame-Options`, and dynamic JS hydration prevent safe transclusion or StretchText across real public publisher origins.

> **Why this exists:** HTML standardized only one-way `A -> B` navigation links, leaving inline context expansion (StretchText), shareable reading trails, and capability-isolated multi-origin widgets unstandardized. This lab tests four-direction hypermedia primitives alongside four `<web-island>` embedding modes side by side.


## What this lab tests

HTML standardized `A -> B` navigation while leaving bidirectional inbound links (`B -> A`), inline StretchText transclusion (`A <- B`), shareable `#trail=` Memex paths (`B <- A`), and capability-isolated cross-origin widgets unresolved.

[Hypermedia Islands Lab](https://hypermedia-islands-lab.kinlan-test.workers.dev) ([GitHub](https://github.com/PaulKinlan/hypermedia-islands-lab)) runs StretchText, [View Transitions](https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API), optional local `Summarizer`, [URL Text Fragments](https://developer.mozilla.org/en-US/docs/Web/URI/Reference/Fragment/Text_fragments), `#t=` Web Audio anchors, and an SSRF-shielded `/api/fetch-doc` proxy alongside a 4-mode component bench and directed-graph PageRank simulator.


## Open questions to iterate on

- How reliably do `#:~:text=` URL fragments survive dynamic layouts on real web articles?
- Can `A <- B` publisher transclusion preserve origin citations automatically using RFC 9421 signatures?

## Iteration log

- **2026-12-01:** Built 4-direction hypermedia workspace, SSRF-shielded `/api/fetch-doc` proxy, 4-mode `<web-island>` comparator, and PageRank/login-wall simulator.
- **2026-12-01:** Removed inline scripts from `/islands/seat-picker`, fixed opaque-origin `connect-src` CSP, added upstream framing/hydration diagnostics to `/api/fetch-doc`, added CSP-safe DOM syntax highlighting, and tuned 700px embed responsiveness with `no-cache` headers.

## Primitives tested

- `Text Fragments (#:~:text=)`
- `View Transitions API`
- `Summarizer API`
- `MessageChannel`
- `ResizeObserver`
- `crypto.subtle ECDSA P-256`

## Connected labs in other tracks

- [<web-island> multi-origin host shell](https://aifoc.us/labs/hypermedia-and-islands/web-island-host-shell/) — Deep-dives into multi-origin discovery (`/.well-known/web-island.json`) and batched WebMCP approval.
- [signed web citations](https://aifoc.us/labs/web-protocols/signed-web-citations/) — Adds cryptographic verification to quoted transcluded snippets.

---
Canonical: https://aifoc.us/labs/hypermedia-and-islands/hypermedia-islands-lab/
