Skip to content

client: the drawer's Settings view writes a refusal above its scrolling box - #2386

Merged
Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/2-drawer-refusal-line
Nov 4, 2026
Merged

Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/2-drawer-refusal-line

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2385

Owner: Dev-2
Reviewer: Birfy
Claim-Id: ded7724826bd482fa06467d8c32c4055
Branch: dev/2-drawer-refusal-line
Tip: 7957a3e
Tree: 615a4460fbdd330e1da3a8770a8a35390aecc3ad
Base: 1848d0d
Diff: 8 files, +3664/-4558 (4 hand-written, 193 changed lines, +191/-2; 4 generated)
Tier: T1
why: [] — every hand-written path is client code, a client test, its mirror, or docs; lines 193, files 4, generated 4
basis: core/client.js=T1, core/src/client/details-drawer.js=T1, core/test/details-drawer-refusal-line.test.js=T1, patches/ds-bot/0008-client-bundle.patch=T1, patches/ds-bot/0012-room-membership.patch=T1, patches/ds-bot/files/test/details-drawer-refusal-line.test.js=T1, changelog.d/2385-drawer-refusal-line.fixed.md=T1, docs/subsystems/core-client.md=T0
Docs: docs/subsystems/core-client.md — the line that already records the #2194 rule ("the refusal is drawn outside the scrolling box") now names the drawer's own Settings view too, and lists core/test/details-drawer-refusal-line.test.js next to the existing test.

Per-file

file delta
core/src/client/details-drawer.js +5/−1
core/test/details-drawer-refusal-line.test.js +184/−0 (new)
changelog.d/2385-drawer-refusal-line.fixed.md +1/−0 (new)
docs/subsystems/core-client.md +1/−1
core/client.js +1/−1 (generated)
patches/ds-bot/0008-client-bundle.patch +3281/−4553 (generated)
patches/ds-bot/0012-room-membership.patch +7/−2 (generated)
patches/ds-bot/files/test/details-drawer-refusal-line.test.js +184/−0 (generated)

0008 is large because it embeds the whole client bundle; 0012 carries details-drawer.js itself.

What changed

The drawer's own Settings view (details-drawer.js, the settings tab branch) drew the host's refusal line as the first child of div.bt-drawer-body.bt-set-body. That is the box that scrolls (styles.js:389 — flex:1; overflow-y:auto), so pressing Delete group, Pin, Hide, Make admin or Remove in a read-only window — where every write is refused with bot/read-only — wrote the sentence at the top of the scroll area: above the viewport after the user scrolled to the button, with the card and the buttons unchanged. It looked as if the press had not registered, and the natural response was to press again. This is exactly the shape #2194 already removed from the Settings dialog, where settings.js:213 draws the same sentence outside .bt-settings-scroll (the reason is in the comment at :210-212 and in docs/subsystems/core-client.md).

After: the branch returns [head, errorLine, body] — errorLine is a sibling of bt-drawer-body, placed above it, so the sentence is written where the press happened instead of inside the box that hides it. No new component, no new wording, GroupSettingsForm and BotSettingsForm untouched; comments name the settings.js shape this follows.

Generated: core/client.js and patches/ds-bot/0008 from core && npm run build + generate; 0012 carries the drawer, and patches/ds-bot/files/test/ the new test (byte-identical to core/test/).

Verification at the tip

Tip SHA: 7957a3e

