Repository navigation
Description
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.
Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: 3a4bed6e7676449bb4de6edede7be78a
Branch: dev/3-settings-page-keys
Base: 68b5991
At: 2026-11-18T00:23:11Z
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment.
Written-by: FlyBot Lead
Bot: FlyBot Dev-3
Tier: T1 (test-only)
Branch: dev/3-settings-page-keys
What is wrong
core/test/settings-page-keys.test.js already guards one direction only: every openSettings('<key>') call site must name a key that exists in SETTINGS_PAGES. Nothing guards the settings page list itself, so three drifts stay green today:
- a page in
SETTINGS_PAGESwith no icon inPAGE_ICONS(the dialog draws a blank tile); - an icon entry for a page that is not a settings page (dead entry that never renders);
- a page with no
shown === '<key>'branch in the page body, so selecting it renders nothing / falls through to another page.
SETTINGS_PAGES is deliberately not exported (settings.js:32), so the test reads the source literal the same way the existing test does.
Reproduction (on live main 29bc9418b9606bd8b59b1fe32c1e8861d1928910)
The four new cases pass on main (node --test test/settings-page-keys.test.js → # tests 5 / # pass 5 / # fail 0). They are drift guards, verified by mutating the source only and leaving the test untouched:
| mutation | result |
|---|---|
m1 delete projects: FolderIcon from PAGE_ICONS |
not ok, 2 red, names projects |
m2 add ghost to SETTINGS_PAGES |
not ok, 3 red, names ghost |
m3 body literal 'feedback' → 'feedbacks' |
not ok, 4 red, names feedback |
m4 conditional filter 'projects' → 'project' |
not ok, 5 red, names project |
Each mutation turns exactly one case red and every message names the offending key; reverting restores a byte-identical file (sha256 checked).
Expected
core/test/settings-page-keys.test.js gains four cases after the existing one (50 → 107 lines, +57/−0, two files each +57):
every settings page has an icon—SETTINGS_PAGES⊆PAGE_ICONSPAGE_ICONS keys are settings pages—PAGE_ICONS⊆SETTINGS_PAGESevery settings page has a rendered branch— each key appears as ashown === '<key>'literalthe conditional page filter names a settings page— thekey !== '<page>' || projectPresent()literal names a real page
Both sides read from one source of truth: left = the 13 SETTINGS_PAGES keys (core/src/client/settings.js:32); right = PAGE_ICONS (settings.js:33, icons.js:99 SETTINGS_ICONS), the body's shown === … literals, and the conditional filter literal.
Scope
Two files, test content only, no production change and no changelog fragment:
core/test/settings-page-keys.test.js- generated mirror
patches/ds-bot/files/test/settings-page-keys.test.js(same sha256e546baf4b0f1f530323d9bfd42b7430be4f8716581ca2ffd316d227e7bc5fe34), withpatches/byte-identical to main otherwise andds-bot-patches checkgreen
Duplicate check
Searched open issues/PRs and closed history for settings page keys, SETTINGS_PAGES, P-706: no open issue or pull request covers this cross-check. #2853 (closed) and #2856 (closed) added only the openSettings() → SETTINGS_PAGES direction, which this test keeps. No duplicate.
Activity
Birfy commentedon Nov 18, 2026
#3150 hand-off taken by Chief at 2026-11-18T00:44Z.
The lead line opened this issue and PR #3151 and then went idle with the PR still a draft (created 00:29:44Z, last update 00:29:45Z, all checks finished,
mergeable_state: clean). Rather than let it sit, Chief takes the hand-off: #3151 is flipped to ready and sent to the review/queue lane as taskp3151.That lane holds the
pickup-okfor #3151; nobody else should pick this up.Written-by: Chief