Repository navigation
EN Studio Preview Apply Undo
Français · Type: explanation · Audience: author · Context: local Studio · Status: ready · Applies from: 4.2.1
The local Studio · contract: stable · verified by CI (support matrix of 4.4.0, 2026-10-23): Chromium end to end (the Studio's checks); Windows: the unit suite only · automated checks: jobs
e2e,windows; CI plane2e,windows; 2 test files · people's passes:studio-hero-matrixnot run (#238) · known limits:undo-session-only
Every edit the local Studio makes goes the same way: shown as a diff first when you ask, judged on the game as it would be, written whole or not at all, and undoable. This page says why it works that way and where it stops.
A game is TypeScript and JSON files that people, editors, git and AI agents all touch. The Studio must change those files without breaking them and without hiding what it changes. So:
- Preview the change. In a form ("Preview the change"), the server computes the exact diff it would write and writes nothing: a dry run. You read the code the form produces before it exists.
-
Apply. "Apply" writes the value as code in the file's own style, through the TypeScript parser: comments and
the rest of the file stay as they were. The same path is used by the
set_valueMCP tool. - The guard. Every write whose files the validator reads is judged on a copy of the game as it would be after it. If it adds a validation error (or the game would no longer load), it is refused with 422 and the errors, and nothing is written. Texts are guarded too. An edit that would break the file's syntax is refused (500) before that.
-
One operation, all or nothing. Each write is one operation of the game's journal
(
studio-server/src/ops/journal.ts, kept in.cache/studio-journal/): every file it touches is written at once or not at all, durably (fsync); an operation a crash interrupted is finished when the Studio opens again. Adding a prop writes the room and its layout as one operation, undone in one step. Writes are serialised. - Changes from outside. A change made outside the Studio (an editor, an agent, git) is recorded in the journal before the next write touches that file. A file another process rewrites while an edit is being prepared is a 409: the Studio never writes over what it did not read.
- Undo / Redo. The header's Undo (Ctrl/Cmd+Z) and Redo (with Shift) cover every write of the session: texts, values, layouts, voices. An undo is itself a new operation (each file back to its content before), never a rewrite of history. It refuses (409) when the file changed since.
Guarantee ·
dry-run-writes-nothing· referenced · scope self-checked by the author (AI), not reviewed A preview writes nothing; an applied write lands in the Undo history, and can be undone and redone.
Guarantee ·
edit-taken-back· referenced · scope self-checked by the author (AI), not reviewed An edit that would add a validation error is refused (422) with nothing written, and an undo refuses a file that changed since the write.
- Writing what the form says, then validating. Before 4.2.1 a structured write was written, validated, then taken back if it broke the game; now the game is judged as it would be, before anything is written.
- Regenerating the room file from data. The Studio could own the room files and rewrite them whole. It would lose your comments, your helpers and your layout of the code; the TypeScript parser edits only the literal or the value at the path.
- A Studio-only history. Undo could live in the page. It lives on the server side, over the journal, so an undo sees a file the AI or git changed meanwhile and refuses rather than overwrite it.
- A write waits for a validation of the whole game: on a big game, applying takes the time of
npm run validate. - The guard judges what the validator sees. A text built by code (a shared constant, a helper) is not reachable by the Studio, and what the validator does not check (a joke that falls flat) is not caught.
- The undo stack of the local Studio belongs to the Studio's process: it covers the writes made through that Studio since it started. An agent's writes through the MCP server (another process) are not on it; take them back with git.
Limit ·
undo-session-onlyUndo and Redo cover the writes of the current Studio session only. After a restart, or for a change made outside the Studio, use git (git diff,git checkout -- <file>).
- The journal and the guard came with 4.2.1 (
CHANGELOG.md, 4.2.1); the hosted Studio uses the same journal with per-member undo (Concepts). - Sources:
studio-server/src/ops/core.ts,studio-server/src/ops/undo.ts,src/studio/structured.ts. - Where it is used: Edit a room, Language and objectives.
Generated publication · publication générée — current documentation · documentation courante: quest'n'click 4.4.0 r1, documentation revision · révision de la documentation 8dc717c69acb62c4742b69c54a7e7dfb620f75d8.
Earlier versions and permalinks · versions précédentes et liens permanents: https://wanoo.github.io/quest-n-click/docs/
An edit made in this wiki is overwritten at the next publication · une modification faite dans ce wiki est écrasée à la publication suivante.
Edit the source · Modifier la source · Report an error · Signaler une erreur
Index (6)
Start (6)
Play (9)
Install (17)
- Requirements
- Install from the release archive
- Install from npm, once published
- Install from the repository to work on the engine
- doctor: checking your machine
- Image toolchain
- Audio toolchain: ffmpeg, fluidsynth, Furnace, uv
- Upgrade
- Upgrade notes: 4.4
- Upgrade notes: 4.3
- Upgrade notes: 4.2
- Upgrade notes: 4.1
- Upgrade notes: v3
- Upgrade notes: v2 to v3
- Coming from web-scumm
- Package reference
- Install troubleshooting
Create a game (55)
- Your first game
- Layout of a created project and of the engine repository
- The working loop
- Content principles and the identity contract
- Rooms
- Geometry: placement, walk zones, masks, layers, camera
- Something is visible but unreachable
- Reactions
- Game commands
- Conditions
- Flags, variables and events: which to use
- Custom code
- Characters
- Items and inventory
- World map
- Dialogues
- Scripts and events
- Moving characters: patrols and walks
- Exits
- Chapters and objectives
- State and saves: persistent or temporary, renaming an id, migrations
- Staging: wide rooms and animations
- The stage: lights, particles, floors
- Skin and fonts
- Title and credits
- Heroes: several characters and hero choice
- Built-in minigames
- A custom minigame
- Translations
- Music in stems
- Sound effects
- Voices: per language and per hero
- Images: prompts, cutting sheets, transparency, scale
- Asset provenance
- The storyboard, source of truth
- Puzzle design
- Classic mechanics
- Review pages
- DSL reference
- Checking your game
- What the solver proves
- Solver options
- Playtests
- Remix
- Speedrun for authors
- The sealed ending
- Production template
- Example games
- Working with an AI
- Build and release a game
- Publish on GitHub Pages
- The static game on Clever Cloud
- Other static hosts
- Sub-path, cache and service worker, incomplete deploys, going back
- Testing on a phone over the LAN
Local Studio (24)
- The local Studio: overview and launch
- Edit a room
- Placement and stage
- Preview, apply, undo
- Storyboard
- Assets and cutting
- Check: validator, solver, critical path, heat, health, coverage
- Before and after captures
- Semantic diff
- Play and replay a session
- Rule explainer
- Language and objectives
- Voices and the heroes × languages matrix
- Map
- Notes
- Remix in the Studio
- Music
- The Assistant: bring your own key
- Demo mode and studio-apply
- Local and LAN security
- Studio API
- Local MCP: setting up each client
- MCP tools
- Studio troubleshooting
Team Studio (21)
- What runs where
- Concepts: revision, transaction, span, lease, preview, build
- Starting as an invited dev
- Working together day to day
- Roles and actions: the full matrix
- Invitations
- Managing members
- Write refused on the hosted Studio: stale base revision (409)
- Write refused on the hosted Studio: span locked (423)
- Recovering after a lost lease, a disconnection or a stale preview
- Comments
- Map and semantic diff
- Publishing builds
- Remote MCP
- The game in Git
- Upgrading the engine of a hosted game
- Hosted assets
- The server's command line
- Health and metrics routes
- Trying it locally with compose.yml
- Known limits
Clever Cloud (23)
- Clever Cloud: overview, cost and prerequisites
- Apps and add-ons
- Domains and TLS
- Keycloak
- Generic OIDC and GitLab
- Configuration
- First deployment
- Backups
- RPO and RTO
- Restore the Studio on a fresh installation
- Redeploys
- Upgrading the server and checking state after a migration
- Limits of going back
- Monitoring
- Security
- Rotating keys
- Recovering admin access
- Changing domain or OIDC provider
- Worker, PostgreSQL or Cellar down
- Exporting the game and leaving the installation
- Retention
- Clever Cloud troubleshooting
- Costs and teardown
Reality Bridge and connectors (16)
- The Reality Bridge: what it is
- Quick start
- Guarantees
- Install and run the Bridge
- Backup and restore
- Several tenants
- Signals and the manifest
- The Bridge's command line
- Connectors overview
- Email connector
- Telnet connector
- SSH connector
- Open Badges connector
- The connector SDK
- Security: Biscuit and signatures
- Bridge and connector troubleshooting
Contribute (25)
- Welcome
- Developer setup
- The dev loop
- Before a pull request
- Conventions
- Writing documentation
- Architecture
- Code tour
- Import boundaries
- Which tests run when
- Mutation testing
- The coverage ratchet
- The quality baseline
- CI explained
- Field passes
- Benchmarks
- Releasing
- npm packages
- Decisions and ADRs
- Governance
- Bot pull requests
- Contributing with AI agents
- Security policy
- Code of conduct
- Licences and credits