M4: GM wall editor (round-1 fields) #73

Closed
opened 2026-11-20 22:31:45 +01:00 by SirStone · 1 comment
Owner

Part of #63

Goal

Draw, select, edit and delete walls: four presets, secret/locked, marker, label, one-way arrow + flip, advanced switches, door open/close, unlock hint, undo last. No thickness/height/position flip.

Acceptance criteria

  • Every round-1 field authorable and round-trips through GM frames
  • Player frames unchanged except vision/markers
  • Secret door indistinguishable from a wall
  • Locked hint + one-click unlock
  • Arrow direction on the blind side
  • Derived kind shown
  • No thickness/height controls
  • Single-step undo
  • E2e GM draws, player's fog changes
  • Standing gate: full devbox run test green on a clean checkout, no test weakened or skipped, and the behaviour above proven at the seam(s) listed under "Proven at".

User stories covered

  • 44 — As a GM, I want to draw a wall by clicking two points, so that I can shape a map quickly.
  • 45 — As a GM, I want an optional grid and endpoint snap while drawing, so that walls line up.
  • 46 — As a GM, I want four presets (wall, door, window, one-way), so that one drag gives the right behaviour.
  • 47 — As a GM, I want secret and locked checkboxes on a door, so that I can author the v1 door states.
  • 48 — As a GM, I want a "players see a marker" checkbox, so that I can let players learn a window is there.
  • 49 — As a GM, I want a short private label on a wall, so that I can name it for myself without changing behaviour.
  • 50 — As a GM, I want the one-way direction drawn as an arrow and flippable, so that I get the blind side right.
  • 51 — As a GM, I want an advanced editor for the raw switches, so that I can build walls the presets do not cover.
  • 52 — As a GM, I want to delete a wall and undo my last edit, so that mistakes are cheap.
  • 53 — As a GM, I want a hint and one-click unlock on a locked door, so that I do not fight the rules during play.
  • 54 — As a GM, I want the editor to show the derived kind, so that I always see what the wall actually does.
  • 69 — As a GM, I want to open and close a door with one click during play, so that the doorway changes without redrawing it.
  • 70 — As a GM, I want to select an existing wall and edit its fields, so that I can fix a mistake without deleting and redrawing.

Proven at

wall editor module, reducer wall slice; e2e

Notes

  • Size: L (about one agent session, ~100K tokens). Lane: W (walls).
Part of #63 ## Goal Draw, select, edit and delete walls: four presets, secret/locked, marker, label, one-way arrow + flip, advanced switches, door open/close, unlock hint, undo last. No thickness/height/position flip. ## Acceptance criteria - [ ] Every round-1 field authorable and round-trips through GM frames - [ ] Player frames unchanged except vision/markers - [ ] Secret door indistinguishable from a wall - [ ] Locked hint + one-click unlock - [ ] Arrow direction on the blind side - [ ] Derived `kind` shown - [ ] No thickness/height controls - [ ] Single-step undo - [ ] E2e GM draws, player's fog changes - [ ] Standing gate: full `devbox run test` green on a clean checkout, no test weakened or skipped, and the behaviour above proven at the seam(s) listed under "Proven at". ## User stories covered - 44 — As a GM, I want to draw a wall by clicking two points, so that I can shape a map quickly. - 45 — As a GM, I want an optional grid and endpoint snap while drawing, so that walls line up. - 46 — As a GM, I want four presets (wall, door, window, one-way), so that one drag gives the right behaviour. - 47 — As a GM, I want secret and locked checkboxes on a door, so that I can author the v1 door states. - 48 — As a GM, I want a "players see a marker" checkbox, so that I can let players learn a window is there. - 49 — As a GM, I want a short private label on a wall, so that I can name it for myself without changing behaviour. - 50 — As a GM, I want the one-way direction drawn as an arrow and flippable, so that I get the blind side right. - 51 — As a GM, I want an advanced editor for the raw switches, so that I can build walls the presets do not cover. - 52 — As a GM, I want to delete a wall and undo my last edit, so that mistakes are cheap. - 53 — As a GM, I want a hint and one-click unlock on a locked door, so that I do not fight the rules during play. - 54 — As a GM, I want the editor to show the derived kind, so that I always see what the wall actually does. - 69 — As a GM, I want to open and close a door with one click during play, so that the doorway changes without redrawing it. - 70 — As a GM, I want to select an existing wall and edit its fields, so that I can fix a mistake without deleting and redrawing. ## Proven at wall editor module, reducer wall slice; e2e ## Notes - Size: L (about one agent session, ~100K tokens). Lane: W (walls).
SirStone added the ready-for-agentenhancement labels 2026-11-20 22:31:45 +01:00
SirStone added a new dependency 2026-11-20 22:31:46 +01:00
SirStone added a new dependency 2026-11-20 22:31:46 +01:00
Author
Owner