Ran:

  • Red first, on a clean 1848d0df worktree carrying only core/test/details-drawer-refusal-line.test.js from this branch: 3 tests, 1 pass, 2 fail, 0 cancelled. The two reds are the two halves of the defect, as committed — a refused Settings write says so in one alert line outside the scrolling box fails with the refusal line is not inside the scrolling box that hides it (expected false, actual true), and the refusal line comes before the scrolling box in document order fails with the refusal line is drawn above the scrolling box, where the press happened (expected true, actual false). The third test (a successful write draws no line) passes on the base and is the control.
  • After the fix: the same file 3/3, and the six neighbouring client files (details-bot-settings-readonly, room-approvals-readonly, approvals-readonly, details-copy, ui-clickthrough, link-room-title) plus this one 37/37.
  • TZ=UTC ARCH_DOCS_BASE=1848d0df npm run verify — exit 0: 2805 + 570 + 132 + 140 + 411 + 671 + 37 + 26 = 4792 pass, 0 fail, 0 cancelled; lint 0 errors (core 76 warnings, plugin 36/9/2/16, scripts 1); arch-docs: OK (8 changed file(s)).
  • node scripts/ds-bot-patches.mjs generate — first run wrote the artifacts, second run a no-op (clean tree).
  • node scripts/ds-bot-patches.mjs check exit 0 (10 patches apply cleanly in order, core/ equals ds-bot/ + patches/ds-bot/), canonical exit 0, node core/scripts/build-client.mjs --check exit 0.
  • node .github/scripts/changelog.mjs check exit 0 (20 fragments), check-empty-catch.mjs exit 0, check-mojibake.mjs --check exit 0 (0 occurrences in 1444 files).
  • Live 1848d0df .github/scripts/enqueue-rules.mjs checkpointReasons(body, { pr, files }) on this body and this diff: [].

Not run (and why): no hand walkthrough against a running host — none is installed on this box; the client behaviour above is measured through the fake React renderer room-approvals-readonly.test.js already uses, not jsdom. Nothing in npm run verify was skipped.

Checkpoint

{
  "pr": 2386,
  "claim": "Dev-2",
  "issue": 2385,
  "summary": "The drawer's Settings view drew the host's refusal line as the first child of the scrolling body, so a refused Pin/Delete/Hide landed above the viewport and the card looked unchanged. It now returns the line as a sibling above the body, the shape settings.js took in #2194, with no new component and no new wording. Tests: core/test/details-drawer-refusal-line.test.js, 2 red of 3 on a clean 1848d0df then 3/3; verify 4792 pass.",
  "files": [
    "core/src/client/details-drawer.js",
    "core/test/details-drawer-refusal-line.test.js",
    "changelog.d/2385-drawer-refusal-line.fixed.md",
    "docs/subsystems/core-client.md",
    "core/client.js",
    "patches/ds-bot/0008-client-bundle.patch",
    "patches/ds-bot/0012-room-membership.patch",
    "patches/ds-bot/files/test/details-drawer-refusal-line.test.js"
  ],
  "checks": { "ran": "TZ=UTC ARCH_DOCS_BASE=1848d0df npm run verify (4792 pass, 0 fail); generate no-op; patches check+canonical; build-client --check; changelog; empty-catch; mojibake; lint 0 errors; red-first 1 pass + 2 fail then 3/3", "result": "green", "at": "7957a3ef79f1b56a6fde04bad63b3f2fb5197d56" },
  "next": "none — ready for review"
}

@HugoXK
HugoXK marked this pull request as ready for review November 4, 2026 11:27
@Birfy
Birfy added this pull request to the merge queue Nov 4, 2026
@HugoXK

HugoXK commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

@Birfy — ready for the queue on this tip: 7957a3ef79f1b56a6fde04bad63b3f2fb5197d56 (T1, no Verdict required).

The drawer's own Settings view drew the host's refusal line as the first child of div.bt-drawer-body.bt-set-body — the box that scrolls (styles.js:389) — so a refused Pin / Delete group / Hide / Make admin / Remove landed above the viewport and the card looked unchanged. It now returns [head, errorLine, body]: the line is a sibling above the scrolling box, the shape settings.js:213 already took in #2194. No new component, no new wording; GroupSettingsForm / BotSettingsForm untouched. core/client.js and patches/ds-bot/0008 are regenerated, 0012 carries details-drawer.js, patches/ds-bot/files/test/ is byte-identical to core/test/; core/src/host/** has zero diff against the base.

docs/subsystems/core-client.md and changelog.d/2385-drawer-refusal-line.fixed.md were changed in this same PR.

Checks at this tip: 17 success + 0 cancelled + 0 failure. Body arithmetic is reproducible: hand-written 4 files +191/−2 (193 changed lines), generated +3473/−4556, total +3664/−4558.

Merged via the queue into ThinkFlowLab:main with commit 3b1dcb7 Nov 4, 2026
17 checks passed
@Birfy
Birfy deleted the dev/2-drawer-refusal-line branch November 4, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants