2026-11-10 18:03:10 -06:00
# Table Tarot (repo: TableTower) — Status and Plan
2026-11-16 10:41:13 -06:00
**Engine:** Godot 4.7.2 (GDScript) · **Started:** 2026-11-08 · **Last updated:** 2026-11-16 (papercuts + card threads
round hand-tested, merged to `main` and pushed)
2026-11-10 18:03:10 -06:00
The short page to read at the start of every session. Everything else is read only when needed:
2026-11-10 20:36:02 -06:00
- `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).
2026-11-10 18:03:10 -06:00
- `docs/LOGIC.md` (rule language), `docs/PLAIN.md` (plain-language layer), `README.md` (CLI flags).
## 1. What it is
2026-11-10 20:36:02 -06:00
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
2026-11-11 14:47:45 -06:00
mascot, **Morgan Fortuna** ("Morgan"; they/them in any UI text, kept gender-neutral on purpose)
(`assets/art/fortune_teller.svg`, logo variant `fortune_teller_logo.svg` , splash uses the PNG).
2026-11-10 18:03:10 -06:00
**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.
2026-11-10 20:36:02 -06:00
## 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` |
2026-11-15 12:50:39 -06:00
| Lore Index / Lore Entry (reusable results; was Book / Page) | `book` , `BookPanel` , `BookPage` , `TableEntry.page` |
2026-11-10 20:36:02 -06:00
| Branch / Repeat (card kinds) | `router` / `loop` |
2026-11-11 08:39:07 -06:00
| Ledger (card kind; "for the time being", user 2026-11-11) | variable card, `var_type: "collection"` |
2026-11-10 18:03:10 -06:00
Card, Result, Change, Reset, Dice wording rules: `docs/HISTORY.md` §6 "Terminology".
2026-11-11 08:41:30 -06:00
## 3. Where things stand (2026-11-11)
2026-11-10 20:36:02 -06:00
- **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.
2026-11-10 21:36:12 -06:00
- **Book tables (merged to `main` 2026-11-10):** four features for printed-book procedures, found by
2026-11-10 21:27:39 -06:00
building The Perilous Void's world generation: **Scales** (ordered steps that move up/down),
**Columns** (multi-column tables, one roll per row or per column), thread ** "roll with … instead"**
and thread ** "roll again if it comes up"**. Spec: LOGIC.md §3e, §3f, §5.4; modules: ARCHITECTURE §3c.
The goal behind it: handle any book's random tables and oracles (HISTORY §12).
2026-11-11 09:17:28 -06:00
- **Spread built with them:** `perilous-void-stage-1` in the user's collections, now "Perilous Void ·
World Scan & Survey" (152 cards): Stage I (Initial Scan) and, below it, Stage II (Data Analysis,
pp. 50– 51; tables pp. 64– 85: surface features, resource details, 3– 5 signature lifeforms with
adaptations, nonhuman species basics; resource specifics, simple/microbial life and hazards as
hand-rolled cards). Society Creation (p. 86) is out of scope. Generator:
`TableTower-private/perilous_void/build_world_gen.py` + `stage2.py` /`stage2_data.py`; install
with `merge_layout.py` so the user's card positions survive. The user hand-tested Stage I
(works); Stage II is untested by hand. A different, undocumented file
`perilous-void-world-generation.json` (137 cards, 2026-11-10) also sits in collections; left alone.
2026-11-11 10:52:47 -06:00
- **Stage II engine features (merged to `main` , pushed 2026-11-11):** columns read as one
2026-11-11 09:17:28 -06:00
phrase (`column_join`), "roll twice and combine" results (`TableEntry.repeat`), results saved
into a list value add an item (`RollContext.save_result`), a pick with one option answers
itself. Spec: LOGIC.md §2, §3e, §5.1. Suite `test_book_collect` .
2026-11-10 21:36:12 -06:00
2026-11-11 08:41:30 -06:00
- **2026-11-11 (merged to `main` , pushed):**
- Theme fonts: 13 bundled families (OFL; Special Elite Apache 2.0) with Text/Title font pickers
in the theme editor (`FontCatalog`). User tested by hand: works.
- Drag handles reorder a card's results in Build (ranged cards keep ranges in place). Hand-tested.
- Thread nodes under a card stacked above theirs are hidden. Hand-tested.
- Deck mode: a drawn result fades only after the roll animation reveals it (fast rolls: at once).
- Group marks (the user's pick, "option C"): a member card's top-right corner, and the group's
border, take the group's colour (Colour ▸ on the group menu); uncoloured groups use the theme
token GROUP (default gold, same as the highlight; watch for confusion).
- The Collection card kind is called **Ledger** in the UI "for the time being". The spread
switcher's tooltip says "Spreads".
- Reroll rule settled by the thread option "Roll again if it comes up".
2026-11-14 13:21:35 -06:00
- **Hand testing:** full pass done 2026-11-14 (see §4 "Playtest findings").
2026-11-11 08:23:42 -06:00
2026-11-11 15:48:41 -06:00
- **Theme tiers 1– 2 built and merged to `main` (2026-11-11):** theme folders,
Theme tiers 1-2: theme folders, mascot recolour, background scene and tile, frame sets, picture threads, sounds; nine new built-in themes
- ThemeAssets loads a theme's files; FrameSet + GradientMap (3-stop) generalise the card frame;
ThreadStrip draws threads from a picture; BoardBackdrop draws scene and tile; MascotArt
recolours Morgan by role (logo SVG now uses the Keep File importer); SoundBoard plays
roll / card turn / thread / click / ambient with View > Sound levels.
- Vaporwave, Synthwave, Cozy Autumn, Rustic, Woodsy, Sky Blue, Frutiger Aero, Gothic, Terminal:
generated art (tools/theme_art), sounds (tools/theme_sounds), settings (tools/theme_defs).
- Ten OFL fonts; --theme=<id> flag; docs/THEMES.md format spec; test_theme_assets.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 15:05:40 -06:00
Morgan recolouring by role, background scene + tile, frame sets (3-stop gradient map), picture
threads, sounds (View ▾ → Sound: Off / Quiet / Medium / Loud; default Quiet). Nine new built-in
themes from the mockup (Vaporwave … Terminal) with stand-in art and synthesised sounds; 10 new OFL
2026-11-11 15:40:10 -06:00
fonts. `--theme=<id>` CLI flag. Then (same day) Web 1.0 + the 8 suggested themes (Case File, Eldritch
Archive, Comic Panel, Brass & Gears, Chrome Street, Star Chart, Cartographer, Storybook): 18 new
2026-11-14 13:21:35 -06:00
built-ins in all, 20 bundled-font additions. Placeholder list: Theme Art Guide, "Placeholder art". Hand-tested 2026-11-14. Map: ARCHITECTURE §3d; format: THEMES.md.
Theme tiers 1-2: theme folders, mascot recolour, background scene and tile, frame sets, picture threads, sounds; nine new built-in themes
- ThemeAssets loads a theme's files; FrameSet + GradientMap (3-stop) generalise the card frame;
ThreadStrip draws threads from a picture; BoardBackdrop draws scene and tile; MascotArt
recolours Morgan by role (logo SVG now uses the Keep File importer); SoundBoard plays
roll / card turn / thread / click / ambient with View > Sound levels.
- Vaporwave, Synthwave, Cozy Autumn, Rustic, Woodsy, Sky Blue, Frutiger Aero, Gothic, Terminal:
generated art (tools/theme_art), sounds (tools/theme_sounds), settings (tools/theme_defs).
- Ten OFL fonts; --theme=<id> flag; docs/THEMES.md format spec; test_theme_assets.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 15:05:40 -06:00
Known gaps vs mockup: corner ornaments show on all four corners; no card drop shadows; Terminal
has no scanlines. `pipe_layer.gd` is now 456 lines (size audit).
2026-11-14 15:31:55 -06:00
**2026-11-14: the user did the full hand playtest** (all 20 themes, every feature); all 7 steps
of §4 "Playtest findings" are built, **merged to `main` and pushed** (46 suites pass). The user
hand-tested almost all of it: works. **Not hand-tested yet: `[[Spread::Card]]` links** (they were
unsure where to type one: in a result's text, or with "+ Roll a card from another spread…" under
the Text field when a result is selected in Build). Placeholder *writing* (help, demos, sample,
templates) is on the Theme Art Guide checklist.
2026-11-14 14:45:22 -06:00
2026-11-14 19:20:59 -06:00
**Spread folders round 2 (2026-11-14, pushed):** see §4 item 8. Hand-tested by the user: works.
2026-11-14 19:19:47 -06:00
2026-11-15 12:58:23 -06:00
**Build UX round (2026-11-15, merged to `main` and pushed; all 50 suites pass).** From
2026-11-15 12:50:39 -06:00
the user's list and an approved mockup ("Workday Job Mockup" artifact,
https://claude.ai/code/artifact/2ba0bb3e-d6d1-46db-8b39-efd7e3665918). Built: View ▾ Skip
animations (+ Shift); questions animate like pauses; pop-ups fade in; ranged cards edit by
**Weights** (default for cards made ranged; gaps become empty results; total warning) or
**Ranges** (auto-sort on by default); whole rows drag; empty cards can switch Plain/Ranged;
Inspector is one list (card + each result, collapsible; spread clicks open one, hand-opened stay);
result weight/range/position in the Inspector; thicker coloured header (`CARD_HEAD`), Build move
handle, green selection glow (`SELECTED`, also on the inspected card); Play's greyed + Card and ☰
New card point to Build; Book → Lore Index / Lore Entries, a tab beside the Inspector in Build;
spellcheck (Hunspell; per-spread dictionary; off on Android). Modules: ARCHITECTURE §3g.
2026-11-15 12:58:23 -06:00
**Spellcheck:** the Godot-Hunspell prebuilt libraries (MIT, github.com/brunogbrito/Godot-Hunspell)
are in `addons/hunspell/bin` with the user's OK (2026-11-15); Hunspell loads in Godot 4.7.2 and the
underlines were checked in a screenshot. Hunspell prints "Wrote dictionary file…" lines on load
2026-11-15 13:25:24 -06:00
(normal). Both export presets (Linux, Windows) include `addons/hunspell/dictionaries/*` (committed
2026-11-15 with the user's preset edits); spellcheck is not tried in an exported build yet.
2026-11-15 12:58:23 -06:00
**Not hand-tested by the user yet** (only tests and screenshots): the whole round.
2026-11-15 12:50:39 -06:00
2026-11-16 10:41:13 -06:00
**Papercuts + card threads round (2026-11-16, merged to `main` and pushed; all 51 suites pass).** From the
user's list:
- **Typing lag** on long open cards: each key rebuilt the whole inspector (~120 ms) or, from the
inspector, the whole card (~150 ms). Now ~7 ms per key (measured with `tests/perf_typing.gd` on
Magic Wand Generator · Material, 36 results). Card renames were slow the same way; fixed too.
- **"+ Add result"** scrolls the card's list to the new row and puts the cursor in it (text selected).
The rebuild inside it scrolls to the new row, not the last-rolled one (`TableCardEditing.adding`).
- **Mouse wheel** zooms (was: scroll up/down; Ctrl+wheel zoomed). Shift+wheel moves sideways. Over a
card's list that scrolls, the wheel scrolls the list, even at its ends. Help updated.
- **Card threads** (LOGIC.md §3g): a ● on each card's bottom edge; plain = after any result,
Otherwise = only when no thread of the result ran. Every rolling kind; loops once at the end.
- **Spreads made obvious:** a "SPREAD" caption over the switcher; Morgan's welcome on first launch
(Explore the demo / Start a blank spread / Import a spread…). Replay button: not added yet
(`WelcomeDialog.open`). The user's own install will show it once, since the setting is new.
**Hand-tested by the user: works** (the add-result scroll needed one fix, now in).
Still no spellcheck on/off setting (the user looked for one; offer it if it comes up).
**Next: the table mechanics round.** The user's prompt to start it: ** "Let's pick up the table
mechanics."** When they say that:
1. Read `docs/MECHANICS.md` . Ask whether they've ticked the Books column yet; if not, offer to go
through the ❌ and 🟡 rows with them instead.
2. Offer the local PDF scan (plan below), so they don't have to read their books by hand.
3. Ask for their "ten hardest tables": header, two rows and the instructions only, typed or as photos.
4. From what comes back, propose the next feature round (likely: keep highest/lowest and doubles,
exploding dice and pools, 2D grid lookups). Ask before building.
**PDF scan plan** (the user approved `pdftotext` , 2026-11-16; don't open the PDFs before they ask):
their TTRPG PDFs sit in one folder with subfolders; most have text, a few are scanned (need OCR).
A local script (in the scratchpad, not the repo) converts them to text and counts rolling phrases
("roll again", "reroll", "d66", "draw", "roll twice", "if you rolled", "cross-reference",
dice notation…), plus an "unsorted" pile: paragraphs near dice notation or numbered ranges that
match no known phrase (that catches flavourful wording). Claude reads only the short report.
Layout (grids, columns) doesn't survive text extraction; the "ten hardest tables" cover that.
Ask for the folder path when the scan starts.
2026-11-10 19:25:06 -06:00
2026-11-11 14:47:45 -06:00
## 3b. Theme slots plan (2026-11-11, user-approved order)
Mockups: "Morgan's Wardrobe" artifact (https://claude.ai/code/artifact/136b4ce8-1ef7-47ca-a39a-a75eb34d64b7):
19 themes (Vaporwave, Synthwave, Cozy Autumn, Rustic, Woodsy, Sky Blue, Frutiger Aero, Gothic, Terminal;
8 suggested; Tarot). Art rules and per-theme checklist: "Theme Art Guide" doc
(https://claude.ai/artifact/E9V9X7m9HEpCNBRjVtSsiF). "High Contrast" is reserved for an accessibility option
that works on any theme (solid background, stronger text, thicker borders, no effects); the black/green look is **Terminal** .
- **Tier 1:** (1) theme folders: a theme = folder with `theme.json` + its files, shareable; (2) Morgan
recolouring by colour role (layers outline, cloth, trim, eye, eye_glint, inner_line; swap fills, then
`Image.load_svg_from_string` ), which also enables user mascots; (3) background tile picture + optional scene picture.
- **Tier 2:** (4) card frame sets from the theme folder (corner + edge, three-stop gradient-map shader:
black = backing, mid grey = trim, white = highlight); (5) thread look (repeating strip + optional end pin);
(6) sounds (roll, card turn, thread, click, ambient) with volume and mute settings.
- **Tier 3:** (7) roll effects (keep light; see roll hitch); (8) Morgan's lines; (9) card back for Deck mode
(needs a draw pile on the card + flip on reveal; maybe a "Hidden until rolled" table option later);
(10) splash per theme and Morgan outfits.
2026-11-10 20:36:02 -06:00
## 4. Open items
**Waiting on the user**
2026-11-16 10:41:13 -06:00
- Mechanics checklist (2026-11-16): [MECHANICS.md ](MECHANICS.md ). The user marks which mechanics
their books use; the ❌ rows become the next feature rounds. Start phrase and plan: §3, "Next".
2026-11-10 20:36:02 -06:00
- Android: export templates are installed (checksum verified); the Android SDK (build-tools,
platform-tools) is not. Ask before downloading. No Android preset yet.
- 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.
2026-11-10 18:03:10 -06:00
2026-11-11 15:22:02 -06:00
**Theme editor (user, 2026-11-11)**
2026-11-14 13:21:35 -06:00
- **Morgan colour bug: fixed** (user confirmed 2026-11-14 with a fully custom theme).
2026-11-11 15:22:02 -06:00
- **Later:** a live preview of Morgan (and the theme) in the editor.
- **Later:** file pickers in the editor for a theme's pictures (tile, scene, frame, thread,
mascot) and sounds; today a user theme can only name files by editing its JSON.
- **Mockup only:** Web 1.0 theme (marble tile, wood panels, bevelled window cards) in the
Wardrobe; it needs two new slots, a panel tile and a button style (nine-patch). Not started.
2026-11-14 13:21:35 -06:00
**Playtest findings (2026-11-14), proposed order; the user may reorder**
2026-11-14 13:30:56 -06:00
1. ~~Size audit batch 2~~ done.
2026-11-14 13:47:03 -06:00
2. ~~Data bugs~~ done 2026-11-14 (Ledger `members` on the card, group colour on import,
grouping over open groups nests them, Add to list fixes + Allow repeats, combine rows per
column). Original notes: Ledger entries live only in local state (`state.json` variables), so copies,
2026-11-14 13:21:35 -06:00
exports and imports lose them, and the spread can't add entries: store them on the card.
JSON import drops group `color` . Making a group over open groups steals their cards (leaves
empty groups); nesting works only with collapsed groups. "Add to list": can't pick an
existing value, only numbers, needs "unless already there" vs "every time, in order".
Rerolls apply to all columns (make per-column, all-columns optional).
2026-11-14 13:47:03 -06:00
3. ~~Roll hitch~~ fixed (see "Known, not urgent").
2026-11-14 14:00:01 -06:00
4. ~~Themes~~ done 2026-11-14 (fixed-corner layer redraws on resize; built-in pictures get
mipmaps; group mark = filled corner tab, default blue #3a7bd5 in every theme, on collapsed groups
too, "Any colour…" picker; IM Fell never fake-bold; Gothic/Cartographer titles IM Fell SC /
Alegreya; List view hover; Gothic scene arch removed). Original notes: frame corners jump on resize and float off the bottom (10 themes; one shared bug);
2026-11-14 13:21:35 -06:00
Terminal edges and group corners flicker when zoomed out; group corners too hard to see in
most themes (make bigger, outlined; one fixed default colour across themes; full colour
picker; mark collapsed groups); Cartographer chosen-result text glitchy; Tarot List view hover
unreadable; Gothic/Cartographer title fonts; red patch in Gothic's background.
2026-11-14 14:25:21 -06:00
5. ~~Roll features~~ done 2026-11-14 (card costs + Pay/Don't pay; pause pop-up and animation
up to and after it; batches in Earlier, one sound, Earlier 30 / saved 200; rerolls flicker
"rolled again"; No repeats on threads; plain-table modifier moves rows; Only if on results;
List view rolls fast). Original notes: "costs to roll" on any rolling card (threads pause to ask); pause as a pop-up
2026-11-14 13:21:35 -06:00
that waits between card animations; batch rolls into history with one sound; a result
history; visible in-between rolls for roll again/rerolls; "roll N different results, then
pick"; "move the result up/down N rows" on standard tables (pick by weight, then shift,
clamp); "only if" on roll results (reuse `show_if` ); no animation when rolling from List view.
2026-11-14 14:40:23 -06:00
6. ~~UI~~ done 2026-11-14 (SoundPanel slider; Delete hidden on built-ins; Delete key = DeleteKey,
View ▾ Ask before deleting; FormatMenu right-click + ui/text_effects sparkle/shimmer/flash;
spread folders + tooltip; Show less; Book reload after undo; dice hint; export names).
Original notes: sound slider (default = Quiet) also in View ▾; hide Delete for built-in themes; Delete
2026-11-14 13:21:35 -06:00
key + "Are you sure?" + a "Confirm delete" setting; BBCode buttons and right-click formatting
(wave, tornado, shake, rainbow, pulse, fade + custom RichTextEffects such as glow, sparkle);
folders in the spread switcher and a useful tooltip; collapse button on expanded large cards;
Book editor refresh after undo; hint where "Roll it with … instead" is hidden (ranged targets
only); call diagram exports "Export as diagram" (only JSON is a full save).
2026-11-14 14:45:22 -06:00
7. ~~Spreads calling other spreads~~ done 2026-11-14: `[[Spread::Card]]` (LOGIC.md §5.3).
2026-11-14 19:20:59 -06:00
8. ~~Spread folders, round 2~~ done 2026-11-14 (pushed to `main` ; hand-tested by the user: works). The user's
2026-11-14 19:19:47 -06:00
picks: "Move to folder" is a submenu of existing folders (+ No folder, New folder…; typed names
match existing folders without regard to case); folders nest ("a/b"); an empty folder stays
only if the user says Keep when its last spread leaves (or is deleted), and then has Remove
folder; loose spreads stay above folders; Recent (last 5 opened) at the top; New spread here…
and Rename folder… in each folder (renaming to a taken name joins the two; no warning). Kept
empty folders live in local state (`state.json`), not in spread files, so they don't travel
with a shared spread. List view's "folders" are now called groups in the UI ("+ Group").
Modules: ARCHITECTURE §3f "Spread folders"; suite `test_spread_folders` (includes the real menu
on a temporary library).
2026-11-14 13:21:35 -06:00
2026-11-10 20:36:02 -06:00
**Known, not urgent**
2026-11-15 13:25:24 -06:00
- `export_presets.cfg` is committed (2026-11-15): both presets include help, templates and the
Hunspell dictionaries. Linux excludes `tests/*` ; Windows still packs `tests/` . `project.godot`
still holds the user's uncommitted edit (boot splash fullsize/filter lines removed); ask first.
2026-11-14 13:30:56 -06:00
- Size audit batches 1– 2 done (2026-11-14): no script over 400 lines (ARCHITECTURE §3e).
2026-11-10 21:27:39 -06:00
- Small ideas from the Perilous Void spread: an empty list shows blank in a sheet (no "none"
default); a value change that should apply when a later value is rolled (Shattered lowers
atmosphere after Gas/Life were already decided) has no clean form.
2026-11-14 13:47:03 -06:00
- **Roll hitch: fixed 2026-11-14.** Measured on Perilous Void (headless, fast roll of "New
World"): roll logic ~3 ms, but the app took 3.4 s after it. Causes: every relight restyled every
row and column cell (font overrides make RichTextLabels re-measure; ~11 ms per row), and the
Earlier tab rebuilt every history row each render (long texts, ~25 ms each, growing per roll).
Now rows/cells skip restyling when their look is unchanged, and Earlier reuses its rows: ~240 ms
2026-11-14 13:48:08 -06:00
per roll, flat (most of it is the 2– 3 questions, each relighting ~70 ms first). Timing tool:
`tests/perf_roll.gd` (SPREAD=… CARD=…; not in the suite).
2026-11-10 20:36:02 -06:00
- Known gaps: ARCHITECTURE.md §7.
2026-11-10 19:15:28 -06:00
2026-11-10 20:36:02 -06:00
## 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).
2026-11-16 10:41:13 -06:00
- **Tests:** `tools/run_tests.sh [filter]` : 51 suites in parallel, ~40 s. One line per suite; a
2026-11-10 20:36:02 -06:00
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()` ,
2026-11-14 19:19:47 -06:00
`require_sample()` , `_check` , `_eq` , `_frames` , `_wipe` (temp folders), `finish()` .
2026-11-10 20:36:02 -06:00
- **Smoke test:** `godot --headless --path . --quit-after 120 -- --sample` (no SCRIPT ERROR; the
"resources still in use at exit" line is normal).
2026-11-10 18:03:10 -06:00
- **Windowed runs/screenshots: always `tools/test_window.sh -- --sample --screenshot=/path.png [flags]` **
2026-11-10 20:36:02 -06:00
(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.
2026-11-11 13:18:54 -06:00
- **Descriptive names (the user is learning to code from this repo):** no one- or two-letter
names like `b` , `rn` , `t` for variables, parameters or fields; say what the thing is
(`go_button`, `normal_style` , `table` ). Loop counters `i` /`j` and math `x` /`y` are fine. New
code follows this; old names are fixed when we touch or read that code (Boy Scout rule), not
in one big sweep. First fix: `TableCardHeader._make_go_button` (2026-11-11).
2026-11-10 20:36:02 -06:00
- **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.
2026-11-10 18:03:10 -06:00
- **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.
2026-11-10 20:36:02 -06:00
- **Agents:** only for large, separate jobs. Worktree briefs start with `git reset --hard <branch>` ,
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).
2026-11-11 13:18:54 -06:00
- **Coderstanding** (structure scanner, tours) is installed: `coderstanding` on PATH (venv
`~/.local/share/coderstanding/venv` ), app `tabletower` , data and tours in
`~/.local/share/coderstanding/tabletower` , viewer http://127.0.0.1:8517/. Tours teach the
user (new to coding): plain words, explain basics. Update: pull
https://forgejo.smhub.duckdns.org/digit/coderstanding and `pip install` it into that venv.
2026-11-10 20:36:02 -06:00
- **Keep this page short.** Put history in HISTORY.md and file maps in ARCHITECTURE.md.