five-on-it / apps/client/src/ui/studio/StudioPage
apps/client/src/ui/studio/StudioPage
The studio (?studio=<draft>, one of the game pages): a draft's level drawn and edited by hand, beside the creator chat and Claude Code, which write the same draft (TECHNICAL_SPECS §9.8). A city's spec is drawn on its map (StudioMap.tsx) with tools (select; a road of a class through the points clicked, Enter or a double click ending it, its ends on the roads it starts and ends near; a river; a roundabout; a hill; a district's seed in a style; a park; a named place; a turned grid; the spawn moved) and solved in the browser on every edit (studio.ts), its issues pinned where their elements stand and listed by their paths (a click selects the element). The selected element is edited in the inspector (Inspector.tsx), its points dragged on the map; Delete removes it, Ctrl+Z and Ctrl+Y undo and redo. The JSON tab edits the whole spec of any template (a grid town's or a region's are edited there alone). Save (Ctrl+S) writes the spec for the revision it was read at: a draft another wrote meanwhile is a conflict, its owner choosing to load it or to save over it; the draft is read again every five seconds and loaded when another wrote it and nothing here is unsaved. While a creation writes the draft the studio only shows it. Build queues a build and waits for it (its state, its issues, its preview), then Look round and Playtest. Without a draft it starts one, a city from the catalogue's example. The ids and data- attributes are the end-to-end tests' contract.