Repository navigation
Friend's Bot chat: no plugin tool-mask lines, no stats footer, composer keeps Message <Bot> - #424
Conversation
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: 3c976c1143
ℹ️ 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".
| // FlyBot: friends' remote Bots, chat members with a remote badge (not team Bots). | ||
| remoteBots: rt.flybotRemoteMembers?.() ?? [], | ||
| // Plugin tools that come and go with a Bot's place (masked per Bot): their context rows stay hidden (#419). | ||
| pluginTools: rt.pluginToolNames?.() ?? [], |
There was a problem hiding this comment.
Invalidate the roster cache when plugin tools change
When a visibleTo plugin tool is registered or disposed after a browser has cached the roster (for example, when the tree plugin is reloaded), this value changes but neither state.revision nor modelsKey does. The state endpoint at channel.js:181 therefore keeps returning unchanged, so indexRoster never refreshes isPluginTool and the new mask's Tool added / Tool removed rows remain visible until an unrelated team save; version this set in the cache key or include it in the live response.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 6e84047: pluginTools moved from view() to live(), so it rides every state answer, an unchanged one too; the client poll compares it like connectors and calls setPluginTools + updates the roster. Test in roster.test.js.
| || (block?.type === 'tool-addition' && isConnectorTool(block.toolName)) | ||
| // Plugin tools a per-Bot mask hides (tree's create_child_bot, list_children, …) come and go with the | ||
| // Bot's place, never with anything a person did, so their rows stay out of every chat (#419). | ||
| const isHiddenNotice = block => (block?.type === 'tool-removal' && (HIDDEN_REMOVED_TOOLS.has(block.toolName) || isConnectorTool(block.toolName) || isPluginTool(block.toolName))) |
There was a problem hiding this comment.
Re-render context rows when plugin tools arrive
When pluginTools arrives after a context row has rendered, notably while enabling or reloading a gated plugin, setPluginTools only mutates a module-level Set; this ContextCell has no roster/source subscription, so the roster poll does not cause it to rerender and the already-visible mask row stays on screen until another conversation update happens. Make the tool-name set observable or inject/use the roster in this cell.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 6e84047: ContextCell is now injected with face and selects roster.pluginTools via useRoster, so a row already drawn re-renders when the names change (the poll sets the module set before roster.set). Covered in hidden-tool-removal.test.js.
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
# Conflicts: # patches/ds-bot/0003-flybot-api-client.patch # patches/ds-bot/0008-client-bundle.patch
Review (owner's reviewer Bot, self-review) — PASSTip SHA: 4b6fbfc
Findings: no actionable findings at this tip. Design check: hides only rows that say nothing a person did (plugin tool masks, like connector tools in #335); the stats footer is hidden only in a friend's Bot chat (relay turns, always 0); Tier T3: this is not merge authority; it needs the maintainer's GitHub approval at this head. |
Part of #419
pluginToolsin the roster, fromhidePluginTools' gated set: tree'screate_child_bot,list_children, …).ContextCellhides theirTool added/Tool removedrows in every chat, like connector tools (Connector tools (Composio, GitHub) reach every Bot, including Bots shared under a per-Bot grant; make them per-Bot opt-in #335), so the first mask in a friend chat leaves no line.body[data-bt-friend-chat]and CSS hides the shell's[data-composer-stats]there: the friend's Bot runs on its owner's home, so local turns/steps/tok/s are relay turns and always 0.Message <Bot>. The shell re-renders its composer after a send and puts its own coding label (Message or run a task, / commands, @ files or sessions) back on[data-composer-input]; a rAF-throttledMutationObserverkeeps FlyBot's label while the chat is open.Not in this PR (why the issue stays open): the
1 turns 1 stepsplural in own chats is DSH's own locale string (stats.counts), which FlyBot cannot change without patching DSH; and the name inside the placeholder follows #384 (Message Chief (SelfA1238)) once that lands. Owner-delegated decision on the minor item: the small grey reply bubbles stay as they are (they match own chats).Docs: core-client.md, core-host.md, plugin-runtime.md. Changelog fragment added.
Ran at tip
4b6fbfc(main merged in, generated patches regenerated):TZ=UTC ARCH_DOCS_BASE=origin/main npm run verify(green, Node 24). Not run: the smoke test and a live two-home browser check (no instance pair this run); the composer-label cause is from reading DSH's composer (aria-labelfollows its placeholder text on re-render), not stepped in a browser.