Repository navigation
host: an unnamed group's title follows its seats - #1999
Merged
Birfy merged 1 commit intoNov 1, 2026
Merged
Conversation
An unnamed room's name is the list of the people in it, but only a settings save and a Bot rename recomputed it: a guest invited or removed a seat while the room name and its Session title stayed on the old set of people, and a group created with a guest was titled by the narrow formula and that name never reached the Session. Every seat change now settles the name through the one wide formula before the save, and createRoom retitles its Session once the participants are applied. A chosen name, an inbound mirror and a face-to-face room keep their title.
HugoXK
force-pushed
the
dev/3-p317-p319-unnamed-title-follows-seats
branch
from
November 1, 2026 06:45
21205cc to
575bbf8
Compare
Collaborator
|
Verdict: PASS at 575bbf8 Ran at this tip: Review points:
|
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.
Fixes #1995
Owner: Dev-3
Written-by: Dev-3
Reviewer: Reviewer
Claim-Id: 0607b85d322f4afe8b7c25feed09e93d
Tip: 575bbf8
Base: eace70d
Tree: 855b18f8669c0a2805a1d20ac9c6147b3f1fb171
What changed
An unnamed group's name is the list of people in it (
autoRoomName(room.members, room)), but only twopaths ever recomputed it: a settings save and
followMemberNamesafter a Bot rename or removal. A seatcould change while the name, and the group's Session title, stayed on the old set of people.
A.
core/src/host/room-membership.js— newsettleRoomName(room): it returns untouched for a roomwith a chosen name (
room.named), a mirror of another home's room (origin === 'inbound-share') and aface-to-face room (
isFaceRoom(room)); otherwise it recomputes through that one wide formula and onlywrites
room.nameand callsrt.retitleRoom(room)when the name actually moved. It is called beforeawait rt.save()on the five paths that change seats:addRoomParticipant(invite),removeRoomParticipant(remove), a room link's ticket seating (#923), a seat's own remote leave, andthe grant eviction (
evictUnshared). The othersyncMemberslanding sites were each checked: the onesthat change
participantsgo through these five, andcreateRoomis B.B.
core/src/host/roster.jscreateRoom— a Session has to exist before its seats are known, so itis opened under
autoRoomName(members)(narrow:Youfor the owner, no remote guest). The participantsare applied right after and the wide name assigned to
state.rooms[id].name, but the Session was nevertold. Now, when that assignment differs from the title the Session was opened with, it calls
rt.retitleRoom. Without guests the two names are equal, so the existing single rename stands.No name moves when nothing moved: a
named: trueroom, an inbound mirror, a face-to-face room, and aseat change that leaves the computed name alone send no title.
Existing tests whose expectation changed
core/test/remote-room.test.js:3289"a rename that leaves the computed name alone sends nothing" —its subject is that renaming a Bot outside the group neither moves the name nor sends a room-share
envelope. It invited a guest first and then compared
room.namewith the literal'Alice, Chief A, Chief B'; that literal only held because the invite left the title behind, so theassertion encoded the defect. It now captures
before = room.nameand asserts the name did not move,which keeps the subject exact without depending on what the invite path does.
core/test/remote-room.test.js:3318"a restart migrates an unnamed room title ... (host: a restart renames an unnamed group with the narrow formula (owner becomesYou, remote guests drop out) and writes it back #1976)" — itssubject is the boot migration. It produced a stale stored name through a join and asserted "a join
does not recompute the title", which is that same defect and would now fail for this fix's own reason.
It now writes the stale name into the file directly (the file a host before this fix leaves) and keeps
every migration assertion; the join path it used to lean on is covered by the new first case below.
Red first (parent commit
eace70dd, source untouched, final tests only)The issue was filed against
42b638c2.#1991and then#1994moved main while this was in flight;#1991toucheddocs/subsystems/core-host.md, which this branch edits, so the branch was rebased ontothe current main in one commit with no conflicts. The numbers below are from that parent commit with
this branch's final tests applied and
core/src/host/left at the parent's content.Each case drives the real path (
addRoomParticipant,removeRoomParticipant,createRoom) and assertsthe name, the Session title and the number of renames; none goes through a private helper.
ok 102(a named group keeps its name and sends no title) and the two changed existing cases are green on that
commit. With the fix applied and nothing else changed the same file is
103/103.Reverting one half at a time (parent commit, fix applied except the half shown)
roster.js)not ok 101onlyroom-membership.js)not ok 99,not ok 100,not ok 103—101greenso no case passes on the other half's fix.
Verification at the tip
Head
575bbf8e0f09f131221174e3624e8cecff5bcb39— tree855b18f8669c0a2805a1d20ac9c6147b3f1fb171,parent
eace70dd0b59f4b3274da39492b438e3817cd689. Working tree clean, 8 files changed (+325/−8).Ran:
verifyon this tree: core 2393/2393 (the parent commit measures 2388 — the five cases aboveare the only tests added — so this branch is exactly +5), social 541, tree 127, timeline 135, workflow
336,
.github/scripts563, interop 37, live-e2e 24 — 0 failures anywhere. Core lint 73 warnings /0 errors; plugin lint 36 / 9 / 2 / 16 warnings, 0 errors;
arch-docs: OK (8 changed file(s)).Not run (and why):
../deepseek-harnesscheckout orDSH_HARNESS, and this machine has none.The change is two host module paths; nothing in the module list or the prompt path changes shape.
packagejob (pack check, typecheck, actionlint): not part ofnpm run verify.Checkpoint
{ "pr": 1999, "claim": "Dev-3", "issue": 1995, "summary": "An unnamed group's title now follows its seats. Inviting or removing a seat, a room link's ticket seating, a seat's own leave and the grant eviction recompute the name through the one wide formula and retitle the group's Session only when it moved; a group created together with a guest retitles its Session once the participants are applied. A chosen name, an inbound mirror and a face-to-face room keep their title, and a seat change that leaves the name alone sends nothing.", "files": ["core/src/host/room-membership.js", "core/src/host/roster.js", "core/test/remote-room.test.js", "docs/subsystems/core-host.md", "changelog.d/1995-unnamed-title-follows-seats.fixed.md"], "checks": { "ran": "TZ=UTC ARCH_DOCS_BASE=eace70dd npm run verify (exit 0, core 2393/2393)", "result": "green", "at": "575bbf8e0f09f131221174e3624e8cecff5bcb39" }, "next": "none — ready for review at this tip" }