Skip to content

Add friend: accept first, name the Bot an invite shares, show the link, keep the result (part of #343) - #364

Merged
Birfy merged 2 commits into
mainfrom
fix/343-invite-ux
Oct 18, 2026
Merged

Birfy merged 2 commits into
mainfrom
fix/343-invite-ux

Conversation

@Birfy

@Birfy Birfy commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator

Part of #343 (the Add friend panel items; not closing it).

What changes (plugins/social/client.js, Add friend):

  • Accepting comes first: the paste box is on its own full-width row (placeholder Paste invite link or code) with Accept invite under it, so the start of a link is readable.
  • Inviting is a separate, named line: Invite a friend to {Bot} (the Bot is named even with one Bot; the picker still appears with several). After it runs, the link that was copied stays in a read-only field below, and the status says Invite link for {Bot} copied. Send it to a friend.
  • A result that stays: after Accept invite the panel no longer closes; it keeps {person} shared {Bot} with you. until Done. When the join brought no Bot it says Joined {person}'s invite, but their Bot hasn't loaded yet… instead of claiming one was shared.

Not in this PR (still open in #343): an invite entry in the + menu itself, naming the Bot in the right-click Copy invite link item, and highlighting the new friend's row. These touch core menus and need a decision on where inviting should live.

Tests (plugins/social/test/social.test.js): the #195 test is replaced by a #343 test (stays open, with/without a Bot, pending); new tests for the order, full-width box and named button, and for the visible link. All four fail on main's client.js.

Ran: ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify green at the tip. Not run: a browser pass of the panel.

Risk tier: see the report; needs an independent PASS and your approval if T2/T3.

…s, shows the link and keeps the result (part of #343)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 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-18T13:54:36.786838Z 22c03ae 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: 22c03ae497

ℹ️ 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
return text
// The panel stays open with the result until Done, so it can be read (#343). A join that
// brought no Bot says so instead of claiming one was shared.
return shared ? `${who} shared ${shared} with you.` : `Joined ${who}'s invite, but their Bot hasn't loaded yet. It shows in your list when it does; if not, accept the link again.`

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 Preserve the accepted-invite result when refresh fails

When joining succeeds but the subsequent social/overview refresh fails (for example, a transient list_friends error), refresh() replaces this success text with its own error via setStatus. Previously the success was preserved in a notification and the panel closed; now the panel remains open and the only result the user sees incorrectly looks like an acceptance failure. Keep the join result separate from refresh errors, or prevent the post-success refresh from overwriting it.

Useful? React with 👍 / 👎.

Comment thread plugins/social/client.js Outdated
h('div', { className: 'fs-line', style: { padding: '4px 10px 0' }, 'data-flybot': 'invite-line' },
mine.length > 1 ? h('select', { className: 'fs-input', value: sharing, 'aria-label': 'Which of your Bots to share', 'data-flybot': 'share-bot', onChange: e => { setSharing(e.target.value); setMade(null) } },
mine.map(bot => h('option', { key: bot.id, value: bot.id }, bot.name))) : null,
h('button', { type: 'button', className: 'fs-btn', 'data-flybot': 'mint-invite', disabled: busy, onClick: mint }, `Invite a friend to ${(mine.find(bot => bot.id === sharing) ?? mine.find(bot => bot.isMain) ?? mine[0])?.name || 'your Bot'}`)),

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 the named invite action within the sidebar width

For valid Bot names near the 40-character limit, this dynamic label is wider than the Add friend sidebar. .fs-btn is flex:none and white-space:nowrap, while the ancestor .fs clips overflow, so the Bot name is cut off and, with multiple Bots, the adjacent picker can collapse almost completely. Allow this action to shrink/wrap or truncate the Bot name so the newly required name and picker remain usable.

Useful? React with 👍 / 👎.

…resh fails; long Bot names shrink the invite button (part of #343)

Docs-not-needed: behaviour already described in docs/subsystems/social.md (#343).
@Birfy
Birfy added this pull request to the merge queue Oct 18, 2026
Merged via the queue into main with commit 5b7b778 Oct 18, 2026
8 checks passed
@Birfy
Birfy deleted the fix/343-invite-ux branch October 18, 2026 14:15
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.

1 participant