Files
Dune/docs/INTERACTIVE_INTRODUCTION.md
T
Quintine e13ad454e2 Add movement and Traitor practice to the introduction
Expand /learn from five lessons/three exercises to seven lessons/five exercises. Movement practice uses shared board geometry and occupancy rules to teach ordinary range, separate-city ornithopters, storm blocking, full strongholds, one-group movement and conserved force counts. Traitor practice uses the production combat quote for an optional post-reveal call, a declined losing plan, a sole successful call and mutual betrayal, with the existing full private Traitor inspector. The fixed opponent scenario is explicitly teaching data, not live private information or an AI match.

Migrate every v1 saved lesson to its same identity after insertion, preserving previous choices and outcomes under the existing browser key. Validate v2 movement commitments and reveal/call stages, whitelist saved fields and default only new choices. Browser testing exposed stale pre-update React state surviving hot refresh; a schema-keyed lesson remount runs the migration for development updates too. No live rules, AI strategy, room persistence or server scheduling changed.

Eleven focused cases include all 96 movement combinations against actual authoritative actions, exact force/spice preservation, sole/mutual/declined Traitor outcomes, all five old lesson mappings and malformed or impossible save rejection. Independent review found no material teaching, privacy or restore issue. Types, lint, all 4899 offline tests and production build pass on the unchanged source fingerprint. HTTP and complete-game runs were not repeated for this browser-local guidance change.

Browser checks verified range, storm and full-stronghold explanations, committed movement after refresh, private Traitor inspection, decline and successful-call outcomes, and mutual calls after a refresh at the revealed-choice stage. At a 390px viewport both new lessons fit within the 375px client width without horizontal overflow; keyboard movement selection committed four arrivals and one source remainder. Screenshot acceptance remains open. The viewport was reset and /learn retained as the deliverable.

All 1174 rooms, 2456 seats and every original recovery/entry/handover row remain unchanged. SQLite integrity and foreign keys pass. No new live room, migration, reset, restart, usage check or automation was needed. Broader curriculum, rules/mode acceptance and publication remain unfinished. The status dashboard identifies durable unattended bot recovery as the next independent backend capability; pending faction-rule questions were preserved.

Verified source tree: 6f25e31c2d8865dac823762d7da782f21f7538034c9d3c0e853872d796ced6f7
2026-09-20 15:44:14 +10:00

4.6 KiB
Raw Blame History

Interactive introduction

20 September 2026. Prototyped; partial teaching coverage. /learn is linked from the lobby and rules reference. It adds the previously missing guided introduction alongside the reference's existing standalone practice wheel.

Seven navigable lessons cover public/private table information and the phase sequence, shipment budgets, movement, sealed battle plans, Traitor calls, spice collection and joining or recovering a saved table. Five independent Basic practice positions let a player change inputs, commit, inspect results and retry. These positions are deliberately separate examples rather than a complete game or an authoritative live room.

The examples call reserveShipmentCost, quoteBattleResolution, quoteSpiceCollection and the shared board distance/occupancy helpers. Battle uses six ordinary forces, real Atreides/Guild leaders and canonical base-deck cards. The fixed opponent's dial, leader and projectile weapon appear only after the player's seal action. The resulting weapon survival, scores, ordinary aggressor tie, force losses and bounty come from the production combat quote. There are no Traitor calls or faction powers in the original sealed-plan position. A separate Traitor lesson offers call or decline after revealing both plans, with an explicitly selected opposing-call scenario. Ordinary, sole-call and mutual-call casualties, leader survival, cards and bounty use the same production combat quote. The private Traitor has the existing full inspector. These fixed teaching scenarios are not AI policy or hidden-information tests of the four live difficulty levels.

The movement position starts with five ordinary forces in Red Chasm. It compares range one with range three from a separate Arrakeen occupant, exact sectors, storm exclusion and a stronghold already occupied by two other factions. Accepted moves preserve the source remainder and city force and spend no spice. Choices reset that practice position, rather than granting multiple moves in a turn. All 96 offered destination/range/storm/force combinations are cross-checked against actual authoritative applyAction transitions; no live movement rule changed.

The existing wheel, keyboard controls and card inspectors remain available. Lesson changes focus the heading; responsive columns stack on small screens. Browser storage contains only a versioned, validated set of lesson choices under dune-introduction-v1. Version 2 payloads explicitly migrate each of the five old version 1 lesson indices to the same lesson after insertion, preserving every prior choice and committed outcome. New movement and Traitor fields start at their defaults; hot updates remount the lesson state to apply this migration. Future lesson insertions must update the schema and mapping again. The save includes movement commitments and the before-reveal, revealed and resolved Traitor stages. Unknown versions, out-of-range values and impossible saved shipments fall back to the first lesson. Unknown fields are dropped. Storage failure leaves the exercise usable in memory and displays that refresh may reset it. Separate tabs may save different progress; the last write is restored on the next visit. No multiplayer API or seat token is used, and no server restart or database migration is required.

tests/introduction.test.ts checks unaffordable shipping, protected ties, wrong defense and leader death, every offered dial/defense pair, collection capacity, save round trips and malformed state. tests/introduction-practice.test.ts adds authoritative movement comparisons, single/mutual/declined Traitor outcomes, all five legacy lesson migrations and impossible-new-save rejection. Browser interaction checks for the initial prototype confirmed the unaffordable-shipment explanation, a legal shipment, card inspection, a protected 8–8 tie, the wrong defense causing leader death, saved reveal after refresh, city collection and lobby return/re-entry. At a 390px viewport the battle controls and new lobby link stayed within the page bounds. Screenshot capture timed out, so visual screenshot acceptance remains open; DOM bounds are narrower evidence. Final source-bound reports and Git delivery record required check/build results.

This does not replace a full interactive curriculum. Bidding, alliances, broader movement/arrival powers, faction lessons, Advanced support and expansion lessons remain future work. The expanded lessons retain Partial/Prototyped coverage. Final browser/check/build, preservation and Git evidence for this follow-up belong to its source-bound private checkpoint. No rules mode, expansion or publication gate is opened.