Repository navigation
client: a read-only window's group overview draws no write controls - #2401
Conversation
…hinkFlowLab#2400) A locked window refuses every write the group overview offers — the rename, the invited share's Remove my Bot, the approval card's decisions — yet the overview drew them all and said nothing about why. It now draws the host's sentence once, above the reads, keeps the group's name as plain text, and leaves a writable window exactly as it was.
1733c51 to
11465bf
Compare
|
@Birfy — review request for PR #2401 at tip T1 (client drawing only; Red first: 11 = 7 pass + 4 fail on a clean FlyBot Test's advisory self-test on this exact tip is PASS (independent red-first re-run plus a mutation check that the |
|
Verdict: PASS at 11465bf Ran at this tip: Red first: with only |
Fixes #2400
Owner: Dev-3
Reviewer: Birfy
Claim-Id: 28e9a965eeda44b8925fee2f8ae53fe6
Branch: dev/3-group-overview
Tip: 11465bf
Tree: 9e54bbd2c70166efa3f9f713a2a0883e2d930b5b
Base: 8c4324f
Diff: 12 files, +429/−50 (6 hand-written, 228 changed lines, +207/−21; 6 generated, +222/−29)
Tier: T1
why: [] — every hand-written path is client source, its tests, a changelog fragment or docs; no content hit and no size bump (228 changed lines / 6 non-generated files are inside T1's limits)
basis: changelog.d/2400-group-overview-readonly.fixed.md=T1, core/client.js=T1, core/src/client/details-drawer.js=T1, core/test/details-group-overview-readonly.test.js=T1, core/test/details-overview-readonly.test.js=T1, core/test/room-approvals-readonly.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-group-overview-readonly.test.js=T1, patches/ds-bot/files/test/details-overview-readonly.test.js=T1, patches/ds-bot/files/test/room-approvals-readonly.test.js=T1, docs/subsystems/core-client.md=T0
Docs:
docs/subsystems/core-client.md— the sentence that records the drawer's read-only rules now says the group overview follows them too, and the test list gainscore/test/details-group-overview-readonly.test.js.What changed
The details drawer's group overview still drew its writes in a read-only window.
#2391fixed the Bot overview and stated in the changelog and in a test comment that the group half was P-544; this is that half.lockedWindow(roster)) the group's name is plain text with the full name kept intitle, instead of the rename button — the same shape#2391gave a Bot's name.bot/read-only(orbot/blocked-sharedin a room with several members).bt-hint bt-read-onlyline withrole="status"at the top, carryinghostText(roster.readOnly). The approval card used to carry its own copy (#2381); one page, one sentence, so that copy is gone and the single top line is the one drawn.Pin / Hide: they are not in this tree on the base commit — the group overview never drew them (they live in Group settings' Sidebar card, replaced wholesale by
#2387, and in the group context menu, guarded by#2238). This change therefore does not remove them; the new test pins that the group overview draws neither, so a later change cannot introduce them in a locked window.Remove my Bot's silent refusal (details-drawer.js:194, nocatch) is deliberately untouched: that is "a failed write says nothing", a different defect and a separate issue.Red first
On a clean worktree at
8c4324f4ba5b38154ab0bdd87496c6fbcac0e08acarrying only this branch's three test files: 11 tests / 7 pass / 4 fail / 0 cancelled, exit 1. The four reds are the defect:the host's sentence is drawn once—expected 1, actual 0(twice: the new file and the#2391file's group case)Remove my Bot is a write the host would refuse— the invited share still draws the buttonthe page sentence is drawn above the approval card, not repeated inside it—expected false, actual true(the sentence is still inside the card, and none is at the top)The seventh and eighth cases pass on the base and are controls: a writable group keeps the rename control, Remove my Bot and no sentence. The
inBodyhelper selects the drawer body's descendants — it used to select the body's ancestors, so the Pin / Hide assertion ran on an empty button list and could not fail; with the corrected helper aPinbutton injected into the locked branch turns that case red, and the unmutated source keeps the file at 4/4.After the fix: the new file 4/4; the three touched files 11/11.
Ran
TZ=UTC ARCH_DOCS_BASE=8c4324f4ba5b38154ab0bdd87496c6fbcac0e08a npm run verify— exit 0: 2835 + 570 + 132 + 140 + 411 + 671 + 37 + 26 = 4822 pass, 0 fail, 0 cancelled; lint 0 errors (core 76 warnings, social 36, timeline 9, tree 2, workflow 16, scripts 1, interop 0);arch-docs: OK (12 changed file(s)).node scripts/ds-bot-patches.mjs generatetwice — second run a no-op (git status --porcelainidentical before and after, 12 paths), exit 0.node scripts/ds-bot-patches.mjs check—10 patches apply cleanly in order,core/ equals ds-bot/ + patches/ds-bot/.node scripts/ds-bot-patches.mjs canonical—patches/ds-bot/ is what generate writes (generate is a no-op).node core/scripts/build-client.mjs --check— exit 0.node .github/scripts/changelog.mjs check— 27 fragments well formed.node .github/scripts/check-empty-catch.mjs --check— exit 0.node .github/scripts/check-mojibake.mjs --check—0 occurrences of U+FFFD in 1459 text file(s)(22 skipped as binary).risk-gate.mjsjudge()over the base's rules and this diff, patches included —risk-tier: T1(228 changed lines, 6 non-generated files; content patterns no hit).Not run
core/src/client/details-drawer.js), nocore/index.jsorcore/src/host/**change, and this bench has no../deepseek-harnesscheckout.Per-file
core/src/client/details-drawer.jscore/test/details-group-overview-readonly.test.jscore/test/details-overview-readonly.test.jscore/test/room-approvals-readonly.test.jschangelog.d/2400-group-overview-readonly.fixed.mddocs/subsystems/core-client.mdcore/client.jspatches/ds-bot/0008-client-bundle.patchpatches/ds-bot/0012-room-membership.patchpatches/ds-bot/files/test/details-group-overview-readonly.test.jspatches/ds-bot/files/test/details-overview-readonly.test.jspatches/ds-bot/files/test/room-approvals-readonly.test.jsHand-written: +207/−21 (6 files, 228 changed lines). Generated: +222/−29 (6 files). Total
+429/−50.Checkpoint
{ "pr": 2401, "claim": "Dev-3", "issue": 2400, "summary": "A read-only window's group overview drew every write it offered — the rename, Remove my Bot, the approval card's decisions — and said nothing about why. It now draws the host's sentence once at the top, keeps the group name as plain text, drops those controls, and leaves a writable window exactly as it was. #2391 fixed the Bot overview and left this half; Pin and Hide were never in this tree and are pinned by a regression test. The silent Remove my Bot refusal at details-drawer.js:194 is not touched.", "files": ["changelog.d/2400-group-overview-readonly.fixed.md", "core/src/client/details-drawer.js", "core/test/details-group-overview-readonly.test.js", "core/test/details-overview-readonly.test.js", "core/test/room-approvals-readonly.test.js", "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-group-overview-readonly.test.js", "patches/ds-bot/files/test/details-overview-readonly.test.js", "patches/ds-bot/files/test/room-approvals-readonly.test.js"], "checks": { "ran": "TZ=UTC ARCH_DOCS_BASE=8c4324f4ba5b38154ab0bdd87496c6fbcac0e08a npm run verify", "result": "green", "at": "11465bf97c5037eddbffacf1bc6ddd7317fce764" }, "next": "none — ready for review" }