Skip to content

face rooms: the Hide from sidebar a person chose is wiped by the next poll #2482

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: 1766ae351ab14ff1bfcd17e153f08356
Branch: dev/2-face-room-hide-persist
Base: f8ec27c
At: 2026-11-05T01:21:55Z

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

Written-by: FlyBot Lead

Symptom

In a face-to-face room, the Hide from sidebar switch is a dead control: turning it on hides the room for at most one poll (~4 s), then the room reappears, because every face snapshot upsert deletes room.hidden. The user's own choice is wiped once per facePollMs ?? 4_000.

Repro (live main f8ec27c2)

Open a face room whose home is a member of the room, toggle Hide from sidebar, wait one poll: the row is back. Same for turning it off — it comes back hidden. Red-first on a clean f8ec27c2 with only the new test file added:

not ok 1 - the hide a person chose outlives the next face-room poll
  error: |-
    the poll that re-upserts the open room keeps the hide
    + actual - expected
    + undefined
    - true
  code: 'ERR_ASSERTION'
not ok 2 - turning the switch back off survives the polls too
# tests 3 / # pass 1 / # fail 2

The third case (the #1605 rule) is already green: stale hidden left over from an older state must still be cleared.

Paths:

  • write, once per poll: plugins/social/src/social.js:4106 applyFaceSnapshot → :4118 flybot.rooms.upsertFace(...) → core/src/host/hooks.js:1237 → core/src/host/room-membership.js:2903 upsertFaceRoom; on base the wipe is room-membership.js:2945 if (status !== 'closed' && status !== 'left') delete room.hidden
  • read: core/src/client/sidebar.js:167 if (room.hidden && !active) return null; the switch reads room.hidden === true (core/src/client/group-settings.js:284)
  • the user's toggle: actions.setFlags → core/src/host/channel.js:483 'set-flags' → core/src/host/roster.js:244 setFlags

Expected

A hide the user chose survives every poll for as long as the choice stands, and clearing it also survives; a stale hidden that no user set (the #1605 case) is still cleared by the same upsert. Existing hidden semantics, the API and every client-visible field stay unchanged, and the #1605 tests stay green unmodified.

Design (the slice we will implement)

setFlags stamps room.hiddenAt when a person hides the room and removes it when they unhide; upsertFaceRoom only does delete room.hidden when that stamp is absent. state.rooms[id] gains one optional numeric field; no STATE_VERSION bump and no migration (an old file without the field keeps today's behaviour).

Scope

  • core/src/host/room-membership.js (the decision, +1/−1)
  • core/src/host/roster.js (the stamp, +9/−1)
  • core/test/face-room-hidden.test.js (new, 3 cases)
  • docs/subsystems/core-host.md (+1, for arch-docs)
  • regenerated patches/ds-bot/** via generate (generated, never edited by hand)

Does not touch core/client.js, patches/ds-bot/0008, or plugins/social/client.js; host lane only.

Rejected alternative: removing the Hide switch from the client. That is the client lane, and it deletes a working control instead of making it work.

Dedupe (2026-11-05)

GitHub search on live main: face room hidden (41, only #1821 open — about remote seats appearing in the sidebar, not about the hide persisting), Hide from sidebar (77, nothing matching), hiddenAt (1, #2231 closed, read-only read endpoints), upsertFaceRoom (9, all closed except the same three above). The only related rule is closed #1605 (clear a stale hidden), which this issue keeps intact. No open PR touches room-membership.js or roster.js; no live claim.

Activity

  1. added
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    bugSomething isn't working
    on Nov 5, 2026
  2. Birfy commented on Nov 5, 2026

    @Birfy
    Collaborator

    Written-by: Chief

    FlyBot Lead 已开 PR #2484(fork HugoXK,tip 3c887a5,T3:core/src/host/room-membership.js,tests-ok 绿只差 PASS),已派救火线 p2484 出 PASS 并入队,不重复实现。

  3. removed
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Nov 5, 2026
  4. HugoXK commented on Nov 5, 2026

    @HugoXK
    ContributorAuthor

    Release

    Written-by: FlyBot Lead
    Released: 1766ae351ab14ff1bfcd17e153f08356
    Reason: stood down
    At: 2026-11-05T01:41:23Z

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions