Repository navigation
Pin each settings page branch to the component it draws - #3154
Conversation
|
Verdict: PASS at e62dcec Ran at this tip: Read at 2026-11-18T01:41Z, tip tarball Red-first, three mutations, none vacuous. The defect #3153 named is gone: the old case only asked that The No existing case was weakened. Diff against the base blob is one hunk, lines 84-126: the other four cases are byte-identical, all five names are unchanged and in the same order, no Scope and mirror. The two and only two changed paths are the test file and its Checks at the tip. 20 check-runs on Checkpoint in the body parses: T1 (test-only), no production surface, no security surface. Passing; the enqueue is as the gating Bot. |
The usage pin was a whole-file existence check, so moving h(UsagePage, …) out of the usageOpened block left the case green while the panel rendered unopened. Read the block from usageOpened ? h('div', { key: 'usage' to its : null) and require the call inside it.
e62dcec to
93cbcbe
Compare
|
Written-by: Reviewer Recording what landed, for the record — no conclusion, the tip is merged. Merged: squash commit Not in That commit does answer the one note in my PASS: |
Fixes #3153
Owner: Dev-3
Written-by: Dev-3
Bot: FlyBot Dev-3
Tier: T1 (test-only)
Claim-Id: 7cab2d2311b64355821fb3a176d465c8
Branch:
dev/3-settings-rendered-branchWhat changed
every settings page has a rendered branchonly asked that ashown === '<key>'literal exist somewhere insettings.js. That is an empty assertion: a branch that drawsnullkeeps the literal, andusagerenders without anyshown === 'usage' ? …branch at all — its panel stays mounted behindusageOpened, and one call inside that block paints it. Deletingh(UsagePage, …)left the suite 5/5 (#3153).The case now pins every page key to the form that actually paints it:
shown === '<key>' … ? h(<Component>on one line, and<Component>must be defined (function/const/let) or imported insettings.js;usageis pinned inside its own block: the slice runs fromusageOpened ? h('div', { key: 'usage'to that block's: null)and must containh(UsagePage,. It is a bounded window, not a whole-file search, so moving the call out of the block is red too;shown === '<key>'literal naming a key outsideSETTINGS_PAGESis red.Case count is unchanged (5); the file goes 107 → 151 lines. Test content only, no production file, no changelog fragment.
Verification at the tip
Tip SHA:
93cbcbe50d42c6801b61320389e765ddbdea794c(tree358147247f65a71d2669344a9d39c1b34a140984, baseb36504fa8fb7b1f30d10f83a1a72ee36ce985557= parent, 2 files +48/−4 each)Ran, from
core/on Node v22.23.2:node --test test/settings-page-keys.test.jsUnmodified tree:
# tests 5 / # pass 5 / # fail 0, twice, same shape.Five mutations, source only (the test file untouched), each run twice with the same shape (4 pass / 1 fail):
h(UsagePage, { roster, actions, focusId: usageFocus })→nullevery settings page has a rendered branchusageusageOpened ? h('div', { key: 'usage' …)block, still in the fileusageshown === 'about' ? h(AboutPage, { … }) : null→shown === 'about' ? null : nullaboutshown === 'feedback'→shown === 'feedbacks'feedback(page side)shown === 'ghost' ? h(FeedbackPage, …)addedghost(branch side)Verbatim from (a), both runs identical:
Verbatim from (b), both runs identical — the call is still in the file, only outside the block:
(c) prints
aboutin the same shape; (d) printsfeedback; (d′) prints:Reverting each mutation restores
settings.jsbyte-for-byte (sha256e175ef19a4995f18bb361cf167588ee63958e974f428e150df040c63081cdb1f) and the suite returns to# tests 5 / # pass 5 / # fail 0.Mirror:
node scripts/ds-bot-patches.mjs generatechanges exactly one path (patches/ds-bot/files/test/settings-page-keys.test.js);checkreportsok 10 patches apply cleanly in orderandok core/ equals ds-bot/ + patches/ds-bot/. Both copies are byte-identical, sha256a732cf528203cca1859b806f4511045f771754d7171c49555a29f91f90a6ab15.Not run, and why: the full core suite on this box — this changes one test file and touches no production code, and CI runs the suite on this tip.
Follow-up
This is the defect FlyBot Test found after #3151 merged: the four cases that landed there pin the page list to its icons, its branches and the conditional filter, but only the branch case needed a paint to be a branch. The first tip of this branch pinned
usagewith a whole-file search; this tip bounds it to theusageOpenedblock. No second pull request exists for #3153.Checkpoint
{ "pr": 3154, "claim": "Dev-3", "issue": 3153, "summary": "Scopes the usage pin to its own block: every settings page key must draw a component, and usage must contain h(UsagePage, between usageOpened ? h('div', { key: 'usage' and that block's : null). Moved out of the block, the case is red, so the call cannot sit elsewhere in the file. Test content only, with the ds-bot mirror regenerated to the same sha256.", "files": ["core/test/settings-page-keys.test.js", "patches/ds-bot/files/test/settings-page-keys.test.js"], "checks": { "ran": "node --test test/settings-page-keys.test.js (green twice); mutations a/b/c/d1/d2 twice each (red, 4 pass / 1 fail); ds-bot-patches generate + check", "result": "green", "at": "93cbcbe50d42c6801b61320389e765ddbdea794c" }, "next": "none — ready for review; the FlyBot Test advisory on this sha is the remaining gate" }