Repository navigation
fix(social): Open on a left room, visible handle, one title time, Accept invite (#192-#195) - #196
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a7e26b24c
ℹ️ 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".
| await flybot.rooms.dropFace?.(meta.localRoomId).catch(() => {}) | ||
| // The room stays as a read-only past room with its transcript (#192): Open from Past rooms | ||
| // finds it already hosted. It is only marked left; the sidebar lists past rooms elsewhere. | ||
| await flybot.rooms.upsertFace?.({ roomId: id, status: 'left' }).catch(() => {}) |
There was a problem hiding this comment.
Enforce read-only status before retaining left rooms
When a user opens a room after Leave and types in its still-visible composer, this upsert only sets face.status; because no members are supplied, all participants remain current. core/src/host/channel.js routes every face room to postRoomMessage without checking that status, so the line is appended and fanned out (fanout errors are swallowed), and an @mention can continue into a Bot round. The advertised read-only past room therefore mutates its transcript and can consume model work after membership was released; close the participants or reject sends for left/closed rooms.
Useful? React with 👍 / 👎.
| members: [...(spec.members ?? []), ...(room?.participants ?? [])], | ||
| code: spec.joinCode || spec.code, | ||
| at: spec.startedAt || room?.face?.startedAt || spec.expiresAt || room?.createdAt, | ||
| at: faceRoomCreatedAt({ createdAt: spec.createdAt, expiresAt: spec.expiresAt || room?.face?.expiresAt, startedAt: spec.startedAt || room?.face?.startedAt }) || room?.createdAt, |
There was a problem hiding this comment.
Persist the authoritative face-room creation time
When Bot Social supplies a valid created_at that is not exactly expires_at - 10m (a case supported by the new test), this expression uses it only for that call: upsertFaceRoom never stores it in room.face. The status-only upsert from leaveFaceRoom then has no createdAt, falls back to the deadline-derived value, and the auto room name is rewritten, so one room changes time as soon as it is left. Persist and reuse the authoritative value on subsequent upserts.
Useful? React with 👍 / 👎.
| const at = faceRoomCreatedAt({ | ||
| createdAt: snapshot.createdAt, | ||
| expiresAt: snapshot.expiresAt || room?.face?.expiresAt, | ||
| startedAt: snapshot.startedAt || room?.face?.startedAt, | ||
| }) || room?.createdAt |
There was a problem hiding this comment.
Apply the creation time to Past-room card titles
When a face room is moved to Past, viewHostedFace does not carry createdAt (and the call does not carry joinCode), while FaceRoomCard's shownFaceTitle deliberately discards the stored auto room.name and formats startedAt || expiresAt. Consequently the visible Past row still shows the start time or joining deadline rather than the value computed here, so the one-time title remains unfixed on that screen. Pass the creation value into the past record and use the shared formatter there.
Useful? React with 👍 / 👎.
Fixes #192, Fixes #193, Fixes #194, Fixes #195.
Not done: shared-Bot avatar colour (owner vs receiver) - commented on Social UI polish round 3: truncation, duplicate Add friend/Accept invite, Manage access depth, wording (#166 follow-up) #173.