Repository navigation
Add friend: accept first, name the Bot an invite shares, show the link, keep the result (part of #343) - #364
Conversation
…s, shows the link and keeps the result (part of #343)
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: 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".
| 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.` |
There was a problem hiding this comment.
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 👍 / 👎.
| 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'}`)), |
There was a problem hiding this comment.
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 👍 / 👎.
Part of #343 (the Add friend panel items; not closing it).
What changes (
plugins/social/client.js, Add friend):Paste invite link or code) with Accept invite under it, so the start of a link is readable.Invite link for {Bot} copied. Send it to a friend.{person} shared {Bot} with you.until Done. When the join brought no Bot it saysJoined {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'sclient.js.Ran:
ARCH_DOCS_BASE=origin/main TZ=UTC npm run verifygreen 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.