Skip to content

Social: neutral 'You already have …' on a re-accepted invite; clearer Remove confirm - #503

Merged
Birfy merged 2 commits into
ThinkFlowLab:mainfrom
Birfy:fix/496-already-friends-copy
Oct 20, 2026
Merged

Birfy merged 2 commits into
ThinkFlowLab:mainfrom
Birfy:fix/496-already-friends-copy

Conversation

@Birfy

@Birfy Birfy commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Fixes #496

What

  • social/join-invite: on Bot Social's 409 relationship_exists it now answers a result instead of throwing: { alreadyHave: true, status: 'active', bot, botName, ownerName, restored: [{ handle, name, owner }] }. Bot Social's 409 names no Bot, so the plugin reads the public invite info (GET /v1/invites/{code}, new inviteInfo in mcp-client.js, sent without a token) to name the invite's Bot and owner. restored lists only Bots that were locally hidden or declined before and are listed again after the (still Bot/peer-home scoped) unhide.
  • Add friend panel: neutral (not red) You already have Chief (SelfA1233). (Bot first, owner in parentheses, 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); Chief (SelfA1233) is back in your list. only when something really came back. Fallback when the Bot can't be named (or an older host still throws): neutral You already have this friend's Bot., never "… failed:".
  • Remove this Bot confirm is one line: Remove Chief (SelfB1233) from your list? Your own Bots stay shared. SelfB1233 can share it again.
  • Out of scope (owner decision, option a): one-click Share with a friend (Share a Bot with an existing friend without an invite link #500).

Why: re-accepting an invite for a Bot you already have changed nothing and failed nothing, but showed red You're already friends. Their Bot is back in your list.; the Remove confirm did not say your own shares stay.

Test

  • New: #496 join with a production-shaped 409 (MCP isError, code + message only) names Coder (Bob) from the invite info, restored: [], and the invite-info GET carries no authorization header; panel shows info/ok tones and the three texts; an older host's thrown relationship_exists shows the neutral sentence with no "failed:".
  • Updated: #139 (hidden Bot re-accepted → alreadyHave + restored names it; unrelated hidden Eve stays hidden), #197, #230/#139 Remove confirm copy.
  • ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify: pass (core lint + arch-docs, plugin lint + pack-import, build-client check, ds-bot patches check, core/social/tree/timeline suites, scripts, interop, live-e2e unit tests; 0 failures).
  • Not run: live two-home browser test on Mac/self-test instances; smoke bench.

Docs: docs/subsystems/social.md updated; changelog fragment changelog.d/496-already-have-invite.fixed.md.

Risk tier: T2 (estimate; the controller sets the label) — user-facing social copy plus one new unauthenticated read of a public Bot Social route.

… Remove confirm (ThinkFlowLab#496)

On relationship_exists, social/join-invite answers { alreadyHave, botName, ownerName, restored }
instead of throwing. The Bot is named from the public invite info (GET /v1/invites/{code},
no token), since Bot Social's 409 names no Bot. The panel shows neutral text
'You already have Chief (SelfA1233).' and '… is back in your list.' only when a hidden or
declined Bot really came back. Remove confirm: 'Remove Chief (SelfB1233) from your list?
Your own Bots stay shared. SelfB1233 can share it again.'
@Birfy Birfy added agent-pr Pull request opened by an agent bug Something isn't working area:social Friends, invites, grants, Bot Social area:ui Web/desktop UI and copy self-test Filed by the product self-test routine (issues only) labels Oct 20, 2026
@Birfy Birfy self-assigned this Oct 20, 2026
@Birfy

Birfy commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

Self-review: PASS
Tip SHA: 2286477
Ran:

@Birfy Birfy added the awaiting-approval PR is green and waits for the maintainer's approval (T2/T3) or a review PASS at its tip label Oct 20, 2026
@github-actions github-actions Bot added the risk:T3 Risk tier T3 (needs a human approval), set by the controller from the diff label Oct 20, 2026
@Birfy
Birfy added this pull request to the merge queue Oct 20, 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 20, 2026
@Birfy

Birfy commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

Self-review: PASS
Tip SHA: 5836d29
Ran:

@Birfy
Birfy added this pull request to the merge queue Oct 20, 2026
Merged via the queue into ThinkFlowLab:main with commit eb91742 Oct 20, 2026
8 checks passed
@Birfy
Birfy deleted the fix/496-already-friends-copy branch October 20, 2026 09:40
@Birfy Birfy removed awaiting-approval PR is green and waits for the maintainer's approval (T2/T3) or a review PASS at its tip agent-pr Pull request opened by an agent labels Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:social Friends, invites, grants, Bot Social area:ui Web/desktop UI and copy bug Something isn't working risk:T3 Risk tier T3 (needs a human approval), set by the controller from the diff self-test Filed by the product self-test routine (issues only)

Projects

None yet

1 participant