Skip to content

fix(social): face-room past rooms, preview unwrap, short + menu, approval labels, faster poll (#129-#133) - #134

Merged
Birfy merged 2 commits into
ThinkFlowLab:mainfrom
Birfy:cursor/face-ui-round2-dae8
Oct 16, 2026
Merged

Birfy merged 2 commits into
ThinkFlowLab:mainfrom
Birfy:cursor/face-ui-round2-dae8

Conversation

@Birfy

@Birfy Birfy commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Fixes #129, #130, #131, #132, #133 (UI retest of main e884312 on two instances).

Deferred: Friends' Bots roster timer stays 15s; Bot-to-Bot failure text still uses the detailed failureLine (diagnostics path); smoke test not run (no deepseek-harness checkout). Accept invite opens the same panel as Add friend by design to keep the click path short.

Verified: ARCH_DOCS_BASE=upstream/main npm run verify passes.

cursoragent and others added 2 commits October 16, 2026 11:24
Unwrap stored untrusted-message wraps in room previews and bubbles, resolve
User to the signed-in display name, and show a short friendly line instead of
raw model/API-key errors. The sidebar + menu keeps plugin actions and toasts a
returned string, without listing every Bot (Chief clutter).

Co-authored-by: Danyang Chen <birfychen@gmail.com>
Expired matching and a peer leaving move rooms to Past rooms without a stale
Leave. Titles include people or the code/time. The + menu holds Add friend,
Accept invite, one-click Copy invite link, and Face-to-face group. Auto-send is
the one hold label; the header shows either the Bot count or N to approve.
Inbox and face poll drop to about 4s while a room is live.

Co-authored-by: Danyang Chen <birfychen@gmail.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 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-16T11:33:09.287713Z af5af0d 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.

@Birfy
Birfy added this pull request to the merge queue Oct 16, 2026
Merged via the queue into ThinkFlowLab:main with commit 1ac7104 Oct 16, 2026
6 checks passed

@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: af5af0d181

ℹ️ 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".

const locals = new Set(bringable().map(bot => bot.handle).filter(Boolean))
const previousRemotes = (hosted?.participants ?? []).filter(p => p.leftSeq === undefined && p.remote === true)
const currentRemotes = (snapshot?.members ?? []).filter(member => member.handle && !locals.has(norm(member.handle)))
if (status === 'open' && previousRemotes.length > 0 && currentRemotes.length === 0) return { status: 'left' }

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 Preserve the left state across later face-room polls

When the server keeps an open room listed after its last remote member departs, the first poll returns left, and upsertFace marks the old remote participant left. On the next poll previousRemotes is therefore empty, this branch no longer fires, and applyFaceSnapshot writes the server's open status back, moving the room out of Past rooms and restoring Leave. Make the derived terminal state sticky until the server room disappears.

Useful? React with 👍 / 👎.

if (local) continue
flybot.rooms.applyFaceLine?.(room.id, { ...line, remote: true, authorKind: 'human' })
void flybot.rooms.postNotice?.(room.id, `${line.who}: ${line.text}`)
const who = humanFaceWho(line, ownerDisplayName(snapshot, hosted))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Attribute placeholder human lines to the remote sender

For an incoming human envelope produced by an older or partially upgraded client with who: 'User', renderFaceEvent already carries the sender's sanitized ownerName, but this fallback calls ownerDisplayName, which selects one of this installation's local handles. The peer's line is therefore stored and shown under the recipient's own name; prefer line.ownerName before any local fallback.

Useful? React with 👍 / 👎.

Comment thread plugins/social/client.js
label: 'Copy invite link',
hint: 'Copy a link a friend can paste in Add friend.',
run: async ({ close } = {}) => {
close?.()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Surface errors from the one-click invite action

If either social/status or social/create-invite rejects, such as while the social server is offline, this closes the NewChat overlay before the first await; the wrapper in new-chat.js catches the rejection only with setError on that now-unmounted pane, so the click fails with no visible error or link. Close only after a result, or route failures through the global notification.

Useful? React with 👍 / 👎.


export function faceRoomTitle(snapshot = {}, { code, room } = {}) {
const named = String(snapshot.name || room?.name || '').trim()
if (named && named !== 'Face-to-face room') return named

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Recompute generated room titles after members join

When a user creates a room, the first snapshot normally contains only the local member, so this helper sets a derived name such as Face-to-face · Danyang. Every later poll then returns that generated room.name here before inspecting the snapshot's owners, so when Bob joins the creator never sees Bob in the title and multiple rooms created by the same owner remain indistinguishable. Preserve only genuinely explicit names, or recompute derived titles as membership changes.

Useful? React with 👍 / 👎.

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.

Face-to-face: stale active room cards (peer left / ended) should move to Past rooms automatically

2 participants