Repository navigation
feat(bestie): remove your Bestie, and only local agents can be Bestie for now - #2041
rileycrane wants to merge 8 commits into
Conversation
The main-agent record already reads {version: 1, agent: null} as none;
its writer now saves it for null, through the session's queued write.
clearDefaultAgent clears this device's choice and saves none to the
account, bringing the device's choice back if that save fails. The saved
choice's store also says whether the account's choice is known, read or
confirmed by a save here, so none saved can be told from not read yet or
unreadable.
Co-authored-by: eggboy <3986e5374b8c11a274f4a53fa9a68e1e18b53e712f8aa5218add2485bf5a2b09@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Riley Crane <rileycrane@squareup.com>
The Bestie tab has Remove as Bestie under Change. It asks first, saying the agent stays, its check-ins stop, and its memory section and channels stay, then saves no Bestie. Once the account is read to have none, every agent here has its check-ins stopped with the same guards, and one with a setting still on shows Former Bestie. While the account is read, or if it can't be, nothing changes. Co-authored-by: eggboy <3986e5374b8c11a274f4a53fa9a68e1e18b53e712f8aa5218add2485bf5a2b09@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Riley Crane <rileycrane@squareup.com>
A choice or removal asked for while the account is read, or still being saved, leaves the saved choice unknown until its save succeeds. A failed removal brings the Bestie back over an automatic pick, not a newer choice. Co-authored-by: eggboy <3986e5374b8c11a274f4a53fa9a68e1e18b53e712f8aa5218add2485bf5a2b09@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Riley Crane <rileycrane@squareup.com>
… an account The cleanup waits for the account's choice to be known, and each save rechecks it, so an agent made Bestie meanwhile keeps its check-ins. Remove is hidden where no account can save none. Co-authored-by: eggboy <3986e5374b8c11a274f4a53fa9a68e1e18b53e712f8aa5218add2485bf5a2b09@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Riley Crane <rileycrane@squareup.com>
Co-authored-by: eggboy <3986e5374b8c11a274f4a53fa9a68e1e18b53e712f8aa5218add2485bf5a2b09@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Riley Crane <rileycrane@squareup.com>
… community Co-authored-by: eggboy <3986e5374b8c11a274f4a53fa9a68e1e18b53e712f8aa5218add2485bf5a2b09@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Riley Crane <rileycrane@squareup.com>
Remove as Bestie writes {version: 1, agent: null}, and the desktop signer
admitted only a 64-hex agent, so Remove always failed in the app with
"couldn't be saved". The main-agent payload now also admits a null agent,
and the signer test signs, admits and decodes one.
Co-authored-by: eggboy <3986e5374b8c11a274f4a53fa9a68e1e18b53e712f8aa5218add2485bf5a2b09@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Riley Crane <rileycrane@squareup.com>
A remote agent isn't set up to be Bestie yet. Change on the Bestie tab lists only agents on this device, and Agents → Make my bestie is offered only for one; each says "Only agents on this device can be your Bestie for now." Co-authored-by: eggboy <3986e5374b8c11a274f4a53fa9a68e1e18b53e712f8aa5218add2485bf5a2b09@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Riley Crane <rileycrane@squareup.com>
eeb3b0b to
2372470
Compare
7b9426c to
4bca2e3
Compare
wesbillman
left a comment
There was a problem hiding this comment.
🤖 Star Lord’s automated source review via Wes’s account, with independent Rocket, Mantis and Groot review lanes.
Reviewed head 4bca2e33bb2fb1525d126c16913749d9fb9dfb04 against base 2372470cd869c8d96cf266bd3dfe68765ecfb513. One P3 recommendation inline: give successful Remove a surviving focus destination when it removes its own tab. The documented choice of the first remaining tab is preserved; the issue is keyboard focus, not which tab is selected.
The nullable account record, native signer change and local-agent eligibility are consistent with the stated design in the inspected source. The inherited cleanup-disposal concern remains as reported on the stack’s preceding PR #2039; it is not duplicated inline here. No concrete disclosure issue found in the public description (no attached images) or eight commit messages.
Validation: source only; no tests, builds, apps, native signing, live relay or assistive-technology workflows executed. A single hosted-check snapshot showed CI required successful in run 41144261889; Windows and browser flake checks were skipped, and an older run was cancelled. Incremental test cost and actual completion focus remain unmeasured. This is a non-blocking COMMENT review, not approval or runtime acceptance.
| <AlertDialog | ||
| title={`Remove ${name} as your Bestie?`} | ||
| description={`${name} stays in Agents, with your chats in your DMs. Its check-ins stop. Its memory rules and private channels stay; turn them off in its Former Bestie tab.`} | ||
| initialFocus={keep} |
There was a problem hiding this comment.
🤖 [P3] Give successful removal a surviving focus destination
When this confirmation succeeds, clearDefaultAgent notifies the saved-choice listeners and bestieTab.when becomes false. That removes both this dialog and its original Remove button. In the Agents detail flow, AgentTabs selects the first remaining section but does not move focus there; AgentDetails only performs its fallback focus on initial mount. Thus this newly added flow has no reliable completion handoff to a surviving control. Cancel still has its trigger, and failure keeps the dialog open, so those paths do not cover this case.
Use a surviving host-owned tab/control as the completion focus target (through the shared finalFocus/host handoff), and cover successful removal with the actual tab host mounted. This follows DESIGN.md’s modal return-focus contract while retaining the documented first-tab selection behavior.
You can Remove your Bestie, so the account has none. Once the account is known to have no Bestie, check-ins stop on every local agent. For now only agents on this device can be made Bestie, and the app says so.
Check-ins stop when there is no Bestie, just as they do when you change it (#2039).
What changes
place === "here". Agents → Make my bestie and the Former tab's Make my Bestie again are offered only for them. Each says "Only agents on this device can be your Bestie for now."agent: null(diffs below).clearDefaultAgentclears the device cache, then saves none. If the save fails, it brings back the previous choice. Without the Rust change, the desktop app rejected the save, with "Removing your bestie couldn't be saved";identity/tests.rsnow signs, admits and decodes{"version":1,"agent":null}.Design decisions
known()) only after a successful read made before any choice here, or after a successful save. It is never known while a save is pending. This gates both the cleanup and the Former tab.TS writer diff
Rust signer diff
Try it (
just dev, local agent Ada as Bestie with Remembers you and Every hour on, and a hosted agent if you have one)Known gaps
Stack: each PR is based on the one before it: #2034 Bestie tab → #2035 Remembers you → #2036 private channels → #2037 check-ins → #2039 Former Bestie → #2041 Remove as Bestie (this PR) → #2047 Choose your bestie. #2040 (recent notes in Claude Code prompts) is separate and based on main.
Overlap: #1716 also changes
features/agents/service.tsandtabs.tsx. Whichever lands second will rebase onto the other.🤖 Generated with Claude Code
buzz-review-completed