Skip to content

Friend's Bot chat: no plugin tool-mask lines, no stats footer, composer keeps Message <Bot> - #424

Merged
Birfy merged 5 commits into
ThinkFlowLab:mainfrom
Birfy:fix/419-friend-chat-clutter
Oct 19, 2026
Merged

Birfy merged 5 commits into
ThinkFlowLab:mainfrom
Birfy:fix/419-friend-chat-clutter

Conversation

@Birfy

@Birfy Birfy commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #419

  • No tool-mask lines. The host sends the names of plugin tools a per-Bot mask may take away (pluginTools in the roster, from hidePluginTools' gated set: tree's create_child_bot, list_children, …). ContextCell hides their Tool added / Tool removed rows 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.
  • No stats footer in a friend's Bot chat. The header marks 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.
  • Composer keeps 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-throttled MutationObserver keeps FlyBot's label while the chat is open.

Not in this PR (why the issue stays open): the 1 turns 1 steps plural 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-label follows its placeholder text on re-render), not stepped in a browser.

@Birfy Birfy added bug Something isn't working agent-pr Pull request opened by an agent area:social Friends, invites, grants, Bot Social area:ui Web/desktop UI and copy labels Oct 19, 2026
@Birfy Birfy self-assigned this Oct 19, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 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-19T06:48:38.026155Z 6e84047 Manual request
ℹ️ 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.

@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: 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".

Comment thread core/src/host/channel.js Outdated
// 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?.() ?? [],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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.

Comment thread core/src/client/cells.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)))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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.

@Birfy

Birfy commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 6e8404712c

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

# Conflicts:
#	patches/ds-bot/0003-flybot-api-client.patch
#	patches/ds-bot/0008-client-bundle.patch
@Birfy

Birfy commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator Author

Review (owner's reviewer Bot, self-review) — PASS

Tip SHA: 4b6fbfc
Ran:

  • TZ=UTC ARCH_DOCS_BASE=origin/main npm run verify (Node 24) → pass (core 960, social 257, tree 56, timeline 80, scripts 88/37/16; lint + arch-docs + build-client --check + ds-bot-patches check green)
  • merge of main (e5f6036) with generated patches regenerated per the AGENTS.md conflict recipe (npm run build, ds-bot-patches.mjs generate + check) → pass
  • CI at this tip: tests-ok → pass
    Not run:
  • smoke test (dev/smoke.mjs) — no free bench this run; host change is one roster field (pluginTools) and one getter
  • live two-home browser check — no instance pair this run; the composer-label re-render cause is read from DSH's composer, not stepped in a browser
    Verdict: PASS

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); Message <Bot> stays on the composer through a rAF-throttled MutationObserver that is disconnected on unmount. pluginTools exposes tool names only (no grants, no tokens). English UI, no DSH patch. The 1 turns plural is DSH's own string (out of scope, stays on #419); the name in the placeholder follows #384/#425.

Tier T3: this is not merge authority; it needs the maintainer's GitHub approval at this head.

@Birfy Birfy added the awaiting-approval PR is green and waits for the maintainer's approval (T2/T3) or a review PASS at its tip label Oct 19, 2026
@Birfy
Birfy added this pull request to the merge queue Oct 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 19, 2026
@Birfy
Birfy enabled auto-merge October 19, 2026 08:30
@Birfy
Birfy added this pull request to the merge queue Oct 19, 2026
Merged via the queue into ThinkFlowLab:main with commit 73aae3b Oct 19, 2026
8 checks passed
@Birfy
Birfy deleted the fix/419-friend-chat-clutter branch October 19, 2026 08:41
@Birfy Birfy removed awaiting-approval PR is green and waits for the maintainer's approval (T2/T3) or a review PASS at its tip agent-pr Pull request opened by an agent labels Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:social Friends, invites, grants, Bot Social area:ui Web/desktop UI and copy bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant