Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
af46ce7
feat(playground): add strict schema-2 authoring workbench boundary
christophersesugh Nov 15, 2026
4b0fe9b
feat(playground): replace reference viewer with public authoring studio
christophersesugh Nov 15, 2026
f84c6f7
style(playground): create responsive public-facing authoring studio
christophersesugh Nov 15, 2026
911d7f2
feat(playground): update public page identity and metadata
christophersesugh Nov 15, 2026
3d98c8a
docs(playground): prepare branded static site and Cloudflare hosting …
christophersesugh Nov 15, 2026
e347ad4
docs(playground): prepare branded static site and Cloudflare hosting …
christophersesugh Nov 15, 2026
8009fef
docs(playground): prepare branded static site and Cloudflare hosting …
christophersesugh Nov 15, 2026
fa4dc00
test(playground): cover validated live authoring and non-executable p…
christophersesugh Nov 15, 2026
3473b33
test(playground): integrate workbench tests and preview typechecks
christophersesugh Nov 15, 2026
5f26589
test(playground): integrate workbench tests and preview typechecks
christophersesugh Nov 15, 2026
4134e7c
docs(playground): describe public editor instead of development preview
christophersesugh Nov 15, 2026
dab1a2d
docs(changelog): record public authoring playground enhancement
christophersesugh Nov 15, 2026
4d930a0
test(playground): add built-site Chromium authoring smoke audit
christophersesugh Nov 15, 2026
3293c8d
test(playground): expose built-site browser smoke command
christophersesugh Nov 15, 2026
3615330
ci(playground): verify built public editor in Chromium on head and merge
christophersesugh Nov 15, 2026
e8e9856
perf(playground): bound syntax token lookahead and clarify compile fe…
christophersesugh Nov 15, 2026
a2c10cc
style(playground): match syntax layer and textarea font metrics
christophersesugh Nov 15, 2026
eb83744
fix(playground): paste complete thl fence as a full document
christophersesugh Nov 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ jobs:
retention-days: 30
- name: Install browser
run: pnpm exec playwright install --with-deps chromium
- name: Audit built public authoring playground
run: pnpm audit:playground
- name: Browser tests
run: pnpm test:browser:run
- name: Record verified Chromium browser evidence
Expand Down Expand Up @@ -135,6 +137,7 @@ jobs:
pnpm preview:build
pnpm test:run
node scripts/verify-release-evidence.mjs
pnpm audit:playground
pnpm test:browser:run
pnpm build
pnpm audit:licenses
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ All notable changes to Throughline are recorded here. Package versions follow

### Added

- Replaced the fixed-reference Vite development preview with a public-facing,
static schema-2 authoring playground. It now supports editable JSON with
syntax highlighting, exact semantic/compiler diagnostics, debounced native
Graph/Sequence/State-table and Explain/Inspect preview, safe reference
loading, format/copy/export actions, responsive editor/preview tabs,
appearance and width controls, and Cloudflare Pages deployment guidance.
Prose remains inert until independently reviewed; the playground does not
publish the npm package or perform AI materialization.
- TL-U18 establishes an exact-head, machine-readable schema-2 release-quality gate: deterministic small/moderate/near-limit fixture hashes and compile/index/query/projection/geometry timings with runner metadata; a seeded negative-input sweep; 260px keyboard/semantic-accessibility browser regressions; separately attested Chromium/Firefox/WebKit runs; a checked independent packed SSR consumer at 260/320/375 CSS px; and CI artifacts plus a read-only evidence verifier. Results use hard correctness/resource budgets, not invented CPU or learning-outcome claims. Maintainer review caught incomplete merge-result CI, 12 repeatedly sampled attack strings and vacuously passing empty-edge geometry: these are corrected with a full proposed-merge CI replay, 144 unique seeded malformed inputs (12 mandatory classes) and an all-edges-preserved bounded-geometry gate. Real screen-reader acceptance is **still pending TL-U18** and cannot be reclassified as an automatic DOM test or postponed to TL-U19 without an accepted spec amendment; a dated SHA-bound human test template is provided. Native zoom is also a manual release check. The previously stale manual publisher export map now checks the schema-2 Node entry and `thl` binary. No package was published.
- TL-U10 adds a separately packed Node 24+ `thl` CLI with strict
`validate`, `materialize` and `check` commands. Materialization computes
Expand Down
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,20 +283,29 @@ The Graph and Sequence views only render declared facts.
A sequence request without message events falls back to a state table
instead of inventing messages.

## Local development preview
## Interactive authoring playground

[The Vite playground](playground) uses the current **source** versions
of the four schema-2 artifacts and the native player. With Node.js 24+
and the repository's pinned pnpm version:
[The Throughline Playground](playground) is a public-facing, static authoring
studio built against the current **schema-2 repository source**, independently
of the npm registry. Write or paste strict JSON into the editor, get compiler
diagnostics, and explore the resulting Graph, Sequence, State table and
Explain/Inspect views. Load and edit four verified reference examples; format
valid source, copy a `thl` Markdown fence or export a validated JSON artifact.
Unreviewed prose remains inert and cannot be previewed without its separately
approved materialization.

