Repository navigation
Name a group chat in the + pane, and refuse a taken name (#3114) - #3199
Merged
Merged
Conversation
The sidebar's New group chat flow had no name field while Settings did, and a taken name only reached the host, which answered in English. The pane now takes an optional Group name (blank sends no key, so the host names the room after its members), refuses a name another room already has (trim + lower case, the host's own comparison) by disabling Create with a Chinese note, and prints a host refusal through hostText. Part of #3114 Fixes #3196
Birfy
force-pushed
the
dev/3114-group-name
branch
from
November 19, 2026 01:27
28070fd to
4b1c37b
Compare
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.
Written-by: Dev
Fixes #3196
Part of #3114
Owner: Dev
Reviewer: Reviewer
Tier: T1
Checkpoint
{ "pr": 3199, "claim": "Dev", "issue": 3196, "summary": "The + pane's New group chat flow takes an optional group name and sends it with create-room; a blank name sends no key, so the host names the room after its members. A name another group chat already has is matched by trim + lower case, disables Create group chat and draws one bt-danger note naming the room. A host refusal the pane still receives goes through hostText, so the known sentence reads in Chinese. The host files are untouched.", "files": [ "core/src/client/new-chat.js", "core/src/client/i18n.js", "core/src/client/styles.js", "core/test/group-create-readonly.test.js", "docs/subsystems/core-client.md", "changelog.d/3114-group-name.added.md" ], "checks": { "ran": "TZ=UTC TMPDIR=/data/flybot-tmp npm run verify", "result": "green", "at": "4b1c37b0eac1bc1990c89fd50cdf2398714911f3" }, "next": "none — ready for review" }What changed
The sidebar's + → New group chat flow takes an optional Group name and refuses a name another group chat already has, before
create-roomis sent. Settings → Group chats already had a name field; this pane did not.core/src/client/new-chat.js: agroupNamestate,finalGroupName = groupName.trim(), and agroupNameClashthat comparesroster.roomsnames with trim + lower case — the host's own comparison inroster.findRooms— so Create group chat is disabled while it matches, with onebt-note bt-dangerline naming the room that holds the name.namekey at all, so the host keeps naming the room after its members.hostText, so a known sentence reads in Chinese; the one new key isA group chat named {name} already exists.core/src/client/styles.js: three lines —.bt-nc-name, its input, and.bt-nc-name+.bt-drop{top:82px}so the recipient list opens under the name row instead of over it;core/src/client/i18n.js: the one new key;docs/subsystems/core-client.mdand one changelog fragment.Nothing in
core/src/host/changed:create-roomalready takesname, androster.createRoomalready refuses a duplicate and cuts atROOM_NAME_MAX.Verification at the tip
Tip SHA:
4b1c37b0eac1bc1990c89fd50cdf2398714911f3Ran:
TZ=UTC TMPDIR=/data/flybot-tmp npm run verify→ exit 0 (core suite 3345 tests / 3344 pass / 0 fail; every plugin suite 0 fail).Ran:
cd core && TZ=UTC node --test test/group-create-readonly.test.js→ 6/6 after the change. With the implementation reverted and only the tests added, 3 of 6 failed:the pane offers one name field,the pane still offers the field, andCreate is disabled for a taken name(false !== true).Ran:
node core/scripts/build-client.mjs --check→ exit 0 on the committedcore/client.js.Ran:
node scripts/ds-bot-patches.mjs check→ok 10 patches apply cleanly in orderandcore/ equals ds-bot/ + patches/ds-bot/;canonical→generate is a no-op.Ran:
node .github/scripts/check-mojibake.mjs --check→mojibake: ok — 0 occurrences.Ran:
node .github/scripts/changelog.mjs check→ the fragments are well formed.Ran:
npm --prefix core run arch-docs→arch-docs: OK (11 changed file(s)).Ran: the related suites one by one — new-chat 11, new-chat-menu 2, group-create-readonly 6, i18n 3, i18n-missing-entries 17, readonly-reload-lines 7, composer-send-readonly 7, client-bundle 2, settings-readonly-pages 15, create-bot-readonly 3, details-group-settings-readonly 3 = 76/76.
Not run: the smoke test — nothing in
index.jsorcore/src/host/changed.Not run: the Settings → Group chats duplicate-name path (
settings.jsrun) still prints the host's English sentence; that is known, recorded in #3196, and a separate change.Not run: no visual check of the narrow window's To: row in a real browser.