Skip to content

Face-room @ chips: one name on both homes, with @, and no doubled space (part of #305) - #367

Merged
Birfy merged 1 commit into
ThinkFlowLab:mainfrom
Birfy:fix/305-mention-chip
Oct 18, 2026
Merged

Birfy merged 1 commit into
ThinkFlowLab:mainfrom
Birfy:fix/305-mention-chip

Conversation

@Birfy

@Birfy Birfy commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator

Part of #305 (the mention-rendering half; not closing it).

What changes

  • Same chip on both homes. In a face-to-face room the bubble now matches a mention by every alias the room host already routes on (faceAliases, moved from host/face-mentions.js to shared/remote-label.js, and re-exported there). So @SelfA's Chief typed on B is drawn as a chip on A as well (A's own Chief), not as raw text.
  • One name. The chip shows @ plus the seat label from Members and the @ picker (faceSeatLabel, e.g. SelfA · Chief / SelfB (you) · Chief). faceSeats/faceSeatLabel moved into client/face-seats.js and are re-exported by group-settings.js, so the bubble module stays light.
  • Bare names. A bare @Chief on a friend's line tries the friend's Bots first, which is the host's rule. A friend's Bot outside the room is not matched in the room (as in Face room @ picker: each Bot in the room once, named Person · Bot, no outside friends' Bots #339).
  • No doubled space. The @ menu inserts @Name with its own space, so a typed space after it made two. The drawing drops one. The stored and sent text is unchanged.
  • Chips outside face rooms also gain the @ prefix, for consistency.

Not in this PR (still open in #305): DSH's own Sessions rows in the @ menu (a shell source that cannot be hidden per Session without patching DSH), and one naming rule for the bubble header / details / tiles. Face-room lines that are drawn as notices or group cells, not by UserMessageCell, are not checked live here.

Tests: a new #305 test in core/test/mention-rule.test.js covers B's and A's views of the same line, bare-name precedence, an outside friend's Bot and the double space. It fails on main.

Ran at the tip: TZ=UTC ARCH_DOCS_BASE=upstream/main npm run verify (green: core 906/906, social 246/246, plus tree, timeline and the rest), ds-bot-patches check and changelog.mjs check. Not run: a browser pass on two homes.

…ce (part of ThinkFlowLab#305)

The bubble matched a face-room mention only by local names, so a line typed on the other home
stayed raw text, the chip had no @ and showed a different name than the picker and Members, and
the space the @ menu inserts plus a typed one showed as two. The bubble now uses the room host's
alias list (faceAliases, moved to shared/remote-label.js) and the Members seat label
(faceSeats/faceSeatLabel, moved to client/face-seats.js).
@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-18T14:30:45.186911Z 257dabe 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.

@Birfy
Birfy added this pull request to the merge queue Oct 18, 2026

@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: 257dabe515

ℹ️ 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".

const humans = (room.participants ?? []).filter(p => p.kind === 'human' && p.leftSeq === undefined)
.map(p => ({ id: p.id, name: p.displayName || p.id, kind: 'human', role: p.role }))
const seats = faceSeats(room, roster)
const ordered = fromFriend ? [...seats.filter(seat => !seat.mine), ...seats.filter(seat => seat.mine)] : seats

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve local-first precedence for own face-room lines

When a face-room snapshot lists a remote seat before this home's seat (for example, the join-order shape on the later home) and both Bots share a name such as the default Chief, the fromFriend === false branch leaves the remote candidate first. mentionSpans then binds this home's own @Chief to that remote seat, while host faceCandidates deliberately puts local candidates first, so the bubble labels and opens the friend's Chief even though the local Chief was called. Order local seats first for locally authored lines so the client mirrors host precedence.

Useful? React with 👍 / 👎.

Merged via the queue into ThinkFlowLab:main with commit c0cc00f Oct 18, 2026
8 checks passed
@Birfy
Birfy deleted the fix/305-mention-chip branch October 18, 2026 14:30
@Birfy

Birfy commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator Author

The Codex P1 above (local-first precedence for my own bare @Chief) came in after this PR merged. The fix is in #368.

Birfy added a commit to Birfy/FlyBot that referenced this pull request Oct 19, 2026
…ots (ThinkFlowLab#431)

Fixes ThinkFlowLab#305

What is left of ThinkFlowLab#305 after ThinkFlowLab#425 (one name per Bot):

- **Face room `@` menu without DSH's Sessions rows** (owner decision:
filter in FlyBot for now; ThinkFlowLab#422 stays open for a DSH API). DSH's built-in
`reference` source cannot be dropped for one Session, so for a
face-to-face room `HeaderPill` starts `actions.filterFaceAtMenu`, which
watches that Session's trigger controller (`inputTriggers.sessionOf`,
the one the composer uses; FlyBot already uses it for "Reference a
chat"). New `face-at-filter.js`: a `<style data-bt-face-at>` hides the
`reference` rows whose icon is `session` (Sessions and Subagents) and
their section title, by MenuView's option ids; `controller.hover` moves
the highlight past them in the direction of the key, so arrow keys skip
them and Enter never picks a hidden row; a menu with nothing else left
is `dismiss()`ed, so Enter sends. File rows stay. No DSH patch.
- **Everyone's count** in a group now counts the Bots it reaches (local
members plus seated friends' Bots), with singular/plural: `1 member` /
`2 members` (also the palette's group subtitle). Face rooms keep `Every
Bot in this room`.
- Already on main, checked: one row per Bot in a face room (ThinkFlowLab#339), `Bot
(owner)` naming (ThinkFlowLab#425), the mention chip with `@`, the same label on
both homes and no doubled space (ThinkFlowLab#367/ThinkFlowLab#368, test
`mention-rule.test.js`).

Tests: `core/test/face-at-filter.test.js` (rows and titles hidden, files
and Bots kept, highlight steering both ways, dismiss when only Session
rows are left, watcher clean-up), `core/test/at-menu.test.js` (Everyone
count). Docs: `docs/subsystems/core-client.md`. Changelog:
`changelog.d/305-face-room-at-menu.fixed.md`.

Ran: `ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify` at 592d535 (core
966+ tests, social, tree, timeline, scripts, interop, live-e2e: all
pass); `node core/scripts/build-client.mjs --check`; `node
scripts/ds-bot-patches.mjs check`.
Not run: smoke bench; a live two-home browser check of the face-room `@`
menu in DSH Desktop (the CSS relies on MenuView's
`dsh-slash-option-<source>-<index>` ids and `:has()`, checked against
DSH 0.2.0-rc.2).
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