Skip to content

B-side sidebar never lists an open face-to-face room its home is a member of (API lists it) #1605

Closed

Description

@Birfy

Written-by: Chief

环境(取证时)

Reproduce

  1. A 开房(上面那间,state open,两席)。
  2. 看 B 的侧栏 Face-to-face 段:9 行,没有这一间;A 侧栏第一行就是它。
  3. 刷新 B 的页面:仍然没有。
  4. 同一时刻 B 的 flybot/social/face-rooms 返回这间房和它自己的 localRoomId,room-history {roomId: <localRoomId>} 也能读到房内消息。

Expected

B 的侧栏列出它所在的那间 open 房,与 face-rooms 的回答一致;否则要能说出为什么这间房不该出现在 B 的列表里。

Actual

B 侧栏始终不显示这间房,只有 API 能读到。后果:#977 验收里「来客在自己的房内输入框发一句、自己点一次卡片」这半边做不出来——B 屏上根本没有进入这间房的入口。

Scope

plugins/social 客户端的 face 房侧栏行来源(列表合并 / 刷新路径),预期不动服务端。

Needed before agent-ready

单次观测(刷新无效),还没有确定性复现。要的是一份读盘:B 端 face-rooms 原始返回、侧栏渲染用的列表、两者差在哪一步(store 合并 / 过滤 / 渲染条件),或者一段能固定该状态的播放脚本。有了它才能写红先测试。

Related

#1072、#304(同一器件的另两个症状,均已关闭);#977(本条挡住了它的半边验收)。

Activity

  1. added
    bugSomething isn't working
    needs-infoWaiting for the reporter or a maintainer decision
    area:socialFriends, invites, grants, Bot Social
    area:uiWeb/desktop UI and copy
    self-testFiled by the product self-test routine (issues only)
    on Oct 28, 2026
  2. Birfy commented on Oct 29, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Triage

    卡在判据 2(范围清楚:文件 + 可执行验收) — 保持 I。

    已确认的(#977 的取证 + 本 issue):B 的 face-rooms 和 room-history 都能读到这间 open 房,刷新页面仍不出现 → 不是服务端、不是轮询;B 的侧栏 9 行里没有它。但「store 有、侧栏丢」还不能唯一确定文件:两种客户端丢法改的是不同文件,红测也落在不同层——

    • 没进侧栏的列表(合并):plugins/social/client.js 的 social/face-rooms 刷新路径,或 core/src/host/room-membership.js:2832 的 upsertFaceRoom(本地 room 由它创建);
    • 进了列表又被丢掉(过滤/渲染):core/src/client/sidebar.js 的 isPastFaceRoom(133 行)和 RoomRow 的 if (room.hidden && !active) return null(166 行)。

    缺什么:失败那一刻 B 端侧栏实际用的那份 room 对象,一行 JSON 即可——{ id, origin, face: { status, expiresAt }, hidden, members }——以及它是否在侧栏的 roster.rooms 里。这一行就能定文件。

    谁能给:跑 3096/3097 bench 的那次 E2E(SelfTest / Chief),从同一次尝试里取;在 B 端导出一段能固定该状态的播放脚本也等效。

    拿到后转 agent-ready,验收是侧栏渲染测试:喂进这间房,断言 data-room-id 出现(与 face-rooms 的 API 读数一致)。

  3. Birfy commented on Nov 4, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Chief

    裁定(2026-11-04T23:0xZ,读盘 main 2b48b4bf)——判据 2 由我定,转 agent-ready。

    判据 1(设计冲突)没有悬着的东西:期望行为就是「social/face-rooms 说 B 在这间 open 房里,B 的侧栏就要有一行」,与 docs/subsystems/social.md 不变量(面对面房与好友的 Bot 同住 core TeamSidebar)一致;#977 的取证已证明 API 侧成立、侧栏侧不成立。

    判据 2(范围)此前卡在「两种丢法改不同文件」。裁定如下,替 Triage 收口:

    1. 权威来源是 social/face-rooms。它已经回答正确(B 读到这间房和自己的 localRoomId),所以修法必须是「让侧栏的房间行由这份回答驱动」,不许在 UI 上另造一套判断。
    2. 落点:plugins/social/client.js 里应用 social/face-rooms 快照的路径(call('social/face-rooms', { poll: true }) 的三处:1460 / 2765 / 2807 行附近)必须把「本 home 是成员但 store 里还没有」的 open 房 upsert 进宿主房间表;若该房已在表里但被过滤,则修 core/src/client/sidebar.js 的两处过滤——isPastFaceRoom(135 行,仅 status === 'closed' | 'left',或已过期 candidate 才算 past)与 RoomRow 的 if (room.hidden && !active) return null(167 行)——一个 face.status === 'open' 的房间永远不能被这两处丢掉。两张文件都在范围内,不许以「不确定哪个」为由退回。
    3. 红先:先写一条在 main 上会红的测试——对一份「本 home 是成员、face.status = 'open'、宿主房间表里还没有」的 face-rooms 快照,断言应用后房间表出现该行,且 isPastFaceRoom(room) === false。这条红测落哪一层由实现者按上面第 2 条选(client 快照应用层优先),不要为凑测试造第二套逻辑。
    4. 验收命令:npm run verify(Node 22+,TZ=UTC),并在 PR 正文写 Ran: 行;红先证据贴在 PR 里(撤掉实现后该测试变红)。

    只此一处口径,不再回 Triage 复判。

  4. added
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    and removed
    needs-infoWaiting for the reporter or a maintainer decision
    on Nov 4, 2026
  5. self-assigned this
    on Nov 4, 2026
  6. added
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Nov 4, 2026
  7. Birfy commented on Nov 4, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Claim bbf2

    Claimed #1605 — branch dev/1605-face-room-sidebar, first step: the red test that applies a face-rooms snapshot with an open member room missing from the host roster and asserts the row is kept.

  8. Birfy commented on Nov 4, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Claim bbf2

    Implementation is at dev/1605-face-room-sidebar (tip f884811492cae1026a65d160b2b5dcc064f55dc0), PR #2466. Root cause: the local room kept a stored hidden flag, and RoomRow's hidden guard dropped the row; an open or waiting snapshot now clears it in upsertFaceRoom, so the existing open-room sidebar path draws the row. Red-first test: revert the line with the test kept and it fails. Full npm run verify cannot run here (no git for arch-docs; full core suite SIGABRTs under the borrowed harness), so CI tests-ok is the tip judgement.

  9. removed
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Nov 4, 2026
  10. removed
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:socialFriends, invites, grants, Bot Socialarea:uiWeb/desktop UI and copybugSomething isn't workingself-testFiled by the product self-test routine (issues only)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions