Skip to content

refactor(plugin-chatbot)!: retire eight zero-consumer entry exports - #30576

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-h719zv
Nov 5, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-h719zv

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Part of #25921. The umbrella stays open; this is the second barrel batch of claim 6660204183 (amendment 6661865751, seat domain:ui#6). The first batch was #30541.

Clause-②: no (narrowing)
Metadata-protocol: none

维护者速读

  • 改了什么:@object-ui/plugin-chatbot 的包入口不再导出 8 个名字:浮动聊天的上下文钩子 useFloatingChatbot 及其三个状态/动作/上下文类型、内部消息行的 ChatMessageProps、一个工具调用转换函数、两个工具结果展示辅助函数。模块全部保留,行为不变。
  • 为什么改:这 8 个名字在仓内(包外)与 hotcrm 均零引用;本卡逐包收窄无人使用的公开导出。
  • 风险与回滚:对外是 breaking 收窄,只影响直接从包入口 import 这些名字的外部宿主;控制台与所有 @object-ui/* 包不受影响。回滚即 revert 本 PR。
  • 先看:ui/packages/plugin-chatbot/src/index.tsx(四处导出改写)、.changeset/25921-plugin-chatbot-zero-consumer-exports.md(迁移说明)。
  • 两分钟验证:git grep -l -w -e useFloatingChatbot -e unwrapToolResult -e summarizeChatError -e toRuntimeToolInvocation -- ':!ui/packages/plugin-chatbot' ':!**/CHANGELOG.md' 应只命中本 PR 的 changeset。
  • 需要你做的:无,席位落地。

What changes

  • ui/packages/plugin-chatbot/src/index.tsx:
    • the entry stops exporting useFloatingChatbot and the types FloatingChatbotState, FloatingChatbotActions, FloatingChatbotContextValue (FloatingChatbotProvider and FloatingChatbotProviderProps stay);
    • ChatMessageProps, the props of the internal ChatMessageItem row, becomes a local interface;
    • toRuntimeToolInvocation leaves the adapter export list (toRuntimeMessages, authoredToRuntimeMessage, toRuntimeRole, toRuntimeTimestamp, toRuntimeToolState stay; the README teaches the last three and toRuntimeMessages);
    • unwrapToolResult and summarizeChatError leave the display-helper export (humanizeToolName stays).
  • One new changeset, .changeset/25921-plugin-chatbot-zero-consumer-exports.md: patch level, ! title, BREAKING paragraph, FROM/TO lines for every retired name, ADR-0087 marker not-required (runtime-export-retired …) naming all eight operands.
  • No module file is deleted and no test moves: no test imported a retired name from the entry. FloatingChatbotTrigger and FloatingChatbotPanel read the hook from its module, toRuntimeMessages calls toRuntimeToolInvocation, and ChatbotEnhanced calls the two display helpers.

Tests

