Skip to content

Face rooms: the title keeps its number, honest Left/Closed, and the home that stayed leaves too - #340

Merged
Birfy merged 3 commits into
ThinkFlowLab:mainfrom
Birfy:fix/304-face-titles-status
Oct 18, 2026
Merged

Birfy merged 3 commits into
ThinkFlowLab:mainfrom
Birfy:fix/304-face-titles-status

Conversation

@Birfy

@Birfy Birfy commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator

Part of #304 (items 1, 2, 3, 6, 7; items 4 and 5 stay on the issue).

  • Title keeps the number (item 1): the plugin passes joinCode with every upsertFace (poll, leave, Open), and core upsertFaceRoom keeps it on room.face.joinCode, so the auto title stays Face-to-face · Alice, Bob · 482913 instead of falling back to a date.
  • Past rooms use the same title (item 2): a stored auto title is shown as is; when the row has members the people are rebuilt from them and the stored number (or stored time) is kept. With neither, the time is the creation time (deadline − 10 min), never the joining deadline.
  • Honest status (item 3): when every other home's Bots leave an open room, this home marks it Closed (it did not leave) and then leaves on Bot Social itself (leaveFaceRoom({ status: 'closed' })), so it stops polling and its room-only identity is released (social.md invariant 4). The leaver keeps Left: rememberPastFace no longer turns a left row into closed when a later poll finds the room gone.
  • Read-only past details (item 6): a left/closed room's overview shows the chip only, no Auto-send and no Leave.
  • End line (item 7): the one who left reads You left this room.; the others read <Name> left the room. This room is closed.

Behaviour change to note: the #182 tests pinned the staying home's status as left; they now expect closed, plus the server-side leave.

Not in this PR: item 4 (closed tab title, #250 regression) and item 5 (sidebar row layout / immediate move to Past rooms).

Ran at tip: TZ=UTC ARCH_DOCS_BASE=upstream/main npm run verify (core 868/868, social 222/222, tree, timeline and other suites pass; build-client --check, ds-bot-patches check, arch-docs ok). The new core test fails on main. Not run: smoke and mock bench (touches core/src/host/room-membership.js; no DSH checkout on this box), two real homes.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T12:20:32.136779Z d5b61a9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d5b61a9406

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +2402 to +2404
if (past?.peersGone && settings.faceRooms[snapshot.roomId]) {
await leaveFaceRoom({ faceRoomId: snapshot.roomId, status: 'closed' })
.catch(error => warn('face-room leave after the last peer left failed', error))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Retry automatic leave after transient failures

If Bot Social's /leave request times out or returns a transient error after the last peer disappears, this catch turns the failure into a successful poll after applyFaceSnapshot has already stored the hosted room as closed. settings.faceRooms remains populated, but every later poll takes faceSnapshotPast's held-closed branch and never produces peersGone again, so /leave is never retried; the ended room keeps polling and its room-only identity/seat is not released. Preserve a pending-leave marker or retry this cleanup on subsequent polls.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 001b6b1: a room held closed here while Bot Social still reports it open is treated as peers-gone again, so the next poll retries the leave (test: '#304: a failed automatic leave is tried again on the next poll').

@Birfy
Birfy added this pull request to the merge queue Oct 18, 2026
Merged via the queue into ThinkFlowLab:main with commit 42eff4f Oct 18, 2026
8 checks passed
@Birfy
Birfy deleted the fix/304-face-titles-status branch October 18, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant