Skip to content

feat(social): friends' Bots and rooms in the main sidebar list, no separate section - #145

Merged
Birfy merged 4 commits into
ThinkFlowLab:mainfrom
Birfy:cursor/sidebar-unified-friends-dae8
Oct 16, 2026
Merged

Birfy merged 4 commits into
ThinkFlowLab:mainfrom
Birfy:cursor/sidebar-unified-friends-dae8

Conversation

@Birfy

@Birfy Birfy commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Owner request (usability and simplicity): no separate "Friends' Bots" section.

Friends' Bots and live face rooms now sit in the same sidebar list as your own, with one small marker (globe / people), own first, then by recency. Ended face rooms stay under Past rooms. "Copy my handle" moved to the + menu. Per-friend Auto-send and "Remove this Bot" live in that friend's Bot settings; face-room Auto-send stays on the open room. The separate header, per-friend groups and duplicate checkboxes are gone.

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

@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-16T13:35:14.650226Z ec132c8 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: ec132c881e

ℹ️ 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 thread plugins/social/client.js Outdated
Comment on lines +1200 to +1203
void Promise.all((actions.roster?.rooms ?? roster?.rooms ?? []).flatMap(room => {
const hit = (room.participants ?? []).find(p => p.remote && p.handle === handle && p.leftSeq === undefined)
return hit ? [actions.updateRoom(room.id, { removeParticipants: [{ kind: 'bot', id: hit.handle || hit.id, remote: true }] })] : []
})).catch(e => setError(errorText(e)))

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 Do not remove a hidden Bot from rooms twice

When the friend’s Bot is a live participant in any room, social/hide-remote already invokes afterHideRemote/leaveRoomsWith before it returns (plugins/social/src/social.js), so this loop sends a second removal against the stale browser roster. The host-started removal wins the room lock and the duplicate update-room then rejects with “That participant is not in the room”; the catch consequently shows an error after a successful Remove. Rely on the endpoint’s background leave (or exclude the leftRooms it reports) instead of issuing the same mutations again.

Useful? React with 👍 / 👎.

...roster.rooms.map(room => ({ kind: 'room', item: room, at: stamps[room.id] ?? room.createdAt })),
// Own Bots, friends' Bots, groups and face rooms share one list. A remote chat
// still uses BotRow's globe; gone / hidden / home-level remotes stay out.
...roster.bots.filter(bot => bot.id !== roster.mainBotId && isListedRemoteChat(bot)).map(bot => ({ kind: 'bot', item: bot, at: stamps[currentPart(bot)] ?? bot.createdAt })),

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 Keep remote Bots out of the local Bot tree

When @flybot/tree is enabled, including remote chats as kind: 'bot' makes the code below pass them to botTree, and the complete tree is rendered ahead of every room and Agent entry. A friend’s Bot therefore appears under Main (and disappears when Main is collapsed) before the user’s own group chats, bypassing the new own-before-foreign comparator and the advertised unified ordering. Keep only local Bots in the tree and render remote chat entries in the flat ordered tail.

Useful? React with 👍 / 👎.

@Birfy
Birfy added this pull request to the merge queue Oct 16, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 16, 2026
@Birfy
Birfy added this pull request to the merge queue Oct 16, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 16, 2026
@cursor
cursor Bot force-pushed the cursor/sidebar-unified-friends-dae8 branch from ec132c8 to 9459777 Compare October 16, 2026 14:06
cursoragent and others added 2 commits October 16, 2026 14:18
The separate Friends' Bots section duplicated the team list. Own and
friends' chats now share one list (globe / people marks), Past rooms
stay folded, Copy my handle lives on +, and Auto-send / Remove live on
that friend's Bot settings.

Co-authored-by: Danyang Chen <birfychen@gmail.com>
Friends' Bots is no longer a sidebar section, so the sent receipt must
not name it. A @ of a friend who is not in the room still 1:1-sends
(ThinkFlowLab#80/ThinkFlowLab#81); ThinkFlowLab#144 only skips when they are already a participant. The
hold receipt waits for the followup instead of 30 ms, because persist
races remote-chat open after publish.

Co-authored-by: Danyang Chen <birfychen@gmail.com>
@cursor
cursor Bot force-pushed the cursor/sidebar-unified-friends-dae8 branch from 9459777 to f905c98 Compare October 16, 2026 14:21
@Birfy
Birfy added this pull request to the merge queue Oct 16, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 16, 2026
Resolve docs/subsystems/social.md (keep main's compact card / Always approve
and unique face-room titles with this PR's unified list) and regenerate
patches/ds-bot from core/.
Codex review on ThinkFlowLab#145:
- With @flybot/tree on, remote chats were passed to botTree and drawn under
  Main, ahead of rooms and hidden when Main collapsed. Only own Bots are tree
  nodes now; a friend's Bot stays in the ordered flat list.
- Remove this Bot issued updateRoom removals after social/hide-remote, which
  already leaves every room holding that Bot. The duplicate lost the room lock
  and showed "not in the room" after a good Remove. The client now relies on
  the endpoint.
@Birfy
Birfy added this pull request to the merge queue Oct 16, 2026
Merged via the queue into ThinkFlowLab:main with commit b77d68d Oct 16, 2026
6 checks passed
@Birfy
Birfy deleted the cursor/sidebar-unified-friends-dae8 branch October 16, 2026 23:36
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.

2 participants