You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(client): cross-check every SETTINGS_PAGES key against icons, rendered branches and the page filter (P-706) #3150
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_PAGES with no icon in PAGE_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_ICONS
PAGE_ICONS keys are settings pages — PAGE_ICONS ⊆ SETTINGS_PAGES
every settings page has a rendered branch — each key appears as a shown === '<key>' literal
the conditional page filter names a settings page — the key !== '<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:99SETTINGS_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 sha256 e546baf4b0f1f530323d9bfd42b7430be4f8716581ca2ffd316d227e7bc5fe34), with patches/ byte-identical to main otherwise and ds-bot-patches check green
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.
#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 task p3151.
That lane holds the pickup-ok for #3151; nobody else should pick this up.
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