You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
client: a read-only room approval card draws no decision and says why - #2382
Owner: Dev-2
Reviewer: Birfy
Claim-Id: a08289a30428444bbafe5b2dc15e16db
Branch: dev/2-room-approvals-readonly
Tip: ee2abe5
Tree: 81cdcb0919083fe8a09f32b4125c9a1493f7351e
Base: 205bd44
Diff: 10 files, +1030/-588 (5 hand-written, 222 changed lines; 5 generated)
Tier: T1
why: []
basis: core/client.js=T1, core/src/client/details-drawer.js=T1, core/src/client/i18n.js=T1, core/test/room-approvals-readonly.test.js=T1, patches/ds-bot/0001-core-fixes.patch=T1, patches/ds-bot/0008-client-bundle.patch=T1, patches/ds-bot/0012-room-membership.patch=T1, patches/ds-bot/files/test/room-approvals-readonly.test.js=T1, docs/subsystems/core-client.md=T0, changelog.d/2381-room-approvals-readonly.fixed.md=T1; lines 222, files 5, generated 5
Docs: docs/subsystems/core-client.md — the Owns section gains one SharedRoomApprovals bullet: the shared room overview card draws no Approve/Reject in a read-only window and carries the host sentence in one role="status" line, a decision the host still refuses writes one role="alert" line (bt-error) instead of vanishing, both try/finally swallowed it before, and core/test/room-approvals-readonly.test.js covers it.
What changed
A window that holds the team read-only no longer draws Approve / Reject on the shared room overview's "Waiting for your approval" card (details-drawer.jsSharedRoomApprovals). A decision is a write (social/decide-approval), so the host refuses it there with bot/read-only — or bot/blocked-shared in a room with several members — and the two buttons could only earn that refusal after the click.
Before: the card was mounted with h(SharedRoomApprovals, { key: 'approvals', room }), so it had no roster and no lock of its own, and it drew both buttons in a window that cannot decide; decide was a try/finally with no catch, so the refusal it got back was swallowed and the card said nothing at all.
After: SharedRoomApprovals({ room, roster }) reads lockedWindow(roster) — the same helper the drawer's own Settings view already used (details-drawer.js:270) — and in a read-only window replaces the two buttons with one div.bt-hint.bt-read-only line (role="status") carrying hostText(roster.readOnly). The headline, the count and each request's own text stay. A decision the host still refuses now writes one div.bt-error line (role="alert") with the failure's own sentence, or The decision was not sent. when it carries none (zh added in core/src/client/i18n.js), instead of vanishing.
Generated: core/client.js and patches/ds-bot/0008 from core && npm run build + generate; 0001 carries the i18n line, 0012 the component, patches/ds-bot/files/test/ the new test.
Red first, on a clean 205bd44f worktree carrying only core/test/room-approvals-readonly.test.js from this branch: 3 tests, 0 pass, 3 fail, 0 cancelled — a read-only window draws neither Approve nor Reject on the room approval card (actual ['Approve','Reject']), the read-only room card carries the host sentence in one status line (0 !== 1), a refused decision says so in one alert line instead of vanishing (the refusal is written once — 0 !== 1).
After the fix: the same file 3/3, and the eight neighbouring client files (details-bot-settings-readonly, details-copy, ui-clickthrough, link-room-title, looks, approvals-readonly, i18n, this one) 44/44.
Live 205bd44f.github/scripts/enqueue-rules.mjscheckpointReasons(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 approvals-readonly.test.js already uses, not jsdom. Nothing in npm run verify was skipped.
Checkpoint
{
"pr": 2382,
"claim": "Dev-2",
"issue": 2381,
"summary": "The shared room overview's approval card no longer draws Approve or Reject in a read-only window: it reads lockedWindow(roster) like the drawer's Settings view and prints the host's own sentence in one status line, keeping the headline, the count and each request's text. A decision the host still refuses — a writable window, or a room with several members — now writes that reason in one alert line instead of vanishing. Tests: core/test/room-approvals-readonly.test.js, 3 red then 3 green on 205bd44f; verify 4787 pass.",
"files": [
"core/src/client/details-drawer.js",
"core/test/room-approvals-readonly.test.js",
"core/src/client/i18n.js",
"core/client.js",
"patches/ds-bot/0012-room-membership.patch",
"patches/ds-bot/0008-client-bundle.patch",
"patches/ds-bot/0001-core-fixes.patch",
"patches/ds-bot/files/test/room-approvals-readonly.test.js",
"docs/subsystems/core-client.md",
"changelog.d/2381-room-approvals-readonly.fixed.md"
],
"checks": { "ran": "TZ=UTC ARCH_DOCS_BASE=205bd44f npm run verify (4787 pass, 0 fail); generate no-op; patches check+canonical; build-client --check; changelog; empty-catch; mojibake; lint 0 errors; red-first 3/0/3 then 3/3", "result": "green", "at": "ee2abe5ff7268082a21236fd230ae8af30ad0d9f" },
"next": "none — ready for review"
}
Non-draft since 2026-11-04T10:27:21Z, maintainer_can_modify: true, mergeable_state: clean, body opens with Fixes #2381
Request: send this head to the merge queue. T1 carries no Verdict requirement, so the only thing this PR is waiting on is the queue itself.
Advisory from FlyBot Test, run independently at this same tip (advisory, not a gate): PASS at ee2abe5f — red first on base 205bd44f with only the new test file is 3 = 0 pass + 3 fail (a read-only card still offered ["Approve","Reject"], 0 read-only lines, 0 alert lines), and at the tip the new file is 3/3 with seven neighbouring client files 40/40/0; TZ=UTC ARCH_DOCS_BASE=205bd44f npm run verify → 4787 pass, 0 fail, 0 cancelled; build-client --check and a second generate are clean.
On the base field: main has since moved to 9a0a106b (#2380). This head was not rebased, deliberately and on measurement: merging it into 9a0a106b locally is conflict-free, scripts/ds-bot-patches.mjs check on the merged tree reports 10 patches apply cleanly in order plus core/ equals ds-bot/ + patches/ds-bot/, canonical reports generate is a no-op, build-client --check exits 0, and room-approvals-readonly 3/3, details-bot-settings-readonly 3/3, questions-readonly 6/6, approvals-readonly 6/6, diagnostics 41/41, store 20/20 on that merged tree. The tip is unchanged, so the advisory above still names it.
What it changes, in one line: the shared room overview's approval card read lockedWindow(roster) (already used by the drawer's Settings view) and in a read-only window replaces Approve/Reject with one role="status" line carrying the host's own sentence, keeping the headline, the count and each request's text; a decision the host still refuses writes that reason in one role="alert" line instead of vanishing in a try/finally with no catch.
Merged
via the queue into
ThinkFlowLab:main
with commit 1848d0dNov 4, 2026
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
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 #2381
Owner: Dev-2
Reviewer: Birfy
Claim-Id: a08289a30428444bbafe5b2dc15e16db
Branch: dev/2-room-approvals-readonly
Tip: ee2abe5
Tree: 81cdcb0919083fe8a09f32b4125c9a1493f7351e
Base: 205bd44
Diff: 10 files, +1030/-588 (5 hand-written, 222 changed lines; 5 generated)
Tier: T1
why: []
basis: core/client.js=T1, core/src/client/details-drawer.js=T1, core/src/client/i18n.js=T1, core/test/room-approvals-readonly.test.js=T1, patches/ds-bot/0001-core-fixes.patch=T1, patches/ds-bot/0008-client-bundle.patch=T1, patches/ds-bot/0012-room-membership.patch=T1, patches/ds-bot/files/test/room-approvals-readonly.test.js=T1, docs/subsystems/core-client.md=T0, changelog.d/2381-room-approvals-readonly.fixed.md=T1; lines 222, files 5, generated 5
Docs:
docs/subsystems/core-client.md— the Owns section gains oneSharedRoomApprovalsbullet: the shared room overview card draws no Approve/Reject in a read-only window and carries the host sentence in onerole="status"line, a decision the host still refuses writes onerole="alert"line (bt-error) instead of vanishing, bothtry/finallyswallowed it before, andcore/test/room-approvals-readonly.test.jscovers it.What changed
A window that holds the team read-only no longer draws Approve / Reject on the shared room overview's "Waiting for your approval" card (
details-drawer.jsSharedRoomApprovals). A decision is a write (social/decide-approval), so the host refuses it there withbot/read-only— orbot/blocked-sharedin a room with several members — and the two buttons could only earn that refusal after the click.Before: the card was mounted with
h(SharedRoomApprovals, { key: 'approvals', room }), so it had no roster and no lock of its own, and it drew both buttons in a window that cannot decide;decidewas atry/finallywith nocatch, so the refusal it got back was swallowed and the card said nothing at all.After:
SharedRoomApprovals({ room, roster })readslockedWindow(roster)— the same helper the drawer's own Settings view already used (details-drawer.js:270) — and in a read-only window replaces the two buttons with onediv.bt-hint.bt-read-onlyline (role="status") carryinghostText(roster.readOnly). The headline, the count and each request's own text stay. A decision the host still refuses now writes onediv.bt-errorline (role="alert") with the failure's own sentence, orThe decision was not sent.when it carries none (zh added incore/src/client/i18n.js), instead of vanishing.Generated:
core/client.jsandpatches/ds-bot/0008fromcore && npm run build+generate;0001carries the i18n line,0012the component,patches/ds-bot/files/test/the new test.Verification at the tip
Tip SHA: ee2abe5
Ran:
205bd44fworktree carrying onlycore/test/room-approvals-readonly.test.jsfrom this branch: 3 tests, 0 pass, 3 fail, 0 cancelled —a read-only window draws neither Approve nor Reject on the room approval card(actual ['Approve','Reject']),the read-only room card carries the host sentence in one status line(0 !== 1),a refused decision says so in one alert line instead of vanishing(the refusal is written once — 0 !== 1).details-bot-settings-readonly,details-copy,ui-clickthrough,link-room-title,looks,approvals-readonly,i18n, this one) 44/44.TZ=UTC ARCH_DOCS_BASE=205bd44f npm run verify— exit 0: 2800 + 570 + 132 + 140 + 411 + 671 + 37 + 26 = 4787 pass, 0 fail, 0 cancelled;lint0 errors (core 75 warnings, plugin 36/9/2/16, scripts 1);arch-docs: OK (10 changed file(s)).node scripts/ds-bot-patches.mjs generate— second run a no-op (clean tree).node scripts/ds-bot-patches.mjs checkexit 0 (10 patches apply cleanly in order,core/ equals ds-bot/ + patches/ds-bot/),canonicalexit 0,node core/scripts/build-client.mjs --checkexit 0.node .github/scripts/changelog.mjs checkexit 0 (18 fragments),check-empty-catch.mjsexit 0,check-mojibake.mjsexit 0 (0 occurrences in 1440 files).205bd44f.github/scripts/enqueue-rules.mjscheckpointReasons(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
approvals-readonly.test.jsalready uses, not jsdom. Nothing innpm run verifywas skipped.Checkpoint
{ "pr": 2382, "claim": "Dev-2", "issue": 2381, "summary": "The shared room overview's approval card no longer draws Approve or Reject in a read-only window: it reads lockedWindow(roster) like the drawer's Settings view and prints the host's own sentence in one status line, keeping the headline, the count and each request's text. A decision the host still refuses — a writable window, or a room with several members — now writes that reason in one alert line instead of vanishing. Tests: core/test/room-approvals-readonly.test.js, 3 red then 3 green on 205bd44f; verify 4787 pass.", "files": [ "core/src/client/details-drawer.js", "core/test/room-approvals-readonly.test.js", "core/src/client/i18n.js", "core/client.js", "patches/ds-bot/0012-room-membership.patch", "patches/ds-bot/0008-client-bundle.patch", "patches/ds-bot/0001-core-fixes.patch", "patches/ds-bot/files/test/room-approvals-readonly.test.js", "docs/subsystems/core-client.md", "changelog.d/2381-room-approvals-readonly.fixed.md" ], "checks": { "ran": "TZ=UTC ARCH_DOCS_BASE=205bd44f npm run verify (4787 pass, 0 fail); generate no-op; patches check+canonical; build-client --check; changelog; empty-catch; mojibake; lint 0 errors; red-first 3/0/3 then 3/3", "result": "green", "at": "ee2abe5ff7268082a21236fd230ae8af30ad0d9f" }, "next": "none — ready for review" }