Census on origin/main 75bbebb, re-read at this head on top of 48b3ae6 (same counts), with batch 1's method: the entry's 102 export names from the TypeScript checker; per name git grep -o -w -F outside ui/packages/plugin-chatbot, minus **/CHANGELOG.md, lockfiles and .changeset/**; the package README; keep rule 3 (a kept export's declared type reaches it, by a checker walk); hotcrm 6961ab1. 44 names had zero outside hits: 2 are README-taught, 29 are reached by a kept export's declared type, 8 are retired here, and 5 are kept for a reason:

Name Outside hits hotcrm Verdict
useFloatingChatbot, FloatingChatbotState, FloatingChatbotActions, FloatingChatbotContextValue 0 each 0 retired
ChatMessageProps 0 0 retired (now a local interface)
toRuntimeToolInvocation 0 0 retired
unwrapToolResult, summarizeChatError 0 each 0 retired
TypingIndicator 0 kept: TypingIndicatorProps is named in a plugin-dashboard comment (prose counts), and the component and its props go together
emitAiUsageRefresh, AGENT_ALIAS_GROUPS 0 each kept: also published on the ./core subpath entry, outside this claim's surface
authoredToRuntimeMessage, toRuntimeTimestamp 0 each kept: README-taught
controls ChatbotEnhanced 51, humanizeToolName 10, FloatingChatbot 8, toRuntimeMessages 3, FloatingChatbotProvider 1; hotcrm ListView 7

Readings on the batch commit 94dc257f (cut from 75bbebb), before the move onto this branch:

  • turbo run type-check for @object-ui/plugin-chatbot, @object-ui/app-shell, @object-ui/console with their ^build closure: 76 of 76 tasks; vitest run packages/plugin-chatbot/: Test Files 95 passed (95), Tests 880 passed (880); one lock VERDICT command-exit 0.
  • vitest run scripts/ (ui): Test Files 170 passed, 2 skipped (172); Tests 4985 passed, 2 skipped (4987); VERDICT command-exit 0.
  • Reverse check on the rebuilt .d.ts: a temporary app-shell probe importing the eight retired names plus FloatingChatbotProvider, FloatingChatbotProviderProps, toRuntimeMessages, humanizeToolName and TypingIndicator gave exactly eight errors (TS2305 / TS2724 … has no exported member), one per retired name; the controls resolved. Probe deleted; git status clean.
  • check:readme-exports: 0 fabricated, 0 stale omission(s); exit 1 only on the known packages/cli unbuilt prerequisite. check-platform-checklist --changed-from origin/main: exit 0, 0 anchored files.
  • Dogfood battery (closure plus pnpm --filter @objectstack/dogfood test under the lock): Test Files 420 passed, 3 skipped (423); Tests 3496 passed, 36 skipped (3532); VERDICT command-exit 0.
  • No ablation: export lines removed, no tested behaviour changed.

The re-run on this branch's head 59fd4bf (the cherry-pick onto 48b3ae6) is recorded in the os-dev-report on #25921.

Acceptance notes

  • emitAiUsageRefresh and AGENT_ALIAS_GROUPS have zero outside hits on both entries; retiring them means editing src/core.ts (the ./core subpath), which a later batch can take.
  • Branch name is the platform-assigned claude/project-thread-h719zv (batch 1's branch, restarted from main after refactor(plugin-dashboard, plugin-list)!: retire eight zero-consumer entry exports #30541 merged), not claude/issue-25921-*.
  • A contract-review-tier review is owed before the queue (narrowing batch); the seat runs it.

Verification

Derived gates and the head re-run are in the os-dev-report on #25921; CI check-runs on this PR are the record for every family CI runs.


Generated by Claude Code

The plugin-chatbot entry stops publishing useFloatingChatbot with its
FloatingChatbotState, FloatingChatbotActions and FloatingChatbotContextValue
types, ChatMessageProps, toRuntimeToolInvocation, unwrapToolResult and
summarizeChatError. Each name had zero hits outside the package (workspace
and hotcrm); every module stays.

Claude-Session: https://claude.ai/code/session_01L6bhgTj6bWX8Rq5fpUGNv7
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 5, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#6 · os-sales · session_01L6bhgUR8Nu4M7tbtgES7q2

维护者速读

席位核对 — ACCEPT · head 59fd4bf

  • 形态:2 文件 +30/−18(包入口、一份 changeset)。check-governed-merges --pr 30576:NOT governed,48 行 ≤ 3000。Part of #25921,draft,目标 main,merge-tree 对 main 干净。批次与认领修订 6661865751 一致(只动 plugin-chatbot 入口与一份 changeset,未删模块,未碰 providers/upload 折叠的文件)。分支在 refactor(plugin-dashboard, plugin-list)!: retire eight zero-consumer entry exports #30541 合并、远端删除后从 main 重切再 cherry-pick,未 force-push。
  • 契约(收窄,契约复核档):Clause-② no (narrowing),Metadata-protocol none。席位在 head 上独立复核:8 个退役名在包目录之外(排除 CHANGELOG 与 .changeset)0 处,README 未教。ChatMessageProps 改为本地接口,唯一使用者 ChatMessageItem 不导出,所以没有保留导出的声明类型经过它。dev 报告 6663943559 另列 hotcrm 6961ab1 0 处;保留项各有理由:TypingIndicator(其 Props 被 plugin-dashboard 注释点名,散文也算)、emitAiUsageRefresh 与 AGENT_ALIAS_GROUPS(也在 ./core 子入口,超出文件面)、authoredToRuntimeMessage 与 toRuntimeTimestamp(README 教)。changeset 带 ! 标题、BREAKING 段与 runtime-export-retired 的 ADR-0087 标记。收窄无未述的使用方,席位接受。
  • 前提实测:dev 报告 6663943559,在新 head 上复跑:type-check 76/76;包测试 880 绿;scripts/ 4985 绿;重建 d.ts 后反向探针 8/8 报无此导出;派生门禁 --ran 29/29;dogfood 420/423 文件 VERDICT 0。
  • 门禁 check-runs:head 上 55 个,44 success,11 skipped,0 红。
  • 接受的偏差:PR 归属块链接卡线程,与第一批一致。
  • 范围外去向:其余 ui 包的零引用导出留在 retire the zero-consumer surface: nine dead modules (2,211 LOC), plugin-ai, runner's publish flag, test-only reset helpers on public barrels, the providers trio, 122 dead i18n keys, root orphans #25921,两批合并后写进 Release,卡回 pm:queue。
  • 落地条款:中继 pr_ready + automerge_enable。合并后卡不关(Part of),席位同一笔摘掉 pm:dispatched、换回 pm:queue、取消指派,留一条写清两批交付与剩余的 Release 评论。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant