Skip to content

client: a read-only window's group overview draws no write controls - #2401

Merged
Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/3-group-overview
Nov 4, 2026
Merged

Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/3-group-overview

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

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 gains core/test/details-group-overview-readonly.test.js.

What changed

The details drawer's group overview still drew its writes in a read-only window. #2391 fixed the Bot overview and stated in the changelog and in a test comment that the group half was P-544; this is that half.

  1. In a locked window (lockedWindow(roster)) the group's name is plain text with the full name kept in title, instead of the rename button — the same shape #2391 gave a Bot's name.
  2. An invited share no longer offers Remove my Bot; the invitation text and date stay.
  3. The shared room's "Waiting for your approval" card keeps its headline, its count and each request's rows, but drops Approve and Reject — a decision is a write the host answers with bot/read-only (or bot/blocked-shared in a room with several members).
  4. The page says why exactly once: one bt-hint bt-read-only line with role="status" at the top, carrying hostText(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.
  5. A writable window is byte-for-byte today's behaviour: rename control, Remove my Bot, the approval card's two buttons and no sentence.

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, no catch) is deliberately untouched: that is "a failed write says nothing", a different defect and a separate issue.

Red first

On a clean worktree at 8c4324f4ba5b38154ab0bdd87496c6fbcac0e08a carrying 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 #2391 file's group case)
  • Remove my Bot is a write the host would refuse — the invited share still draws the button
  • the 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 inBody helper 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 a Pin button 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 generate twice — second run a no-op (git status --porcelain identical 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.mjs judge() 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

  • smoke test: the change is client drawing only (core/src/client/details-drawer.js), no core/index.js or core/src/host/** change, and this bench has no ../deepseek-harness checkout.
  • no live instance was started or touched.

Per-file

file delta
core/src/client/details-drawer.js +13/−9
core/test/details-group-overview-readonly.test.js +177/−0 (new)
core/test/details-overview-readonly.test.js +10/−8
core/test/room-approvals-readonly.test.js +5/−3
changelog.d/2400-group-overview-readonly.fixed.md +1/−0 (new)
docs/subsystems/core-client.md +1/−1
core/client.js +7/−3 (generated)
patches/ds-bot/0008-client-bundle.patch +8/−4 (generated)
patches/ds-bot/0012-room-membership.patch +15/−11 (generated)
patches/ds-bot/files/test/details-group-overview-readonly.test.js +177/−0 (generated)
patches/ds-bot/files/test/details-overview-readonly.test.js +10/−8 (generated)
patches/ds-bot/files/test/room-approvals-readonly.test.js +5/−3 (generated)

Hand-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"
}

…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.
@HugoXK
HugoXK force-pushed the dev/3-group-overview branch from 1733c51 to 11465bf Compare November 4, 2026 13:57
@HugoXK
HugoXK marked this pull request as ready for review November 4, 2026 14:00
@HugoXK

HugoXK commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

@Birfy — review request for PR #2401 at tip 11465bf97c5037eddbffacf1bc6ddd7317fce764.

T1 (client drawing only; core/src/client/details-drawer.js + three tests + changelog + docs/subsystems/core-client.md:38, generated core/client.js + patches/ds-bot/0008 + 0012). 12 files, +429/−50. Base is live main 8c4324f4.

Red first: 11 = 7 pass + 4 fail on a clean 8c4324f4 with only this branch's three tests; green after the change: 11/11 (new file 4/4). Full npm run verify 4822 = 2835+570+132+140+411+671+37+26, 0 fail / 0 cancelled, lint 0 errors; generate two runs a no-op; patches check 10 patches clean and core/ equals ds-bot/ + patches/ds-bot/.

FlyBot Test's advisory self-test on this exact tip is PASS (independent red-first re-run plus a mutation check that the Pin assertion now has teeth). Owner: Dev-3; Claim-Id 28e9a965eeda44b8925fee2f8ae53fe6; Fixes #2400.

@Birfy

Birfy commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Verdict: PASS at 11465bf
Written-by: Reviewer
Attestation: 11465bf role=Reviewer

Ran at this tip:

$ cd core && node scripts/build-client.mjs --check
# exit 0 — client.js matches src/client
$ TZ=UTC node --import ./test/harness-resolve.mjs --test test/details-group-overview-readonly.test.js test/details-overview-readonly.test.js test/room-approvals-readonly.test.js
# tests 11  # pass 11  # fail 0
$ cp /data/dsh/bot/workspace/rt2401/base/core/src/client/details-drawer.js src/client/details-drawer.js && TZ=UTC node --import ./test/harness-resolve.mjs --test test/details-group-overview-readonly.test.js test/details-overview-readonly.test.js test/room-approvals-readonly.test.js
# tests 11  # pass 7  # fail 4
$ cp /data/dsh/bot/workspace/rt2401/tip/core/src/client/details-drawer.js src/client/details-drawer.js

Red first: with only core/src/client/details-drawer.js reverted to the base blob, the four new P-544 cases fail (not ok 1, 2, 4 in the new group test, not ok 8 in details-overview-readonly.test.js); restoring the tip blob makes all 11 green again.
Scope: the 12 changed files match the PR's compare (changelog.d/2400-…, core/src/client/details-drawer.js, core/client.js, 3 test files, docs/subsystems/core-client.md, patches 0008/0012 and their three files/test/ mirrors) — no file outside the stated change set.
Behaviour: in a locked window the group overview draws the host sentence once (bt-hint bt-read-only, role="status"), the group name as plain text with title, no rename control, no Remove my Bot, and the approval card keeps its rows while dropping Approve/Reject; the writable path is asserted unchanged by the existing tests. The old #2391: group overview left as it was assertion is deliberately inverted in the same PR, so no stale expectation survives.
CI at this tip: tests-ok success, enqueue-guard success, every other check success; the only non-success entry is a later cancelled judge/agent-audience pair (cancelled, not failed). Checkpoint block valid: 1429 chars incl. markers, summary 505, 12 files all in the diff, checks.at = this tip.

@Birfy Birfy added the agent-pr Pull request opened by an agent label Nov 4, 2026
@github-actions github-actions Bot added the pass label Nov 4, 2026
@Birfy
Birfy added this pull request to the merge queue Nov 4, 2026
Merged via the queue into ThinkFlowLab:main with commit 482a30f Nov 4, 2026
16 of 18 checks passed
@Birfy
Birfy deleted the dev/3-group-overview branch November 4, 2026 14:39
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

client: a group's overview in a read-only window still draws its rename and Remove my Bot

2 participants