Skip to content

docs(mentions): specify portable mention rules - #343

Merged
wesbillman merged 4 commits into
mainfrom
docs/mention-rules-spec
Sep 28, 2026
Merged

wesbillman merged 4 commits into
mainfrom
docs/mention-rules-spec

Conversation

@loganj

@loganj loganj commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

🤖
Replaces #270, which GitHub could not reopen after its base branch (#258) merged.

Summary

What the spec covers

  • Who you can mention: channel members, the agents offered in the channel, and, in channels and forums only, people found in the community directory. Archived people are left out, but you always see yourself.
  • How @ text is read: when completion opens, when a query with a space is still part of a name, and when it is prose. Prose closes the list and starts no search.
  • Matching and order: members first, then better matches, then your own agents, then names. Agents with the same name stay together in one group, ordered by your recent choices, managed agents, and presence. The order is the same for any input order.
  • Space: when Space completes a mention.
  • List stability: rows do not move while the list is open, and searches that find no one are not kept. This is desktop behavior and the fixtures do not test it.
  • People outside the channel: the send prompt with Do nothing / Invite, or Send anyway. It follows the block/buzz desktop dialog, and the spec names that source file.
  • Tags: a p tag notifies a person (a recipient). A two-field mention tag names a person without notifying them (a reference). This is the same format that other Buzz clients already write. No new event kind or NIP.
  • It also says what a mention does not do: choosing a person does not give them access, and it does not promise that an agent will answer.

Details

  • The spec is in src/bundled/mentions/README.md, next to the plugin that implements the chooser. This is the same layout as the identity-naming spec (docs(names): specify portable identity disambiguation #227). The README links to it.
  • mention-rules.fixtures.json has 69 cases: ranking (26), Space (12), query syntax (12), multi-word queries (6), tag writing (7), and tag reading (6). The expected outputs are written by hand. The code under test does not generate them.
  • The app's existing test files run every case through the production code: the ranking and Space functions, the @ query parser, the message send path, and the message reader. No existing test changed.

Larry added 3 commits September 28, 2026 10:36
Other clients can now reproduce the desktop mention chooser and tags from
one versioned spec. The spec defines the choice set, query syntax, match
tiers, sort order, Space selection, the outside-channel prompt, and the
p and two-field mention tags. The JSON fixtures hold literal expected
results, and the desktop tests run every case against the production
ranking, query, tag writer, and fold code.

Signed-off-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Section 7 now lists Invite, Do nothing, Send anyway, and Close or Escape, with the permission that shows each one, and cites the block/buzz dialog source.

Signed-off-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
The spec was written against an early #258. The merged version orders
your own agents before people too, keeps same-name agents in one block,
keeps yourself visible when archived, closes the chooser for prose, and
does not cache searches that find no one. Three new ranking fixtures
cover the ownership and block cases.

Signed-off-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
@loganj
loganj marked this pull request as ready for review September 28, 2026 14:52
@loganj
loganj requested review from a team, comp615 and wesbillman as code owners September 28, 2026 14:52

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Star Lord automated source review (via Wes’s account)

Reviewed head 5605f7bfd4b27dc11604532910f415a02d4cd7d9 against base 1d19153276b93ef733fe5e8ead888fc528fc00e3.

One actionable P2 contract mismatch, detailed inline: section 2 turns a local name-admission predicate into a prohibition on directory discovery, contrary to the existing desktop behavior and its explicit regression test. This is a documentation/portability defect; this PR does not change production behavior.

Source scope: all eight changed files; the 69 literal fixtures and their adapters; production ranking/Space selection, query admission and directory lifetime, choice eligibility/naming, outside-member consent, and recipient/reference writing and folding. Checked the relative spec links and pinned upstream tag/dialog precedents. No other actionable findings in this scope.

Validation limits: source inspection only. I did not execute PR code, fixtures, tests, builds, installs, or app workflows, and did not inspect CI in this cycle. Existing test assertions cited below are source evidence, not a reported test pass. Human confirmation and cross-client/runtime conformance remain unverified. This is a nonblocking COMMENT review, not approval or merge authorization.

Comment thread src/bundled/mentions/README.md Outdated
Section 2 said a multi-word query that is not admitted must not start a
directory search. Desktop searches anyway, so a person outside the
channel such as Mary Jane can still be found from @Mary J. The spec now
separates the local admission check from the search and the chooser
closing rule, and section 6 states the exact prefix refutation rule.

Signed-off-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Star Lord automated source review (via Wes’s account)

Follow-up review of head 019b847052d2a13d570336727585a34fef333a65 against base 1d19153276b93ef733fe5e8ead888fc528fc00e3; change since my prior review: 5605f7bfd4b27dc11604532910f415a02d4cd7d9..019b847052d2a13d570336727585a34fef333a65.

The prior P2 is resolved. No new actionable findings in this follow-up. Section 2 now separates multi-word name admission from directory discovery, preserves the error/retry path, and rechecks admission against discovered names. This matches MentionCompletion.tsx:64–90, use-mention-choices.ts:54–60, and the existing “a failed multi-word directory search keeps its error and retry” test at session-agents.test.tsx:1552–1571. Section 6 also documents the refuted-prefix search optimization and exact-key lookup exception.

Scope: the README-only repair, its interaction with sections 1 and 6, query admission, directory search/cache/refutation lifecycle, and the relevant existing regression-test source. The remaining PR inputs are unchanged from the prior review; pinned blob/content hashes and the README’s relative links were checked. This is a follow-up on the earlier finding, not a new review of unrelated areas.

Validation limits: source inspection only. No PR code, fixtures, tests, builds, installs, or app workflows were executed; CI was not checked in this cycle. Test references describe assertions in source, not reported passes. Human confirmation and cross-client/runtime conformance remain unverified. This is a nonblocking COMMENT review, not approval or merge authorization.

@wesbillman
wesbillman merged commit b279fe5 into main Sep 28, 2026
14 checks passed
@wesbillman
wesbillman deleted the docs/mention-rules-spec branch September 28, 2026 16:02
zrmarley added a commit that referenced this pull request Sep 28, 2026
…ad-on-send

* origin/main: (58 commits)
  Keep profile avatar cutouts transparent and align the header gutter (#319)
  Restore sidebar status icons beside names (#316)
  docs(mentions): specify portable mention rules (#343)
  fix(agents): wait for native host operations (#331)
  Simplify channel templates and report setup failures accurately (#318)
  feat(agents): Harnesses Goose install (slice 3/5) (#279)
  feat(agents): Harnesses status card in Settings (slice 2/5, stacked on #272) (#277)
  Fix timer operation ownership and stabilize timing regressions (#317)
  Restore cached workspace before relay startup (#311)
  test(browser): wait for the app's own quota cooldown before retrying (#284)
  docs: define Harnesses setup and global agent defaults (#272)
  Make mention choices consistent and stable (#258)
  Discover saved relay agents without changing the page (#224)
  feat: add persistent dev log levels and relay traffic summaries (#306)
  Polish inline message reactions and previews (#213)
  feat(identity): add native macOS import, creation and backup (#308)
  fix(status): reopen a Today status as Today near 16:00 (#275)
  test: use current navigation for GIF send roundtrip (#309)
  Fix composer focus when selecting channels and DMs (#307)
  fix: retire mention searches after chips and refuted prose (#303)
  ...

# Conflicts:
#	src/features/messages/MessageComposer.test.tsx
#	src/features/messages/MessageComposer.tsx
johnmatthewtennant pushed a commit that referenced this pull request Sep 28, 2026
* origin/main: (45 commits)
  Use Blue 11 links with Blue 3 hover and explicit contrast exceptions (#322)
  perf(messages): index the emoji catalog for reaction lookups (#333)
  Polish search palette and add conversation search (#340)
  Use step-ten avatar colors with contrasting outlines (#320)
  Keep profile avatar cutouts transparent and align the header gutter (#319)
  Restore sidebar status icons beside names (#316)
  docs(mentions): specify portable mention rules (#343)
  fix(agents): wait for native host operations (#331)
  Simplify channel templates and report setup failures accurately (#318)
  feat(agents): Harnesses Goose install (slice 3/5) (#279)
  feat(agents): Harnesses status card in Settings (slice 2/5, stacked on #272) (#277)
  Fix timer operation ownership and stabilize timing regressions (#317)
  Restore cached workspace before relay startup (#311)
  test(browser): wait for the app's own quota cooldown before retrying (#284)
  docs: define Harnesses setup and global agent defaults (#272)
  Make mention choices consistent and stable (#258)
  Discover saved relay agents without changing the page (#224)
  feat: add persistent dev log levels and relay traffic summaries (#306)
  Polish inline message reactions and previews (#213)
  feat(identity): add native macOS import, creation and backup (#308)
  ...

Signed-off-by: Sol <49aa1f65411fd096d2e2ec144f1e7aa36fdc76d1b907cfdf7be000c66f9d3b8e@buzz.block.builderlab.xyz>

# Conflicts:
#	src/bundled/agents/AgentCard.tsx
#	src/bundled/agents/AgentsPage.tsx
johnmatthewtennant pushed a commit that referenced this pull request Sep 28, 2026
* origin/main: (36 commits)
  Delay message timestamp tooltips by 500 ms (#321)
  Use Blue 11 links with Blue 3 hover and explicit contrast exceptions (#322)
  perf(messages): index the emoji catalog for reaction lookups (#333)
  Polish search palette and add conversation search (#340)
  Use step-ten avatar colors with contrasting outlines (#320)
  Keep profile avatar cutouts transparent and align the header gutter (#319)
  Restore sidebar status icons beside names (#316)
  docs(mentions): specify portable mention rules (#343)
  fix(agents): wait for native host operations (#331)
  Simplify channel templates and report setup failures accurately (#318)
  feat(agents): Harnesses Goose install (slice 3/5) (#279)
  feat(agents): Harnesses status card in Settings (slice 2/5, stacked on #272) (#277)
  Fix timer operation ownership and stabilize timing regressions (#317)
  Restore cached workspace before relay startup (#311)
  test(browser): wait for the app's own quota cooldown before retrying (#284)
  docs: define Harnesses setup and global agent defaults (#272)
  Make mention choices consistent and stable (#258)
  Discover saved relay agents without changing the page (#224)
  feat: add persistent dev log levels and relay traffic summaries (#306)
  Polish inline message reactions and previews (#213)
  ...

Signed-off-by: Sol <49aa1f65411fd096d2e2ec144f1e7aa36fdc76d1b907cfdf7be000c66f9d3b8e@buzz.block.builderlab.xyz>

# Conflicts:
#	src/bundled/agents/AgentEditor.tsx
#	src/bundled/profiles/ProfileAgentIdentity.test.tsx
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.

2 participants