With Node.js 24+ and the repository's pinned pnpm version:

~~~sh
pnpm install --frozen-lockfile
pnpm preview:typecheck
pnpm dev
~~~

Open http://localhost:5173 to inspect states and source events and
read the matched explanations/questions at desktop, tablet and mobile
widths. The preview is excluded from the published npm package.
Visit http://localhost:5173. The playground is a browser-only static site with
responsive authoring and preview layouts; it is **not** an npm package feature
or proof of the new npm version's publication. See
[the playground guide and Cloudflare Pages deployment handoff](playground/README.md).

## Behind the model

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"scripts": {
"dev": "vite --config playground/vite.config.ts",
"preview:build": "vite build --config playground/vite.config.ts",
"audit:playground": "node scripts/audit-playground.mjs",
"preview:typecheck": "tsc -p tsconfig.preview.json",
"build": "tsdown && node scripts/verify-dist.mjs",
"typecheck": "tsc --noEmit",
Expand Down
82 changes: 82 additions & 0 deletions playground/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Throughline Playground

A static, browser-only authoring workspace for schema-2 VisualArtifact JSON. This
is the public-facing experience, not a fixed development preview or a separately
published package. It imports the current repository source, so deployment must
be aligned with a reviewed and tested commit.

## User workflow

- Load one of four reference artifacts, or select **New trace**.
- Edit strict schema-2 JSON and see semantic compiler diagnostics after a brief
pause. The path in a diagnostic refers to the JSON artifact.
- On a valid artifact, use Graph, Sequence, State table and Explain/Inspect in
the native player; change its width, presentation theme or playback settings.
- **Format** canonicalizes an already valid artifact into indented JSON.
- **Copy thl** copies a fenced Markdown snippet; **Export** downloads a validated
JSON artifact. Invalid or unreviewed prose is not exported as runnable data.
- Pasting a single complete `thl` Markdown fence unwraps it into editable JSON.
- Edits remain in the current browser tab; there is deliberately no account,
save service, telemetry, network-backed compiler or automatic AI generation.

The editor interprets a body beginning with `{` as strict schema-2 JSON, just
as the source library does. Any other nonempty body is descriptive intent:
it needs independently reviewed materialization and a trusted host's approved
sidecar. The public playground deliberately does not fabricate that step.

## Local development

From the repository root, with Node.js >=24 and the pinned pnpm:

```sh
pnpm install --frozen-lockfile
pnpm preview:typecheck
pnpm dev
```

Visit http://localhost:5173. Before release, run:

```sh
pnpm test:run
pnpm preview:build
pnpm test:browser:run
```

The static output lives in **playground/dist**. No backend routes, API keys or
service bindings are necessary. The package's own `pnpm build` and tarball do
not include the playground.

## Cloudflare Pages deployment (maintainer setup)

Suggested hostname: **playground.0xbuff.com**, after the maintainer has
confirmed DNS ownership. This proposal does not create DNS or deploy the app.

Connect this public repository to a Cloudflare Pages project and configure:

| Setting | Value |
| --- | --- |
| Source branch | `main` after the PR is reviewed and merged |
| Root directory | Repository root |
| Build command | `corepack enable && pnpm install --frozen-lockfile && pnpm preview:build` |
| Output directory | `playground/dist` |
| Build environment | Node.js 24 (set `NODE_VERSION=24` if needed) |
| Environment variables / secrets | None required by the playground |

The pinned `packageManager` is `[email protected]`. Ensure the Pages build
environment supports Corepack/pnpm for that version. Verify the Pages preview
deployment, keyboard navigation, paste/edit/validation, theme, narrow viewport,
console errors and actual artifact export **before** attaching a public custom
domain. In Cloudflare Pages, use the project's **Custom domains** control to
attach the chosen subdomain and follow the DNS guidance for the zone; confirm
the certificate and HTTPS before announcing the URL.

The `public/_headers` file is copied into the static build and adds basic
security and privacy headers when served by Cloudflare Pages. Cloudflare
deployment credentials and DNS records must never be committed to this repo.

## Release boundaries

The playground follows the checked-out schema-2 **source**, not the currently
published npm release. A successful preview deployment is not evidence of npm
v0.2.0 publication, TL-U18 real screen-reader acceptance or completion of
the planned higher-level ThroughlineDocument/VisualPlan capabilities.
9 changes: 8 additions & 1 deletion playground/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Throughline · Local React player preview</title>
<meta name="theme-color" content="#f7f8fc" />
<meta name="description" content="Author and explore deterministic state visualizations. Edit a schema-2 artifact, validate its semantics, and preview every step with Throughline." />
<meta property="og:type" content="website" />
<meta property="og:title" content="Throughline Playground — Make state visible" />
<meta property="og:description" content="Write, validate, and explore state traces with the interactive Throughline authoring playground." />
<meta name="twitter:card" content="summary" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<title>Throughline Playground — Make state visible</title>
</head>
<body>
<div id="root"></div>
Expand Down
Loading
Loading