Repository navigation
Approve held replies in the open chat; compact Friends' Bots panels; Add friend moved into the + menu - #116
Conversation
Approving a Bot Social hold required leaving the conversation for a bloated sidebar card. The in-chat dock now shows the draft with Approve / Reject for the owner (Waiting for the owner's approval for others), Approve all when several, and a gold wait badge on the chat row. Friends' Bots is a one-line jump list; Auto-send is one compact tooltip toggle. Face-to-face rooms are one row each, with closed/left under Past rooms. Fixes ThinkFlowLab#114 Fixes ThinkFlowLab#115 Co-authored-by: Danyang Chen <birfychen@gmail.com>
The section header + Add control is gone. Add friend and Friend requests are flybot.new-chat.action rows next to Face-to-face group; they still open the same join / Accept / Decline panel in Friends' Bots. The header is title, count, and the approvals chip. Fixes ThinkFlowLab#115 Co-authored-by: Danyang Chen <birfychen@gmail.com>
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: 906205b230
ℹ️ 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".
| from: approval.senderName, | ||
| to, | ||
| toName: approval.targetName || to, | ||
| text: approval.request?.text || approval.reason, |
There was a problem hiding this comment.
Show attached files in the in-chat approval card
Whenever a Bot-originated local hold contains attachments, this projection drops approval.request.attachments, yet the resulting in-chat card still exposes Approve. The social send policy deliberately holds Bot attachments so the owner can inspect them before they leave, and the global approval card shows their names and sizes; approving through this new path can therefore release files without showing what is being sent. Carry safe attachment metadata into localHoldView and render it before allowing the decision.
Useful? React with 👍 / 👎.
| if (item.source === 'local') await call('decide', { id: item.id, decision }) | ||
| else await call('social/decide-approval', { approvalId: item.id, decision }) | ||
| const status = decision === 'reject' || decision === 'rejected' ? 'rejected' : 'approved' |
There was a problem hiding this comment.
Honor failed outcomes from local approval decisions
When a local approval's downstream dispatch fails (for example, Bot Social is unreachable), flybot/decide resolves with the approval in failed state rather than throwing, but this code ignores that result and hard-codes the item as approved, falsely indicating that the send succeeded. The next poll also includes failed records while localHoldView drops their status, so they return as Approve/Reject cards even though core/src/host/hooks.js permits only retry for a failed approval. Preserve the returned status and present a Retry action for failed sends.
Useful? React with 👍 / 👎.
| rememberPastFace(viewHostedFace(hosted, { faceRoomId: serverId, localRoomId: meta?.localRoomId, status: 'closed' }) | ||
| || { faceRoomId: serverId, roomId: meta?.localRoomId, name: 'Face-to-face room', status: 'closed', members: [] }) |
There was a problem hiding this comment.
Persist rooms moved into the Past rooms list
When Bot Social stops returning the only tracked face room, these lines capture its past-room snapshot and then remove it from settings.faceRooms, but the save guard at line 1460 compares the listed count with the already-pruned map (0 === 0) and does not save. On restart the settings file still treats the room as live; because the core room was already deleted, polling can only reconstruct the generic fallback, losing the captured room name and members. Save settings whenever this loop archives a room.
Useful? React with 👍 / 👎.
| h('span', { className: 'fs-chev', 'aria-hidden': true, 'data-closed': pastOpen ? undefined : true }, '▾'), | ||
| 'Past rooms', | ||
| h('span', { className: 'fs-count' }, String(past.length))), | ||
| pastOpen ? past.map(card) : null) : null) |
There was a problem hiding this comment.
Suppress Leave on past room rows
For every closed or left item expanded under Past rooms, past.map(card) reuses the live FaceRoomCard, including its Leave button. These records are created only after the live settings.faceRooms entry is deleted and the server no longer lists the room, so clicking Leave calls social/face-leave again with a stale room id and either errors or no-ops while the row remains. Render past entries as history rows without the live Leave action.
Useful? React with 👍 / 👎.
Why
Approving a Bot Social hold meant leaving the conversation for a bloated sidebar card, and the Friends' Bots panel (approvals, Auto-send, Face-to-face rooms, "+ Add") had grown heavy. Creation actions belong in the single top-level "+" menu.
What
Fixes #114
Fixes #115
Verification
ARCH_DOCS_BASE=upstream/main npm run verifyexit 0 at 906205b; patches generate/check and changelog check pass.