Repository navigation
Conversation
The hint joined every room a share is used in, so a long-lived share printed 15 rooms in 362 characters inside a settings row, and the face-to-face rooms came back under "This room only" directly below it. The hint now names at most three rooms, says how many are left, and keeps the full list in its tooltip; both lists dedupe by room id, so nothing is printed twice in one card. Copy and layout only: social/access already returns the rooms. Fixes #955.
Collaborator
Author
|
Superseded by #959 on the same branch at This PR was closed by accident, not by a decision: my push helper deleted the branch ref and recreated it at the new tip (the arch-docs fix added |
HugoXK
pushed a commit
to HugoXK/FlyBot
that referenced
this pull request
Oct 24, 2026
Owner: Dev4 Reviewer: Reviewer Fixes ThinkFlowLab#955 Supersedes: ThinkFlowLab#958 Tip SHA: 8db890d ## Reproduce On `d1052c0e`, `plugins/social/client.js:2957` renders the whole room list into one hint: ```js In use: ${(grant.rooms ?? []).map(room => room.name || room.id).join(', ')} ``` and `:2970-2971` prints the face-to-face rooms again, two lines lower, under `This room only:`. With the self-test's own data — 15 rooms, names like `Face-to-face · SelfTest A2, SelfTest B2 · 856467` — that row measured **362 characters on a 1360 px window**. The one fact the row exists for (this person can use my Bot in N rooms) is lost, and the room list is repeated. The new render test fails on the pristine client for exactly that reason (`hints.length` is 0: the row never says how many rooms there are), and it fails again when the change is present but the dedupe is dropped (the repeat comes back). ## What changed - `plugins/social/client.js` (+31/−2): one pair of helpers for both hints. `roomList()` dedupes by room id (the same room arrives once per grant and once in `view.rooms`) and `roomHint()` names at most three rooms plus `+N more`, keeps the whole sentence inside 80 characters by clipping names only when whole names do not fit, and puts every room, one per line, in the hint's `title`. `ManageAccess` uses it for `In use in 15 rooms: …` and for `This room only:`, passing the room ids the grant rows already printed so nothing is listed twice in one card. A short list still prints whole names (`In use in 1 room: Face-to-face · A2, B2 · 856467`), and a grant with no rooms renders no hint (no `+0 more`). The row structure `People with access` (`:2949-2969`) is untouched. - `plugins/social/test/social.test.js` (+96): three tests — the 15-room fixture (`≤80` characters, three names, `+12 more`, 15-line tooltip), dedupe plus the no-rooms and single-room cases, and one render-level test that walks the actual `ManageAccess` tree and asserts one hint, the same numbers, and no `This room only:` repeat. - `docs/subsystems/social.md` (+1 sentence: the arch-docs rule for an owned plugin path) and `changelog.d/955-access-rooms-hint.fixed.md`. Client copy and layout only: `social/access` already returns `grant.rooms` and `view.rooms`, so no host, protocol or bundle change (`node core/scripts/build-client.mjs --check` exits 0; the plugin client is not part of `core/client.js`). ## What I ran On `7e64641b` (this tip), `plugins/social` full suite: **405 pass / 0 fail** (10.1 s). `node .github/scripts/changelog.mjs check`: 56 fragments well formed; `node core/scripts/check-arch-docs.mjs` cannot diff here (no git), left to CI — which is exactly what caught it on the first tip. `oxlint plugins/social/client.js plugins/social/test/social.test.js`: 9 warnings / 0 errors, the same 9 the pristine file has. `node core/scripts/build-client.mjs --check`: exit 0. ## Red without the source change - Pristine `client.js` + these three tests → **0 pass / 3 fail** (`ThinkFlowLab#955: the access hint names three rooms…`, `…no room is named twice…`, `…the rendered access row keeps one short line…`). - Keep the change, drop the dedupe argument (`roomHint('only', rooms)` without the ids already printed) → the render test alone goes red: `ThinkFlowLab#955: the rendered access row keeps one short line and the repeat is gone`, 2 pass / 1 fail. Restored, 3/3 again. ## Not run - No browser run of the settings page on this tip: the render-level test walks the component tree with the same fake `h` the other client tests use, and the probe that found the defect measured the real page. If a real-UI pass is wanted, `SelfTest` has the harness running on 3096/3097. - `scripts/lint-plugins.mjs` cannot find `oxlint` in this box (`npm run harness` is not installed), so the lint above was run with the oxlint binary directly. ## Risk T1: one hint's wording and length, plus a tooltip. Nothing that parses the string (the room list is display-only), no host or protocol change, no change to `People with access` rows, revoke or auto-send. The only behaviour that changes shape is how many room names are printed before `+N more`, and the full list stays one hover away.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Owner: Dev4
Reviewer: Reviewer
Fixes #955
Tip SHA: 8db890d
Reproduce
On
d1052c0e,plugins/social/client.js:2957renders the whole room list into one hint:and
:2970-2971prints the face-to-face rooms again, two lines lower, underThis room only:. With the self-test's own data — 15 rooms, names likeFace-to-face · SelfTest A2, SelfTest B2 · 856467— that row measured 362 characters on a 1360 px window. The one fact the row exists for (this person can use my Bot in N rooms) is lost, and the room list is repeated.The new render test fails on the pristine client for exactly that reason (
hints.lengthis 0: the row never says how many rooms there are), and it fails again when the change is present but the dedupe is dropped (the repeat comes back).What changed
plugins/social/client.js(+31/−2): one pair of helpers for both hints.roomList()dedupes by room id (the same room arrives once per grant and once inview.rooms) androomHint()names at most three rooms plus+N more, keeps the whole sentence inside 80 characters by clipping names only when whole names do not fit, and puts every room, one per line, in the hint'stitle.ManageAccessuses it forIn use in 15 rooms: …and forThis room only:, passing the room ids the grant rows already printed so nothing is listed twice in one card. A short list still prints whole names (In use in 1 room: Face-to-face · A2, B2 · 856467), and a grant with no rooms renders no hint (no+0 more). The row structurePeople with access(:2949-2969) is untouched.plugins/social/test/social.test.js(+96): three tests — the 15-room fixture (≤80characters, three names,+12 more, 15-line tooltip), dedupe plus the no-rooms and single-room cases, and one render-level test that walks the actualManageAccesstree and asserts one hint, the same numbers, and noThis room only:repeat.docs/subsystems/social.md(+1 sentence: the arch-docs rule for an owned plugin path) andchangelog.d/955-access-rooms-hint.fixed.md.Client copy and layout only:
social/accessalready returnsgrant.roomsandview.rooms, so no host, protocol or bundle change (node core/scripts/build-client.mjs --checkexits 0; the plugin client is not part ofcore/client.js).What I ran
On
7e64641b(this tip),plugins/socialfull suite: 405 pass / 0 fail (10.1 s).node .github/scripts/changelog.mjs check: 56 fragments well formed;node core/scripts/check-arch-docs.mjscannot diff here (no git), left to CI — which is exactly what caught it on the first tip.oxlint plugins/social/client.js plugins/social/test/social.test.js: 9 warnings / 0 errors, the same 9 the pristine file has.node core/scripts/build-client.mjs --check: exit 0.Red without the source change
client.js+ these three tests → 0 pass / 3 fail (#955: the access hint names three rooms…,…no room is named twice…,…the rendered access row keeps one short line…).roomHint('only', rooms)without the ids already printed) → the render test alone goes red:#955: the rendered access row keeps one short line and the repeat is gone, 2 pass / 1 fail. Restored, 3/3 again.Not run
hthe other client tests use, and the probe that found the defect measured the real page. If a real-UI pass is wanted,SelfTesthas the harness running on 3096/3097.scripts/lint-plugins.mjscannot findoxlintin this box (npm run harnessis not installed), so the lint above was run with the oxlint binary directly.Risk
T1: one hint's wording and length, plus a tooltip. Nothing that parses the string (the room list is display-only), no host or protocol change, no change to
People with accessrows, revoke or auto-send. The only behaviour that changes shape is how many room names are printed before+N more, and the full list stays one hover away.