Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
4c9e3fe
Create docs-migration-plan.md
alexwarren May 3, 2026
f8fd806
Merge branch 'main' into v5-docs-migrate
alexwarren Aug 14, 2026
9c6f2cc
feat: migrate Quest 5 docs from Jekyll into the Starlight site
alexwarren Aug 14, 2026
cef7340
fix: replicate the original Jekyll sidebar structure instead of alpha…
alexwarren Aug 14, 2026
1df7970
fix: honor just-the-docs nav_exclude instead of silently dropping it
alexwarren Aug 14, 2026
60722cd
fix: reconstruct full sidebar tree instead of flattening subcategorie…
alexwarren Aug 14, 2026
980386f
fix: disambiguate ASK/TELL titles, relativize self-links, set sitemap…
alexwarren Aug 14, 2026
2dea687
fix: drop the dead PathLib link instead of pointing at a broken archive
alexwarren Aug 14, 2026
b3e4c30
fix: don't leave a dangling unlinked attribution sentence
alexwarren Aug 14, 2026
18c0b24
fix: collapse sidebar groups by default
alexwarren Aug 14, 2026
8174ca9
fix: implement docs triage decisions and remove stale Quest 5 editor …
alexwarren Aug 14, 2026
a0246dd
feat: add Playwright harness for regenerating stale editor screenshots
alexwarren Aug 14, 2026
5d0f235
Merge branch 'main' into v5-docs-migrate
alexwarren Aug 15, 2026
e523c85
Merge branch 'main' into v5-docs-migrate
alexwarren Aug 15, 2026
6d4a646
feat: extend docs screenshot harness to the rest of the tutorial track
alexwarren Aug 15, 2026
67c3bd3
Merge branch 'main' into v5-docs-migrate
alexwarren Aug 16, 2026
004f645
feat(docs): add player screenshots and cursor overlay to docs-screens…
alexwarren Aug 16, 2026
efb5921
feat(docs): unblock custom_commands.md and more_things_to_do_with_obj…
alexwarren Aug 16, 2026
92bebd7
feat(docs): start regenerating non-tutorial docs screenshots
alexwarren Aug 16, 2026
5d89ec0
feat(docs): second wave of non-tutorial docs screenshots
alexwarren Aug 17, 2026
644f765
feat(docs): fourth wave of non-tutorial docs screenshots
alexwarren Aug 17, 2026
1752672
feat(docs): regenerate containers.md docs screenshots
alexwarren Aug 17, 2026
da4ba4d
feat: add "require all keys" toggle for lockable containers
alexwarren Aug 17, 2026
5e57a10
feat(docs): partial ask_simple_question.md docs screenshots
alexwarren Aug 17, 2026
4ba2aa3
Merge remote-tracking branch 'origin/main' into v5-docs-migrate
alexwarren Aug 17, 2026
0db9ecb
feat(docs): complete ask_simple_question.md docs screenshots
alexwarren Aug 17, 2026
4973f66
feat(docs): regenerate ask_about.md Asktell3.png
alexwarren Aug 17, 2026
c929b23
feat(docs): complete speak_to.md docs screenshots
alexwarren Aug 17, 2026
e4ab0ff
feat(docs): complete tutorial/custom_commands.md docs screenshots
alexwarren Aug 17, 2026
6e5f123
feat(docs): regenerate blocks_and_scripts.md nested_switch.png
alexwarren Aug 17, 2026
33192ef
feat(docs): regenerate adding_sounds.md editor screenshots
alexwarren Aug 17, 2026
14dc1c1
feat(docs): regenerate other_guides/unlockdoor.md docs screenshots
alexwarren Aug 17, 2026
e307255
feat(docs): regenerate other_guides/invisiclues.md docs screenshots
alexwarren Aug 17, 2026
8f2460a
feat(docs): restructure narrative docs into a task-oriented informati…
alexwarren Aug 17, 2026
9cc7cdf
fix(docs): dedupe Language Reference function pages with mismatched o…
alexwarren Aug 17, 2026
0a37c1e
fix(docs): normalize Guides titles and relocate two misplaced pages
alexwarren Aug 17, 2026
0123b46
fix(docs): reorder sidebar sections to follow a game-author's actual …
alexwarren Aug 17, 2026
306b829
fix(docs): dissolve Self-Hosting section, redistribute its 3 pages to…
alexwarren Aug 17, 2026
99d9d40
fix(docs): promote Multimedia to its own Guides subgroup
alexwarren Aug 17, 2026
e843ad5
fix(docs): content-accuracy pass on Commands & Parser guides
alexwarren Aug 17, 2026
3b798c1
fix(docs): drop stale "New in Quest 5.x" / "As of Quest 5.x" version …
alexwarren Aug 17, 2026
300ddc5
fix(docs): content-accuracy pass on World & Objects guides
alexwarren Aug 17, 2026
42f980c
Merge commit 'da4ba4d4' into v5-docs-migrate
alexwarren Aug 17, 2026
04ba7cb
fix(docs): rewrite transcript.md to match how Quest Viva players actu…
alexwarren Aug 17, 2026
af878f8
fix(docs): content-accuracy pass on Scripting guides
alexwarren Aug 18, 2026
bfad79a
fix(docs): inline the unit-testing framework instead of linking a fil…
alexwarren Aug 18, 2026
854e7d8
fix(docs): content-accuracy pass on Task Recipes guides
alexwarren Aug 18, 2026
ef9b0ae
fix(docs): correct the "in" operator's literal-list form in use_maths…
alexwarren Aug 18, 2026
59253e3
fix(docs): content-accuracy pass on NPCs & Dialogue guides
alexwarren Aug 18, 2026
aa8dbeb
fix(docs): drop stale desktop-vs-online editor distinctions site-wide
alexwarren Aug 18, 2026
05e8fb1
fix(docs): remove whereAmI docs - always returns "desktop" now, not a…
alexwarren Aug 18, 2026
84c92a2
fix(docs): content-accuracy pass on UI & Presentation guides
alexwarren Aug 18, 2026
4f080a5
fix(docs): remove server/latency-era claims now that WasmPlayer is th…
alexwarren Aug 18, 2026
ff22ecb
fix(docs): content-accuracy pass on RPG Mechanics guides
alexwarren Aug 18, 2026
bd4eac5
fix(docs): rewrite character_creation.md to use GetInput() instead of…
alexwarren Aug 18, 2026
c2eecab
feat(docs): regenerate character_creation.md screenshots for GetInput()
alexwarren Aug 18, 2026
05c1548
fix(docs): content-accuracy pass on Troubleshooting guides
alexwarren Aug 18, 2026
7e8ee22
fix(docs): cut two Troubleshooting pages that duplicate better conten…
alexwarren Aug 18, 2026
22d9bc3
fix(docs): content-accuracy pass on Community Recipes, and a necessit…
alexwarren Aug 18, 2026
d3e7a2a
fix(docs): content-accuracy pass on Multimedia guides
alexwarren Aug 18, 2026
5060487
feat(Engine): remove Vimeo support entirely
alexwarren Aug 18, 2026
a2b678c
fix(PlayerCore): restore JS.AddVimeo - it's runtime, not frozen per-game
alexwarren Aug 18, 2026
18f8756
fix(docs): holistic cross-subgroup pass - two missing cross-links, no…
alexwarren Aug 18, 2026
a333da9
feat(docs): move Changing templates into Guides, cut redundant Using …
alexwarren Aug 18, 2026
71098f1
feat(docs): merge JS functions reference into a single page
alexwarren Aug 18, 2026
ebc22ec
feat(docs): merge XML Elements reference into a single page
alexwarren Aug 18, 2026
40f2eec
feat(docs): merge Script commands reference into a single page
alexwarren Aug 18, 2026
a0a6e98
feat(docs): merge Attribute Types reference into a single page
alexwarren Aug 18, 2026
a4b9a3c
feat(docs): merge Attribute Reference into a single page
alexwarren Aug 18, 2026
07db88e
feat(docs): merge Functions reference into 14 category pages
alexwarren Aug 18, 2026
a532970
feat(docs): strip inert version-added trivia from merged Language Ref…
alexwarren Aug 18, 2026
9701ad9
feat(docs): address structural feedback on merged Language Reference
alexwarren Aug 18, 2026
f1a4607
feat(docs): fix hard-coded function labeling against actual engine di…
alexwarren Aug 18, 2026
1549426
feat(docs): format function/script signatures as code, badge hard-cod…
alexwarren Aug 18, 2026
aaf2a0e
fix(docs): copy edit on functions/hardcoded.md
alexwarren Aug 18, 2026
fed73ae
Merge branch 'main' into v5-docs-migrate
alexwarren Aug 18, 2026
00a9035
feat(docs): fix Publishing & Community accuracy issues, relocate Triz…
alexwarren Aug 18, 2026
1d2aa49
feat(docs): rename sidebar section "Publishing & Community" to "Publi…
alexwarren Aug 18, 2026
f1c7f51
feat(docs): remove Release Notes section, keep Older Versions under D…
alexwarren Aug 18, 2026
c5f9459
feat(docs): rewrite Developers section for the current architecture
alexwarren Aug 18, 2026
f0b2ee8
fix(docs): correct architecture.svg dependency arrows against actual …
alexwarren Aug 18, 2026
8116e29
fix(docs): stop self-referring to "this website" in open_source.md
alexwarren Aug 18, 2026
ede7323
feat(docs): sentence-case page titles for consistency
alexwarren Aug 18, 2026
104a975
feat(docs): merge "Customising the UI" 3-part series into one page
alexwarren Aug 18, 2026
018a8d6
feat(docs): sentence-case in-page headings for consistency
alexwarren Aug 18, 2026
eeb8ac5
feat(docs): remove Troubleshooting helpsheets, superseded elsewhere
alexwarren Aug 18, 2026
22dde8e
feat(docs): regenerate 9 editor screenshots against current AppShell
alexwarren Aug 19, 2026
55f67c8
feat(docs): regenerate 8 in-game-player screenshots against WasmPlayer
alexwarren Aug 19, 2026
6607da8
feat(docs): regenerate overview.md screenshots and start showing_a_ma…
alexwarren Aug 19, 2026
664387f
feat(docs): regenerate shop.md screenshots
alexwarren Aug 19, 2026
8c3d8db
feat(docs): regenerate adding_sounds.md's audio_controls.jpg
alexwarren Aug 19, 2026
7d05865
feat(docs): add showing_a_map.md's map7.png (Path border-type lobby m…
alexwarren Aug 19, 2026
324d9d0
feat(docs): finish showing_a_map.md - map3/map4/map5/map6
alexwarren Aug 19, 2026
16f72b5
fix(docs): map7.png was missing colours, labels, and stray exits
alexwarren Aug 19, 2026
f24cbe2
fix(docs): wait for grid canvas animation before screenshotting map i…
alexwarren Aug 19, 2026
6b184f1
fix(docs): clear save pill and backup banner before every screenshot
alexwarren Aug 19, 2026
01b1eee
feat(docs): document the 150 missing Core.aslx functions and add a CI…
alexwarren Aug 19, 2026
e9a1c26
docs: document the lookonly exit attribute
alexwarren Aug 19, 2026
393f4e1
docs: drop redundant per-function internal-core warnings
alexwarren Aug 19, 2026
0d55cc3
fix(docs): restore Cloak of Darkness download and move it under Guides
alexwarren Aug 19, 2026
8979ab8
docs: convert setext headings to ATX and sentence-case them
alexwarren Aug 19, 2026
2cde811
docs: add Quest script syntax highlighting and tag code blocks by lan…
alexwarren Aug 19, 2026
7b0c600
docs: dedent code block contents to a zero-column baseline
alexwarren Aug 19, 2026
4878d6a
fix(docs): clean up tutorial screenshots, links, URLs, and pseudo-hea…
alexwarren Aug 19, 2026
a575313
docs(scripts): collapse request's 23 headings into a reference table
alexwarren Aug 19, 2026
5c50408
docs: alphabetize request table, link its alternatives, fill JS gaps
alexwarren Aug 19, 2026
0d6d035
docs(js): add 15 more public JS.* functions, fix two accuracy bugs
alexwarren Aug 19, 2026
43192c2
fix(PlayerCore): restore WriteToLog as a no-op
alexwarren Aug 19, 2026
aa7aaa5
docs(scripts): drop obsolete/dead request names, un-deprecate Pause a…
alexwarren Aug 19, 2026
b0a76ae
feat(Engine): make AddPageLink/RemovePageLink available in Text Adven…
alexwarren Aug 19, 2026
7c95c17
docs: add Pages and Verbs to the tutorial, new dialogue Pages guide
alexwarren Aug 19, 2026
343385b
feat(Engine): add AddPageLink/RemovePageLink to the Script Adder
alexwarren Aug 19, 2026
7fb039c
Merge remote-tracking branch 'origin/main' into v5-docs-migrate
alexwarren Aug 19, 2026
a5dcc0d
docs: fix stale #status selector in JS.setCss examples, use #qv-status
alexwarren Aug 31, 2026
45fd19a
Merge branch 'main' into v5-docs-migrate
alexwarren Aug 31, 2026
aa0e0c4
docs: remove stale RequestSpeak/Speak references
alexwarren Aug 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .claude/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
"runtimeExecutable": "node",
"runtimeArgs": ["src/WasmPlayer/dev-server.mjs"],
"port": 5175
},
{
"name": "DocsSite",
"runtimeExecutable": "npm",
"runtimeArgs": ["run", "dev"],
"cwd": "site",
"port": 4321
}
]
}
132 changes: 132 additions & 0 deletions .claude/skills/docs-screenshots/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
---
name: docs-screenshots
description: Regenerate stale editor screenshots embedded in site/src/content/docs/ against the current AppShell editor, using a Playwright capture harness
---

