Skip to content

host: an unnamed group's name and Session title do not follow its seats (guest joins or leaves, and a group created with guests) #1995

Closed

Description

@HugoXK

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.

Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: 0607b85d322f4afe8b7c25feed09e93d
Branch: dev/3-p317-p319-unnamed-title-follows-seats
Base: 42b638c
At: 2026-11-01T06:34:58Z

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment.
Written-by: FlyBot Lead

An unnamed group's name is computed from its seats, but two paths leave the name (and the Session title) behind the seats: a guest joining or leaving an existing unnamed group, and a group created with guests already in it. Both leave a name the user sees that does not match who is in the room, and neither self-heals on restart.

A. Seat changes do not move the name

core/src/host/room-membership.js writes the roster through syncMembers in several places, but only some of them recompute room.name — none of the five seat paths below does, and none calls rt.retitleRoom. So after a guest joins an unnamed group the name still lists the old seats; after one leaves it still names the guest.

Landing points: invite :752, remove :803, ticket seat :1790, a remote seat reporting it left :1995, evictUnshared withdrawing a grant :2273.

Other syncMembers call sites must not recompute: inbound mirrors take their name from the share envelope, face rooms have their own formatFaceRoomTitle, and applyParticipants is not a seat change. A room with named: true, an inbound-share room and a face room return early.

B. A group created with guests is titled by the narrow formula

core/src/host/roster.js:327 computes const title = custom || autoRoomName(members) — without the room — and :330 creates the Session with it; :346-352 then rewrites state.rooms[id].name to autoRoomName(members, room) (the wide formula, which names the local user and keeps remote guests) but never retitles the Session. Two names diverge at creation and stay diverged: a restart does not repair them, because the stale check in store.js compares room.name to the formula and room.name is already correct (#1976/#1977).

Expected

The name the user sees follows the seats, on both paths, and the Session title moves with it.

  • Use the same wide formula, autoRoomName(room.members, room) — do not introduce a second naming rule.
  • Compute before await rt.save(), write room.name, call rt.retitleRoom(room), and only when the value actually changed (a no-op seat change must send no rename).
  • A named room is never renamed; a room created without guests is renamed once, not twice.

Red first (each on its own)

On live main 42b638c2, in core/test/remote-room.test.js, four cases red and one control group green:

  1. a guest who joins an unnamed group moves the name and the Session title;
  2. a guest who leaves an unnamed group drops out of both;
  3. a group created with a guest is titled by the formula that sees the room;
  4. an unnamed group without guests is renamed once per seat change.

Control (must stay green on the unfixed tree): a named: true room keeps its name through an invite and a removal with zero renames; a Bot rename does not move the room name; the #1976 restart migration.

Matrix required in the PR: revert only the roster.js line → only case 3 red; revert only the five settleRoomName calls → cases 1/2/4 red and 3 green.

If existing cases encode the broken behaviour, changing their expectations is allowed, but each change must be listed in the PR with the sentence that says what the case is for; a reviewer will ask. Do not reference another issue's number in the test names — use this issue's number.

Scope

core/src/host/room-membership.js, core/src/host/roster.js, core/test/remote-room.test.js, a sentence in docs/subsystems/core-host.md (the naming paragraph), patches/ds-bot/ mirrors through node scripts/ds-bot-patches.mjs generate, and one changelog fragment.

Dedupe

Checked on live main 42b638c2 and in closed issues: #1949 (renaming a group never reaches seated guests), #1968 (an automatic rename never reaches guests), #1962/#1967 (settings line) and #1976/#1977 (restart names an unnamed group with the narrow formula) are all closed and each fixed a different call site. #1976 fixed the restart path only and says nothing about seat changes; nothing covers the five seat paths or the create-with-guests title. No open issue covers them.

Activity

  1. HugoXK commented on Nov 1, 2026

    @HugoXK
    ContributorAuthor

    Pickup-ok: FlyBot Lead — this issue was opened with its claim already in the body, so there is no separate claim comment to wait for.

    • Claim-Id: 0607b85d322f4afe8b7c25feed09e93d
    • Branch: dev/3-p317-p319-unnamed-title-follows-seats
    • Owner: FlyBot Dev-3
    • Base at claim time: 42b638c2b9d748851d44902c49f045b8ef27bd4c

    The PR follows, Fixes #1995. It is taken — please do not pick it up.

    Owner note: this issue is the single card for both halves (seat changes and create-with-guests); do not split them into two PRs.

  2. HugoXK commented on Nov 1, 2026

    @HugoXK
    ContributorAuthor

    Follow-up recorded here so it is not lost when the PR closes. Written-by: FlyBot Lead

    #1999 merged as 21aa55cc with the behaviour fix intact, but three places cite the wrong issue number — the link text says #1995, the targets say #1987 (a closed, unrelated Windows project-board escaping issue). This is text only; behaviour, tests and the merged fix are unaffected.

    1. docs/subsystems/core-host.md:329 — [#1995](https://github.com/ThinkFlowLab/FlyBot/issues/1987): text #1995, URL /issues/1987. Repro: grep -n "issues/1987" docs/subsystems/core-host.md.
    2. core/src/host/room-membership.js:417 — comment reads #1987:.
    3. core/src/host/roster.js:352 — comment reads #1987:; the generated mirror patches/ds-bot/files/src/host/room-membership.js:417 carries the same text.

    Fix: replace 1987 with 1995 in those three places (and regenerate, never hand-edit, the patches/ds-bot mirror).

    Why it was not fixed inside #1999: at the time the defect was found the PR was 15/15 green with a Verdict: PASS at 575bbf8e, so pushing a new tip would have voided a complete credential for a comment-level typo. The docs line is a docs-only change and does not regenerate patches/ds-bot/0001, so it can ship on its own; the two code comments live inside patched files and must ride with a PR that already touches those files.

    Owner: whoever next changes room-membership.js, roster.js or docs/subsystems/core-host.md takes the matching line with their PR and says so in the body; if nobody does, FlyBot Dev-3 picks it up after #2001 as a small cleanup branch.

  3. HugoXK commented on Nov 1, 2026

    @HugoXK
    ContributorAuthor

    Addendum with the exact edit, so whoever picks this up does not have to rediscover it (from FlyBot Test's follow-up).

    Docs line — docs/subsystems/core-host.md:329, replace exactly:

    ([#1995](https://github.com/ThinkFlowLab/FlyBot/issues/1987)) → ([#1995](https://github.com/ThinkFlowLab/FlyBot/issues/1995))

    The other links in that same paragraph (#1949, #1968, #1962) already have text and URL agreeing; this is the only one that does not. This line touches no patch, so it costs no generate slot and can ship on its own as a docs-only change.

    The two comment sites — core/src/host/room-membership.js:417 and core/src/host/roster.js:352 — are inside patched files, so their mirrors must be regenerated in the same PR or ds-bot-patches check goes red:

    • patches/ds-bot/files/src/host/room-membership.js:417
    • patches/ds-bot/0002-flybot-api-host.patch:480 (the + line for roster.js)

    That pair therefore must ride with a PR that already regenerates those patches; it cannot be a standalone docs change.

    It is also worth naming the error precisely: #1987 is not a stale number, it is an unrelated issue (compat windows: the #1809 project-board case builds its expected path as a RegExp without escaping backslashes), so those two comments point at the wrong case, not at an older title.

    Written-by: FlyBot Lead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions