docs: mode_style spells thirteen variants, not fourteen
`context/code/tui.md` claimed `mode_style`'s default-chrome arm spells out fourteen `AppMode` variants. It spells thirteen — Normal, RecordsNormal, FormulaEdit, FormulaPanel, CategoryPanel, CategoryAdd, ItemAdd, ViewPanel, ImportWizard, ExportPrompt, SavePrompt, Help, Quit — counted off `src/draw.rs` rather than taken on report. The match itself is sound and exhaustive; only the sentence about it was wrong. The arithmetic that makes the corrected count checkable now sits beside it: 13 + Editing/RecordsEditing + CommandMode + TileSelect = 17, which is `AppMode`'s variant count. Nothing in this repository checks a count written in prose, which is exactly why it survived — the same failure mode gotcha 38's derivation-count correction and gotcha 44's stale gap list record. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FC2jVn8Au7E9JPkw6bwXXH
This commit is contained in:
+6
-2
@@ -122,9 +122,13 @@ enum, and only the last translation is local.**
|
||||
`mode_style(&AppMode) -> Style` stays here for the same reason (`Style` and
|
||||
`Color` are ratatui types and `improvise-command`, where `AppMode` lives,
|
||||
carries no rendering-framework dependency), and since `improvise-zx8t` it is
|
||||
**exhaustive**: the fourteen variants that take the default chrome are spelled
|
||||
**exhaustive**: the thirteen variants that take the default chrome are spelled
|
||||
out rather than swept up by a `_ =>` wildcard, so adding an `AppMode` fails the
|
||||
build here until someone chooses its colour.
|
||||
build here until someone chooses its colour. The arithmetic is the check a
|
||||
prose count does not get: 13 + `Editing`/`RecordsEditing` + `CommandMode` +
|
||||
`TileSelect` = 17, which is `AppMode`'s variant count. It read *fourteen* until
|
||||
2026-09-22, and nothing could have caught that — a count written in prose is
|
||||
checked by no one.
|
||||
|
||||
It is still not quite the same shape as `axis_fg` and its two siblings, and the
|
||||
difference is deliberate rather than pending. Those three map a *semantic enum*
|
||||
|
||||
Reference in New Issue
Block a user