Repository navigation
Name a friend's Bot one way and approval cards by the receiving person - #502
Merged
Merged
Conversation
A friend's Bot read four ways in one DM (ThinkFlowLab#498): the sidebar row was 'Chief' plus a muted owner, the header 'Chief (SelfB1233)', the @ menu fell back to the handle for a friend's chat, and the held reply card read 'Chief → Chief (SelfB1233)' after a reload but 'Chief → SelfB1233' before it. friendBotTitle / friendBotOwner in shared/remote-label.js are now the one formatter for a friend's chat: the sidebar row, header, tab, composer placeholder and @ menu call it, and the social plugin reads it from __flybot__.names. Approval cards (held reply, overlay, social dock) name the person who gets the message: the stored recipient first, else the friend chat's owner, so the card is the same live and after a reload. Face rooms are unchanged (ThinkFlowLab#457).
Collaborator
Author
|
Self-review: PASS
|
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Oct 20, 2026
…owLab#481/ThinkFlowLab#501/ThinkFlowLab#505) Regenerated client bundle patch after merge; auto-merged social sources keep ThinkFlowLab#498 friend Bot name formatter with ThinkFlowLab#501/ThinkFlowLab#505.
Collaborator
Author
|
Self-review: PASS
|
Resolve generated ds-bot client-bundle patch via regenerate from merged core.
Collaborator
Author
|
Self-review: PASS
|
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Oct 20, 2026
# Conflicts: # patches/ds-bot/0008-client-bundle.patch
Collaborator
Author
|
Self-review: PASS
|
# Conflicts: # core/src/client/header.js # patches/ds-bot/0008-client-bundle.patch # patches/ds-bot/0012-room-membership.patch
Collaborator
Author
|
Self-review (review-pr, Birfy reviewer agent, 2026-10-20 20:10 Asia/Shanghai): PASS Tip SHA: ae721f7
Findings: no actionable findings. Not merge authority: T3 still needs the maintainer's approval (owner queues it). |
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Oct 20, 2026
# Conflicts: # patches/ds-bot/0008-client-bundle.patch
Collaborator
Author
|
Self-review (review-pr, Birfy reviewer agent, 2026-10-20 20:26 Asia/Shanghai): PASS Tip SHA: e819c90
Findings: no actionable findings. This replaces the PASS at ae721f7, which is void because the tip moved. Not merge authority: T3 still needs the maintainer's approval (owner queues it). #541 (#526) is stacked on this branch. |
This was referenced Oct 20, 2026
Birfy
added a commit
to Birfy/FlyBot
that referenced
this pull request
Oct 20, 2026
…owLab#544) Fixes ThinkFlowLab#540 Tool approval cards had only Reject / Allow once, and DSH's approval outcomes are one-shot (`ApprovalOutcome` = `allowed-once | rejected | cancelled | unavailable`, `ApprovalPolicy` = `ask | never` in `@deepseek-ai/dsh-user-approval` 0.2.0-rc.2), so a Bot asked for the same sandbox escalation every time. Owner decision 2026-10-20 20:11 / 20:12 (Asia/Shanghai): permanent approval, per Bot and per group. **What changes** - Cards (`core/src/client/member-status.js` `ApprovalCard`, `core/src/client/inbox.js` `InboxCard`) add **Always allow for this Bot** (`此 Bot 始终允许`) and, for an ask from a group, **Always allow for this group** (`本群始终允许`). Never on a friend's Bot. - Host (`core/src/host/approvals.js`): permission kind = tool + sandbox mode parsed from DSH's reason (`bash:escalate:danger-full-access`). `approval-answer` takes `always-bot` / `always-room`; the grant is kept on the Bot / room record (`standingApprovals`, in `state.json`), and this ask plus other waiting asks it covers are answered `allowed-once`. FlyBot's `approval/request` listener (documented waterfall, no DSH patch) answers later matching asks itself, **only for a turn the owner started** (`turn-origin.js` `settled() === 'owner'`; friends' messages, other members' lines, rooms with other people and verdict-less turns still ask). A Bot grant covers the Bot's Sessions; a group grant covers the owner's Bots working in that group (not their own chats). DSH's audit pair still logs each ask. - Revoke: **Always allowed** card with Remove in Bot settings and Group settings (`core/src/client/standing-approvals.js`, endpoint `standing-approval-remove`). - Authz (`core/src/host/authz.js`): an `always-*` answer needs the Bot's owner (owning the room is enough only for Allow once); removing a group grant needs the member who gave it, and removes only theirs. - Docs: core-host "Standing tool approvals (ThinkFlowLab#540)", core-client row. Changelog fragment `540-always-allow-approval.added.md`. Risk tier: **T3** (risk-gate: `core/src/host/approvals.js`, `authz.js`, `channel.js`). Waits for the maintainer's approval; not merged by the agent. **Verification** (tip `f7e6a7e789005365befd6bb44d55f88d5871607a` = b6236f8 merged with main at cf61952, Node 24.21) - `ARCH_DOCS_BASE=upstream/main TZ=UTC npm run verify`: exit 0; core 1122/1122, plugins 313, 83, 93, 93, 37, 16 all pass; arch-docs OK (31 files); no new lint warnings. - Red at base (worktree at b6e89d2 + only the test files copied): 7 new/changed tests fail; green at tip. - Smoke (`CONTEXT_WINDOW=100000 CHECK_RATIO=0.45 dev/bench.sh smoke 3196 8896 reset && node dev/smoke.mjs smoke 3196`, DSH 0.2.0-rc.2): 42/42 at `b6236f8`; the merge to `f7e6a7e` changes only client files from ThinkFlowLab#502, `core/src/host` and `core/index.js` are identical. - An earlier verify run hit `tasks.test.js` "an untagged hold stamps the latest working task…" (also 1 of 6 isolated runs at this branch); that test and its code are untouched here: a pre-existing flake. **Not run** - Smoke at the merge tip `f7e6a7e` (host unchanged since the smoked tip). - A live run in the owner's FlyBot with a real `bash` escalation (covered by unit tests with DSH's `escalate sandbox to <mode>: …` reason format). --------- Co-authored-by: Birfy <15378933+Birfy@users.noreply.github.com>
HugoXK
pushed a commit
to HugoXK/FlyBot
that referenced
this pull request
Oct 21, 2026
…owLab#541) Fixes ThinkFlowLab#526 ThinkFlowLab#502 (the shared friend's Bot formatter this builds on) is on main (cf61952); this PR now carries only the ThinkFlowLab#526 change. In a group chat or face-to-face room a friend's Bot read `Reviewer · FlyBot 682b8a43 (flybot682b8a43)`. Two things caused it. Bot Social's member label (`<Bot> · <owner>`, `face-rooms.ts` `memberLabel`) ended up as the Bot's name, so `remoteBotTitle` then added the owner a second time from the handle (`core/src/client/cells.js` `remoteSpeaker` fallback, from the `senderName` that `plugins/social/src/face-rooms.js` `trustedFaceWho` sets). And an owner who never set a name shows as the made-up `FlyBot <install id>`. Owner decision (2026-10-20, option a): use the ThinkFlowLab#498 person-first name, Bot name plus owner username: `Reviewer (flybot682b8a43)`. - `core/src/shared/remote-label.js`: `remoteBotName` removes a trailing ` · <owner>` only when it matches that Bot's owner. `ownerNameOf` skips an id-derived owner (`isAutoOwnerName`: `FlyBot` + hex id that contains a digit) and uses the username from the home handle instead. If no handle is known, the made-up name stays. `seatOwnerName` applies the same rule to my own seat (`face-seats.js`, `at-menu.js`). - `plugins/social/src/face-rooms.js`: `faceOwnerName` applies the same rule to seats (`viewFaceMember.ownerName`), join, leave and room-lead lines, and a person's typed line. - The full handle stays on hover. The remote Bot names in `FacePersonRow` and the group Members rows (`group-settings.js`, `details-drawer.js`) now get `title=<handle>`, as bubble headers already had. - Real names are unchanged: `Coder (Bob)`, `Ops · Night (Bob)`, `FlyBot`, `FlyBot2`. Risk tier: T3 (`node .github/scripts/risk-gate.mjs --pr 541`: display-name and remote-label paths, plugins/social/src/face-rooms.js). Needs the maintainer's approval and a PASS at the tip. Verification at 01c24e4 (main cf61952 merged in): - `ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify` → pass. core 1117, social 314, tree 83, timeline 93, .github scripts 93, interop 37, live-e2e 16; 0 failures. arch-docs OK; no new lint warnings (same count as before the merge). - Red at base (main cf61952, with only the new test files copied in): `core/test/group-bot-label.test.js` 0/3 pass (`actual: 'Reviewer · FlyBot 682b8a43 (flybot682b8a43)'`, `'Reviewer (FlyBot 682b8a43)'`). At base the new social assertions fail on the missing `faceOwnerName` export. Green at the tip. - `(cd core && npm run build)`, `node scripts/ds-bot-patches.mjs generate` and `check` → ok. Not run: - Smoke test: nothing under `core/index.js` or `core/src/host/` changed. The host reads `shared/remote-label.js` for room labels; unit tests cover that, including `presentRoom`. - Desktop, live instances, production Bot Social. --------- Co-authored-by: Birfy <15378933+Birfy@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #498
What. A friend's Bot now has one name in a friend chat, on both homes. Approval cards name the person who gets the message.
friendBotTitle(bot)/friendBotOwner(bot)incore/src/shared/remote-label.jsare the one formatter for a friend's chat. The sidebar row, chat header, tab title, composer placeholder and @ menu call it, so they all readChief (SelfB1233)(Friend's Bot rows: two name formats ('Helper · SelfB0023's Bot' vs 'SelfA0023's Chief'), two-line wrap, no preview, inset highlight, faint marker, same avatar as own Chief #384/Face room @ picker lists a friend's Bot 5 times in 3 sections, 'Everyone · 1 members'; mention chip renders differently per home; Bot named 4 ways #305). The sidebar row is now one string, without the muted owner part. The @ menu no longer falls back to the handle (@chief.selfb1233.home (SelfB1233)) for a friend's chat. The social plugin's classic script reads the same functions fromglobalThis.__flybot__.names, set inflybot-slots.jsregistry().recipientName/toOwnerfirst, then the friend chat's owner. A card readsChief → SelfB1233(Held reply to a friend in the replying Bot's own chat: draft looks sent, card detached and names the Bot not the person, no trace after Approve/Reject (regression of #226) #418) and is the same before and after a reload. It never showsChief → Chief (SelfB1233)again.Why. The owner's decision (option a, 2026-10-20) was to unify friend Bot names as
Chief (SelfB1233)through one formatter, and have approval cards show the receiver.Test.
ARCH_DOCS_BASE=origin/main TZ=UTC npm run verifypasses with 0 failures (core 1079, social 297, tree/timeline/scripts/interop/live-e2e all pass; plugin lint OK). New and updated tests:remote-room.test.js)held-reply.test.js)overlay-approvals.test.js)at-menu.test.js)flybot-client.test.js)social.test.js)Not run: the live two-home Mac instances and the smoke bench (client-only change).
Risk tier: T3 (estimate, from the risk-gate report: remote-label.js and displayName paths; the controller sets the label)