Implemented and merged on main as 91a51c7.

  • GM wall editor in the client: four 5.8 presets, raw advanced switches with preset XOR raw (no open:false beside a preset), label, player_marker, door open/close through door.set (open never in a wall.update patch), secret/locked with the locked: unlock first hint and one-click unlock, one-way arrow at the wall midpoint pointing at the blind side + flip, derived kind shown, delete and single-step undo. No thickness/height/position-flip control (ADR-0012).
  • New seam files: client/src/wallEditor.ts, client/src/slices/walls.ts, client/src/render/modules/walls.ts, client/src/panels/walls.ts; core events wall-select / wall-record-undo added to client/src/reducer.ts; panel styles and client README updated.
  • Input precedence defined and tested: token drag (#72) > armed wall draw > camera pan (#69); a click with no movement selects the nearest wall.
  • Proof: client/test/walls.test.ts (slice, presets, derived kind, arrow side, snap, payload XOR, no open in updates, undo intents, local validation) and client/e2e/walls.test.mjs (all presets, label, marker switch, secret, locked hint + unlock, open/close, advanced invalid combination shown, delete + undo, token drag wins over draw mode, player fog pixels change for wall/flip/door/marker, and a second real player WS carries no wall data beyond marker).
  • Gates rerun after rebasing on origin/main: devbox run test 159 passed, devbox run client-test 164 passed, devbox run e2e 24 passed. Kernel log clean.
Implemented and merged on `main` as 91a51c7. - GM wall editor in the client: four 5.8 presets, raw advanced switches with preset XOR raw (no `open:false` beside a preset), label, `player_marker`, door open/close through `door.set` (`open` never in a `wall.update` patch), secret/locked with the `locked: unlock first` hint and one-click unlock, one-way arrow at the wall midpoint pointing at the blind side + flip, derived `kind` shown, delete and single-step undo. No thickness/height/position-flip control (ADR-0012). - New seam files: `client/src/wallEditor.ts`, `client/src/slices/walls.ts`, `client/src/render/modules/walls.ts`, `client/src/panels/walls.ts`; core events `wall-select` / `wall-record-undo` added to `client/src/reducer.ts`; panel styles and client README updated. - Input precedence defined and tested: token drag (#72) > armed wall draw > camera pan (#69); a click with no movement selects the nearest wall. - Proof: `client/test/walls.test.ts` (slice, presets, derived kind, arrow side, snap, payload XOR, no `open` in updates, undo intents, local validation) and `client/e2e/walls.test.mjs` (all presets, label, marker switch, secret, locked hint + unlock, open/close, advanced invalid combination shown, delete + undo, token drag wins over draw mode, player fog pixels change for wall/flip/door/marker, and a second real player WS carries no wall data beyond `marker`). - Gates rerun after rebasing on origin/main: `devbox run test` 159 passed, `devbox run client-test` 164 passed, `devbox run e2e` 24 passed. Kernel log clean.
Sign in to join this conversation.