# Regenerating docs editor screenshots

## Why this exists

The migrated Quest 5 docs (`site/src/content/docs/`) embed ~299 screenshots.
Most show the **old Quest 5 desktop/web editor** — a Windows Forms app with a
ribbon toolbar — which no longer exists. Quest Viva ships one unified editor
now (`src/AppShell/`, a SvelteKit SPA, same UI in a browser tab or the
Electron app). This skill captures fresh screenshots against that real,
running editor instead of by hand.

## Current scope

**In scope today:**
- **Editor-chrome screenshots** — pages showing the editor's own UI (tree,
tabs, forms, dialogs). Root `site/public/images/` and
`site/public/images/other_guides/`, roughly 150 images.
- **In-game player screenshots** (~60 images, showing gameplay output) — via
`openPreview`/`sendCommand` (see below), which drives the *same* AppShell
draft a capture script already built, through the real toolbar Preview
button into a live WasmPlayer tab. No separate `.aslx` fixtures needed — one
script can build the draft and capture both the editor states and the
resulting gameplay in one run.

**Out of scope — do not extend this harness to these without re-scoping first:**
- **`site/public/images/helpsheets/`** (~152 images) — a large, distinct
beginner-oriented track. Worth its own decision on approach before touching.
- **External/non-Quest images** — Trizbort app screenshots, YouTube embed UI,
hand-drawn diagrams like `architecture.png`. Not Quest UI; nothing to regenerate.

## How it works

`tests/e2e/docs-screenshots/` (part of the `quest-e2e` Playwright package —
see `.claude/skills/verify/SKILL.md` for the base convention this extends):

- **`lib.mjs`** — shared helpers: `createLocalDraft`, `selectTreeNode`,
`addElement`, `openTab`, `fieldByLabel`/`setLabeledField`/`selectLabeledField`,
`capture`, `openPreview`/`sendCommand` (player screenshots, see below), and
the `runCapture` try/finally wrapper. Reuse these rather than re-deriving
selectors — they're built on DOM patterns already proven out across
`tests/e2e/verify-appshell-*.mjs`.
- **One capture script per doc page**, e.g.
`capture-tutorial-creating-a-simple-game.mjs`. Each script walks through
*that page's own narrative* — the same room/object names and steps the
prose already tells the reader to perform — and calls `capture()` at every
point the doc currently embeds a screenshot, saving over the **existing
filename** in `site/public/images/`. Same filename in, same filename out —
no markdown edits needed.

Viewport is fixed at 960×800 (`lib.mjs`'s `VIEWPORT`), light theme, for a
consistent look across captures. Narrower than AppShell's usual 1280 dev-preview
width on purpose — Starlight downscales images to its ~700-800px content column,
so a narrower source image means less downscaling and more legible on-screen text.
`capture()` crops to the last relevant element's bottom edge (`untilLocator`)
rather than the full viewport height, since most states don't fill it.

## Adding a new capture script

1. Read the target doc page and note, in order, what state each embedded
image is meant to show — usually obvious from the surrounding prose (it's
literally instructing the reader what to click/type right before each image).
2. Start the AppShell dev server (`.claude/launch.json`'s `AppShell` config,
`npm run dev` in `src/AppShell`, port 5174).
3. Walk the same steps interactively first (browser tooling, or Playwright's
inspector) to confirm selectors/labels — **don't guess DOM structure**.
Property-panel fields have no id/name/aria-label; they're `<span>label</span>`
immediately followed by the input, which is what `fieldByLabel` encodes.
Watch for real ellipsis characters (`…`, not `...`) in placeholders, and
remember tab bars can have near-duplicate labels (e.g. an object has both
an "Object" tab and an "Objects" tab) — `openTab`/`addElement` use exact
role matching for this reason, not substring `:has-text()`.
4. Write `capture-<page-slug>.mjs` in `tests/e2e/docs-screenshots/`, importing
from `./lib.mjs`, following `capture-tutorial-creating-a-simple-game.mjs`
as the reference example.
5. Run it: `cd tests/e2e && node docs-screenshots/capture-<page-slug>.mjs http://localhost:5174`
6. `Read` each output image and check it actually matches what the doc prose
describes before considering it done (right object names, right tab, right
content — not just "a screenshot got saved").

## Capturing player (gameplay) screenshots

`openPreview(page)` clicks the toolbar's Preview button and returns the
WasmPlayer tab it opens (a second Playwright `page` in the same browser
context — Preview always opens via `window.open`, proxied to the same origin
so the editor tab and player tab can talk over `BroadcastChannel`; see
`vite.config.ts`'s `/player` proxy comment). **The original editor page must
stay open and untouched for the whole capture** — it's the thing answering
WasmPlayer's game-bytes request, including on every reload.

```js
const playerPage = await openPreview(page);
await sendCommand(playerPage, 'open fridge');
await capture(playerPage, out('Containerfridge.png'), { untilLocator: playerPage.locator('#txtCommand') });
```

`sendCommand` waits for the previous turn to finish (`window.canSendCommand`)
both before and after submitting, so the transcript is fully settled by the
time you call `capture()` — no arbitrary `waitForTimeout`. `capture()` itself
is unchanged and works against either page; `#txtCommand` is always the last
element in the transcript, so it's the natural `untilLocator` for player shots.

**Gotcha:** several container/object fields the tutorial text references
(e.g. "List children when object is looked at or opened") are flagged
`<advanced/>` in the `.aslx` control definition and live behind a collapsed
"Advanced" `<summary>` at the bottom of their tab (see
`tests/e2e/verify-appshell-advanced-controls.mjs`) — invisible, and
`.check()`/`.fill()` will hang waiting for visibility, until you click
`page.locator('summary', { hasText: 'Advanced' })` open first.

## Pointing at a specific control

`capture()` takes an optional `cursorAt` to draw a synthetic cursor (a real
screenshot never captures the actual OS pointer) at a locator's position —
either the locator itself (tip centered on it) or `{ locator, at }` with
`at` one of `'center' | 'left' | 'right' | 'top' | 'bottom'`, e.g. pointing at
the left edge of a dropdown you're about to describe opening. Note this only
*points at* a control — it can't show a native `<select>` actually open
(that's an OS-level popup outside anything a page screenshot can capture);
for "here's what to pick" framing on a native select, show it closed with the
cursor on it, then capture the *result* state after selecting.

## Re-running when the editor UI changes

AppShell is under active development. When its UI visibly changes in a way
that makes existing captures stale, re-run the affected `capture-*.mjs`
scripts rather than manually redoing screenshots by hand — that's the entire
point of this harness existing.
4 changes: 4 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ jobs:
run: npm ci
working-directory: site

- name: Check function reference docs are in sync with Core.aslx
run: npm run check-function-docs
working-directory: site

- name: Build
run: npm run build
working-directory: site
Expand Down
57 changes: 57 additions & 0 deletions docs-migration-plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Quest 5 Docs Migration Plan

Migrate Quest 5 documentation from GitHub Pages (Jekyll, v5 branch `/docs/`, hosted at docs.textadventures.co.uk/quest) into the Astro/Starlight site (main branch `/site/`, hosted at questviva.com).

**Why:** Docs for both versions will live in one place, gaining built-in search, consistent UI, and easier maintenance. Most Quest 5 content applies equally to Viva, so there's no need for a separate namespace.

## Decided

- **No `/quest5/` URL prefix** — Quest 5 docs merge into the main namespace alongside Viva docs. Where something is v5-specific or not yet in Viva, use inline Starlight admonition callouts rather than structural separation.
- **Redirects** — a single Cloudflare Pages wildcard rule in `public/_redirects`: `docs.textadventures.co.uk/quest/*` → `questviva.com/:splat`
- **Source of truth** — Quest 5 docs move permanently to the main branch. The `docs/` folder in v5 branch will be removed after migration. Edit links will work correctly as everything will be in main.
- **GitHub Pages** — `docs.textadventures.co.uk` stays live and redirects to Cloudflare. DNS is controlled and can be configured as needed.
- **Jekyll syntax audit** — Required as part of Phase 1 before scripting the migration.

## Migration steps

### Phase 1 — Prep

- Audit for Liquid/Jekyll syntax (`grep -r '{%\|{{' docs/` excluding `_site/`)
- Audit link patterns (`grep -r '\.html' docs/` excluding `_site/`) to understand consistency

### Phase 2 — Content migration script

Copy from v5 branch `docs/` → main branch `site/src/content/docs/`, skipping `_site/`, `_layouts/`, `_config.yml`, `Gemfile*`, `*.sh`, `*.css`:

1. Strip `layout: index` from all frontmatter
2. Rewrite internal `.html` links → remove extension (e.g. `foo.html` → `foo`)
3. Move images to `site/public/images/` and update image paths in markdown
4. Move audio/other assets to `site/public/`

### Phase 3 — Astro config

- Add Quest 5 sections to sidebar in `site/astro.config.mjs` (autogenerate or manually structure: Tutorial, Guides, Functions, Attributes, etc.)
- Update site title if needed

### Phase 4 — QA

- `astro build` — Starlight's broken link checker will surface issues
- Spot-check image rendering
- Check sidebar navigation

### Phase 5 — Redirects

- Add `public/_redirects` with wildcard rule
- Verify old URLs redirect correctly

### Phase 6 — Cleanup

- Remove Jekyll docs from v5 branch (or leave as archive)
- Remove `_site/` pre-built output from v5 branch (42MB, no longer needed)

## Scale

- 739 markdown source files
- ~800 images (PNG/JPG)
- 3 audio files
- Key subdirectories: `functions/` (304 files), `helpsheets/` (185), `attributes/` (151), `guides/` (53), `scripts/` (41), `tutorial/` (16)
Loading
Loading