# Table Tarot (repo: TableTower) — Status and Plan **Engine:** Godot 4.7.2 (GDScript) · **Started:** 2026-11-08 · **Last updated:** 2026-11-10 (the 2026-11-10 plan is finished and on `main`) The short page to read at the start of every session. Everything else is read only when needed: - `docs/ARCHITECTURE.md`: feature summary, file map (§3b lists the 2026-11-10 modules), storage, known gaps. - `docs/HISTORY.md`: decisions on record, the Traveller board, ideas, history (§11: the 2026-11-10 plan). - `docs/LOGIC.md` (rule language), `docs/PLAIN.md` (plain-language layer), `README.md` (CLI flags). ## 1. What it is A desktop (and, once built, Android) app for building **random roll tables** as cards on a **spread**, joined by **threads**. A roll flows card to card; a logic layer adds choices, values, repeats, branches and sheets. Themed as tarot: purple cloth, beaded card frames, a fortune-teller mascot (`assets/art/fortune_teller.svg`, logo variant `fortune_teller_logo.svg`, splash uses the PNG). **Product principles (from the user)** - **General-purpose.** The Traveller board is only a capability test. No game-specific features. - **Intuitive for non-technical people.** Flag anything programmer-y. Play mode stays simple. - **Plain words by default**; rule text stays stored and reachable ("Edit as text"). - **Themed names are welcome** as long as they stay easy to understand. ## 2. Names (UI text only; code, JSON keys and the project's internal name are unchanged) | UI word | Code / JSON | |---|---| | Table Tarot (app; window title set at runtime) | project `config/name="TableTower"`, so `user://` didn't move | | Spread (a saved set of cards) | `TowerBoard`, `LibraryStore`, `collections/` | | Thread | `pipes`, `PipeLayer` | | Deck mode | `card_mode` | | Book / Page (reusable results) | `book`, `BookPage`, `TableEntry.page` | | Branch / Repeat (card kinds) | `router` / `loop` | The Collection *card kind* still needs a new UI name (not "List", not "Collection"). Card, Result, Change, Reset, Dice wording rules: `docs/HISTORY.md` §6 "Terminology". ## 3. Where things stand (2026-11-10) - **Everything from the 2026-11-10 plan is built, tested and on `main`** (pushed): theme system, rename and reskin, spread interaction, menus, Deck mode, nested groups, List view, phone layout, the Book, roll features (combine, batches, pause, costs, limits), sheet export, pictures, Help with demo spreads, splash screen. Summary in HISTORY.md §11; module map in ARCHITECTURE.md §3b. - **First user playtest found two bugs, both fixed:** the card resize corner caught clicks far outside cards; a left-drag on empty space panned instead of selecting. Now a left-drag draws a selection box in Play and Build; panning is middle-drag or Space+drag. - **Audits done:** the seven files over 600 lines were split into helpers; tests share `TestBase`. - **The user is playtesting.** Expect more bug reports; fix them first. ## 4. Open items **Waiting on the user** - Android: export templates are installed (checksum verified); the Android SDK (build-tools, platform-tools) is not. Ask before downloading. No Android preset yet. - Fonts: the theme editor has no font choice until more OFL fonts are bundled. - A UI name for the Collection card kind. - Reroll rule: should a "reroll" result that comes up during its own reroll be ignored and rolled again? - Thread string art (the user will draw it), then use it like `CardFrame` does for cards. - Repo privacy on Forgejo: needs Niles/sock's username and a token from the user. **Known, not urgent** - `export_presets.cfg` has the user's uncommitted edits (a Windows preset). Its `include_filter` is empty, so Windows builds lack `help/*.txt` and `templates/*.json` (the Linux preset has them). Tell the user rather than editing their file. - Still over ~450 lines: inspector_card (591), roll_table (569), expr (544), main_cli, board_tester (505), builder, roller, tower_board, group_card. Split when next touched. - Known gaps: ARCHITECTURE.md §7. ## 5. Working on it - **Godot:** `~/apps/Godot_v4.7.2-stable_linux.x86_64`. New `class_name` files need `godot --headless --path . --import` (the test runner does this). - **Tests:** `tools/run_tests.sh [filter]`: 36 suites in parallel, ~35 s. One line per suite; a failing suite prints 8 lines; a compile error shared by many suites prints once. Suites extend `TestBase` (`tests/testbase.gd`, named so the `test_*.gd` glob skips it): `start_main()`, `require_sample()`, `_check`, `_eq`, `_frames`, `finish()`. - **Smoke test:** `godot --headless --path . --quit-after 120 -- --sample` (no SCRIPT ERROR; the "resources still in use at exit" line is normal). - **Windowed runs/screenshots: always `tools/test_window.sh -- --sample --screenshot=/path.png [flags]`** (KWin rule keeps it in the background; never plain `godot --path .`; don't minimize). Useful flags: `--build`, `--roll=ID`, `--view=x,y,zoom`, `--window=WxH`, `--mobile`, `--list`, `--book`, `--demo=KEY`; all in `ui/main_cli.gd`. If a run is interrupted it leaves `override.cfg` behind: delete it before the next run. - **Keep files under ~400 lines**; split by area into RefCounted helpers with one-line delegators. - **GDScript traps hit today:** don't name methods `_set`, `_get` or `convert` (built-ins); compare roll-node Dictionaries with `is_same()`, not `==` (it compares contents); in Python patch scripts, avoid apostrophes inside single-quoted replacement strings. - **Git:** origin `git@forgejo.smhub.duckdns.org:RobinFiredrake/TableTower.git`. Feature branch, fast-forward merge to `main` when the user asks. Co-Authored-By line on commits. - **Agents:** only for large, separate jobs. Worktree briefs start with `git reset --hard `, own specific files, keep public APIs as delegators, don't touch tests. The user's computer has been crashing: an interrupted agent's work stays in `.claude/worktrees/`; resume it with SendMessage ("don't reset"), then cherry-pick its commit and `git worktree remove -f -f`. - **Token savings:** read only this page at the start; read the other docs on demand; keep tool output short (the test runner already does); avoid viewing full-size screenshots (crop/resize). - **Coderstanding** (structure scanner) for audits: clone https://forgejo.smhub.duckdns.org/digit/coderstanding into the scratchpad, venv, `pip install`, `XDG_CONFIG_HOME=/xdgconf`, `coderstanding add tabletower --data /cs_data`. - **Keep this page short.** Put history in HISTORY.md and file maps in ARCHITECTURE.md.