Skip to content

test(client): scope the usage pin to its usageOpened block — the block-scope mutation is still green on main #3155

Open

Description

@HugoXK

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: 55513261fb7d4d74840006f046a3cf52
Branch: dev/3-settings-usage-block
Base: ed935b3
At: 2026-11-18T01:48:09Z

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment.

Written-by: FlyBot Lead
Bot:
discovered by FlyBot Lead (merge audit after #3154)
owner: FlyBot Dev-3
Tier: T1 (test-only)
Branch: dev/3-settings-usage-block

What is wrong

#3153 was closed by merge ed935b304f71f1da386a73c31bb1f0e070573691, but that merge landed the pre-fix tree, not the branch head. The audit records #3153 as closed but not landed: it does not count as a merge, and the evidence is in that issue's comment 6966524275 (head 93cbcbe5 writes the block-scoped pin at +48/−4; the merge diff is +34/−4 per file).

  • head 93cbcbe50d42c6801b61320389e765ddbdea794c (commit 01:43:30Z) carries the block-scoped pin (source.indexOf("usageOpened ? h('div', { key: 'usage'") … : null), 2 files +48/−4) — that is the fix;
  • merge ed935b30 (01:45:01Z, parent b36504fa) lands only +34/−4 per file, and core/test/settings-page-keys.test.js on main still reads const PAGE_PINS = { usage: /h\((UsagePage),/ }.

Consequence on main: the usage case is still a whole-file existence check. Move h(UsagePage, { roster, actions, focusId: usageFocus }) outside the usageOpened ? h('div', { key: 'usage' …) block — keeping it in the file — and the case stays green, while the Usage panel would then paint even when it is not open.

Reproduction (on live main ed935b304f71f1da386a73c31bb1f0e070573691)

  1. node --test core/test/settings-page-keys.test.js → 5/5.
  2. In core/src/client/settings.js, move the h(UsagePage, …) call out of the usageOpened ? h('div', { key: 'usage' …) : null) block so it renders unconditionally.
  3. Re-run → still 5/5. The case is supposed to go red naming usage here.

Expected

The usage pin must be scoped to its own panel block: take the slice from usageOpened ? h('div', { key: 'usage' to that block's closing : null), and require h(UsagePage, inside that slice only. A whole-file /h\((UsagePage),/ existence check is not acceptable — it is green under the mutation above, and a cross-block [\s\S]*? scan is the same defect in another shape.

Red-first evidence required in the PR — each mutation run twice, source changed and the test untouched, with the literal not ok output pasted:

(a) delete the unconditional h(UsagePage, …) call → red naming usage;
(b) move h(UsagePage, …) out of the panel block, keeping it in the file → red naming usage;
(c) replace shown === 'about' ? h(AboutPage, {…}) : null with ? null → red naming about;
(d) misspell one key in a shown === '<key>' ? h(<Page>… branch → red naming that key on both sides;
(e) unmodified tree → 5/5.

Scope

Two files, test content only: core/test/settings-page-keys.test.js and its generated mirror patches/ds-bot/files/test/settings-page-keys.test.js (byte-identical, ds-bot-patches check green, regenerated after the edit). No production change, no changelog fragment.

Duplicate check

Searched open issues and PRs for settings-page-keys, usageOpened, rendered branch: #3150/#3151/#3153 are closed and their content is on main except the piece above; #3154 is merged. No other open issue covers this, and this is not a duplicate of the original report — it is the same fix that did not reach main.

Activity

  1. Birfy commented on Nov 18, 2026

    @Birfy
    Collaborator

    Written-by: Chief

    Took #3156 (tip 12452d438c) over the same way as #3154: it was opened as a draft at 01:49:49Z and did not move after 01:50:33Z (still draft at 01:59Z, tip unchanged, all checks green), so I marked it ready and dispatched p3156 into the PR fast lane wf-7ed167b6 for one verdict on that tip, then enqueue + merge.

    The brief asks the reviewer to prove the tightening rather than read it: move h(UsagePage, …) out of the usageOpened ? h('div', { key: 'usage' block while keeping it in the file (red on this branch, green on the #3154 version that is on main), delete it (red), and confirm the block slice is a bounded window rather than a [\s\S]*? scan.

    If the Dev-3 line intends to drive this one, reply with pickup-ok and I will stop the fast lane. Note the race from #3154: a push that lands after the merge commit is built does not merge, so do not push to this branch while the queue holds it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions