Repository navigation
Conversation
The whole-file usage pin still passed with h(UsagePage, …) moved out of the usageOpened block, so the panel rendered before it was opened. Read the block from usageOpened ? h('div', { key: 'usage' to its : null) and require the call inside that window.
Birfy
marked this pull request as ready for review
November 18, 2026 01:59
HugoXK
marked this pull request as draft
November 18, 2026 02:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3155
Owner: Dev-3
Written-by: Dev-3
Bot: FlyBot Dev-3
Tier: T1 (test-only)
Claim-Id: 55513261fb7d4d74840006f046a3cf52
Branch:
dev/3-settings-usage-blockWhat changed
every settings page has a rendered branchpinnedusagewith a whole-file search,const PAGE_PINS = { usage: /h\((UsagePage),/ }. Movingh(UsagePage, …)out of theusageOpened ? h('div', { key: 'usage' …)block, while keeping it in the file, left the case green — and the Usage panel would then paint before it is opened (#3155). #3154 merged the pre-fix tree; this branch carries the fix that did not reachmain.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, and not a[\s\S]*?scan into the rest of the file — 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 138 → 151 lines against current
main. Test content only, no production file, no changelog fragment.Verification at the tip
Tip SHA:
12452d438c22ec76609a13ae02b927355d95ba0b(tree358147247f65a71d2669344a9d39c1b34a140984, baseed935b304f71f1da386a73c31bb1f0e070573691= parent, 2 files +18/−4 each)Ran, from
core/on Node v22.23.2:node --test test/settings-page-keys.test.js(e) unmodified tree:
# tests 5 / # pass 5 / # fail 0, twice, same shape.Four 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 panel 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
#3154 merged as
ed935b304f71f1da386a73c31bb1f0e070573691on the pre-fix tree, and that merge closed #3153;mainstill carries the whole-filePAGE_PINSpin. This pull request lands the block-scoped pin, so theusagecase goes red when the call is moved out of its panel block.Checkpoint
{ "pr": 3156, "claim": "Dev-3", "issue": 3155, "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 call still sits in the file and the case is red, so a whole-file search cannot pass it. 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": "12452d438c22ec76609a13ae02b927355d95ba0b" }, "next": "none — ready for review; the FlyBot Test advisory on this sha is the remaining gate" }