DESIGN.md: audits done; remaining size candidates; TestBase

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
RobinFiredrake 2026-11-10 19:57:08 -06:00
parent 82d67eb64f
commit c97a87d9c9

View file

@ -88,10 +88,14 @@ Work is on branch `tarot` (not merged yet). Done items say so; details in `git l
OFL fonts for the theme font choice; a new UI name for the Collection card kind; the reroll rule
question in step 9; thread string art when drawn.
**Suggested size audit (files grew past ~400 lines):** inspector.gd (789; split the thread box,
cost row and Book line into helpers), choice_dialog (698), main.gd (664), table_card (629),
edit_history (609), describe (~760). **Suggested test audit:** 36 suites repeat the same
boilerplate (_init/_frames/_check); a shared base would cut lines and tokens.
**Audits done (2026-11-10).** The seven files over 600 lines were split into helpers with
one-line delegators (inspector → inspector_result/thread/sync; describe → describe_cards/why;
json_io → json_canon/links; choice_dialog → choice_preview/chrome/option_row; table_card →
table_card_skin/input/geometry/list/kind_rows; main → main_layout; edit_history → edit_labels).
Still over ~450: inspector_card (591), roll_table (569), expr (544), main_cli, board_tester (505),
builder, roller, tower_board, group_card. Tests extend `TestBase` (`tests/testbase.gd`: named so the
runner's `test_*.gd` glob skips it): `start_main()`, `require_sample()`, `_check`, `_eq`, `_frames`,
`finish()`.
**Still open from before:** repo privacy on Forgejo (waiting on the user: Niles/sock's username +
token); hands-on playtest; size audit of `core/describe.gd` (731 lines) and the other files over