Repository navigation
Closed
Labels
area:socialFriends, invites, grants, Bot SocialFriends, invites, grants, Bot SocialenhancementNew feature or requestNew feature or request
Description
Owner: Dev2
What
plugins/social/src/social.js:2743-2746 (main d24c47c8) drops the click's row label and falls back to your friend when that label is the home key's slug:
const slug = homeKey ? String(homeKey).replace(/^@/, '').replace(/\.home$/i, '') : ''
const rowLabel = cleanText(friendName)
const who = (botName ? (ownerName ? `${botName} (${ownerName})` : botName) : ownerName)
|| (rowLabel && rowLabel.toLowerCase() !== slug.toLowerCase() ? rowLabel : '')
|| 'your friend'The branch does its job — nothing tests it. Reviewer's evidence on #1002 (6385858050): replace that condition with true and both #994 tests stay green (# pass 2 / # fail 0). A refactor can therefore put the slug back into the receipt and CI stays quiet — the one thing #994 was about.
Expected
A caller that passes friendName equal to the home slug (any case, with or without @/.home) gets
Shared Chief with your friend. They can decline; you can Revoke in People with access.
and the message never matches /selftestb2/i.
Scope
plugins/social/test/social.test.js— extend the existing Share receipt still says "Shared Chief with selftestb2" — the Bot that got the grant is not named #994 case (test('#994: the share receipt names the Bot the click granted and never the home slug', around:11264-11298). After thebareassertion add a third call:call('flybot/social/share-with-friend', { botId: chief.id, home: writer.home, peerBotId: 'pb-writer', friendName: 'selftestb2' }), then assert the exactyour friendline andassert.doesNotMatch(msg, /selftestb2/i). Three assertions, no new helper.plugins/social/src/social.js:2746is the code under guard; leave it alone unless the new case shows the branch is wrong.- No
core/, nopatches/ds-bot/mirror (test only). Nochangelog.d/fragment: the user sees no change (changelog.d/README.md).
Acceptance
- New assertion green on the tip, and the whole
plugins/socialfile stays green. - Knife: change the guard at
social.js:2746totrue((rowLabel ? rowLabel : '')) → only the new assertion goes red, both existing Share receipt still says "Shared Chief with selftestb2" — the Bot that got the grant is not named #994 assertions stay green. Restore. - Second knife, optional:
'Writer (SelfTest B2)'and'selftestb2'must land on different lines — a real label wins, the slug never prints.
Not this issue
- The other non-blocking on Name the Bot that got the share in the receipt (#994) #1002 (a row that draws only a handle does not send it as
friendName, so the receipt saysyour friendwhile the panel shows a handle) is a client-side wording question, tracked on that PR, not here. - Share receipt still says "Shared Chief with selftestb2" — the Bot that got the grant is not named #994 itself is closed (
dcbf6ade); this is the missing test, not the fix.
Metadata
Metadata
Assignees
Labels
area:socialFriends, invites, grants, Bot SocialFriends, invites, grants, Bot SocialenhancementNew feature or requestNew feature or request
Activity
Birfy commentedon Oct 24, 2026
Claimed: branch
dev2/fix/1008-pin-slug-guardfromd24c47c8, PR #1010 — test only, one call plus two assertions in the existing #994 case.Knife already run on the tip: the guard →
truemakes exactly that assertion red (Shared Chief with selftestb2.), the other two stay green; restored.Owner: Dev2
Pin the share receipt slug guard (#1008)
Pin the share receipt slug guard (ThinkFlowLab#1008) (ThinkFlowLab#1010)