Keys: one table file for the device's help panel and the website's key tables (#72) #75

Merged
twisla merged 1 commits from keys-tables into main 2026-10-06 23:50:58 +00:00
Owner

For #72: the website's key tables are generated from the same lists the device's help panel shows.

  • One file for both: lib/core/src/app_keys.h, 52 constant tables, each under a comment // id: Title. An App's help() picks the table of the state it is in (the lists were code in each App until now).
  • site/tools/gen_dev_docs.py reads that file and writes site/data/keys.toml (committed). The keys shortcode shows a screen's tables on its guide page; /guide/keys/ ("Every key") shows all of them.
  • CI: the Site job fails when the data file is out of date, or when a page asks for a table that doesn't exist. It now also runs when app_keys.h changes.
  • Each App's guide page gains a "The keys, as the device lists them" section. The written tables stay where they say more than a key list can; they can still drift, and the generated ones are the reference.

One change in wording on the device: three rows that used to say the one thing that applied now say both, since a table is constant: GNSS's Tab ("the position, or the sky") and r ("record a Track, or stop it"), and the Scanner's c.

Checked: 476 host tests; the firmware builds (2.8 KB more flash than #73, the same RAM); on the device, key help in Storage and System still shows the right tables; the site builds, 69 pages / 0 problems; /guide/keys/, Storage, the basics and the guide index in Chromium under the production CSP at 1100 and 390 px, no violation, no sideways scroll.

Not checked: every one of the 52 tables on the device (two were looked at after the move; the rows were carried over from #73's lists, which were checked more widely).

🤖 Generated with Claude Code

https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT

For #72: the website's key tables are generated from the same lists the device's help panel shows. - **One file for both:** `lib/core/src/app_keys.h`, 52 constant tables, each under a comment `// id: Title`. An App's `help()` picks the table of the state it is in (the lists were code in each App until now). - **`site/tools/gen_dev_docs.py`** reads that file and writes `site/data/keys.toml` (committed). The **`keys` shortcode** shows a screen's tables on its guide page; **`/guide/keys/`** ("Every key") shows all of them. - **CI:** the Site job fails when the data file is out of date, or when a page asks for a table that doesn't exist. It now also runs when `app_keys.h` changes. - Each App's guide page gains a "The keys, as the device lists them" section. The written tables stay where they say more than a key list can; they can still drift, and the generated ones are the reference. **One change in wording on the device:** three rows that used to say the one thing that applied now say both, since a table is constant: GNSS's `Tab` ("the position, or the sky") and `r` ("record a Track, or stop it"), and the Scanner's `c`. **Checked:** 476 host tests; the firmware builds (2.8 KB more flash than #73, the same RAM); on the device, `key help` in Storage and System still shows the right tables; the site builds, 69 pages / 0 problems; `/guide/keys/`, Storage, the basics and the guide index in Chromium under the production CSP at 1100 and 390 px, no violation, no sideways scroll. **Not checked:** every one of the 52 tables on the device (two were looked at after the move; the rows were carried over from #73's lists, which were checked more widely). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
twisla added 1 commit 2026-10-06 23:42:56 +00:00
Keys: one table file for the device's help panel and the website's key tables (#72)
Site / build (pull_request) Successful in 8s
CI / build (pull_request) Successful in 7m14s
34e6714785
Every screen's keys are constant tables in lib/core/src/app_keys.h (52 of
them, each under an `// id: Title` comment). An App's help() picks the table
of the state it is in. site/tools/gen_dev_docs.py reads the same file and
writes site/data/keys.toml; the `keys` shortcode shows a screen's tables on
its guide page, and /guide/keys/ shows all of them.

The Site job fails when the data file is out of date or a page asks for a
table that doesn't exist, and now also runs when app_keys.h changes. A key
added to an App shows up on the website without anyone editing a page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
twisla merged commit 942725a047 into main 2026-10-06 23:50:58 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: twisla/roro9stack#75