← Blog
State Architecture

Flat State Machines Over Nested Tabs: Preventing Dead Ends

Deeply nested panels and per-screen overrides breed silent drift and broken back paths. Why flat, explicit state machines keep multi-surface prototypes inspectable.

Date
November 24, 2026
Reading time
2 min read
Author
Lewis Dong
Topics
State Architecture · Engineering

When an interactive prototype grows beyond three screens, it is tempting to bolt on nested tabs, per-page local state or mission-specific overrides. Each shortcut feels fast at first; my view is that they make state drift apart later.

One shared grammar across five missions#

Grassland Iron Tide is a personal browser strategy game. Its five missions escalate from skirmishes to night crossings and stealth. AI tools helped with the code, copy and original assets; I set the product direction, mission design and interaction rules, reviewed the output and verified it.

The design separates mission data from interaction grammar:

  1. Missions are defined as data, so a level describes its map and objectives rather than its own controls.
  2. Click, drag-box, Shift to add or remove, Ctrl grouping and right-click commands work the same in all five missions. A mission can limit which commands are available, never redefine what an input means.
  3. Pause, failure reasons, checkpoints and the restored unit state share one save chain, on a fixed 20 Hz simulation step.

Flat visibility in a desktop tool#

The same idea shapes Lamplight Nook, another personal project built the same way: agent progress is shown on Wick's blackboard as a flat plan rather than buried in collapsible log trees. A flat state machine keeps each transition in one place where it can be checked. Try the shared command contract in the Pattern Atlas.

Share:

Related Articles

Flat State Machines Over Nested Tabs: Preventing Dead Ends | Lewis Dong