Repository navigation
Show name clashes on proposed coworkers and skills, and let skill reads see loaded skills - #778
Merged
Merged
Conversation
…ds see loaded skills The SDK registers a frontend tool once, when its name or availability changes, and keeps that renderer and handler. The save_bot and save_skill cards, and the list_skills, read_skill and list_skill_tools handlers, closed over the roster and the skills from the render the grant arrived in, before those queries had loaded. A coworker named like an existing one was offered as a plain "Create", a skill that would replace an existing one as "Create" instead of "Replace", and list_skills told the Bot no skills existed. The cards are now module-level components that read the roster, the skills and the current user through their own queries, and the skill handlers fetch at call time with ensureQueryData, as the coworker reads already do.
davidmckayv
requested review from
MikeRyanDev,
guidovizoso,
mxmzb and
tylerslaton
as code owners
October 13, 2026 01:58
1123786563
pushed a commit
to 1123786563/OpenBot
that referenced
this pull request
Oct 13, 2026
合入上游 14 个提交(CopilotKit#758-CopilotKit#778):sidebar Bots/Skills 重构、Bot 页面树 (bots.$agentId.*)、legacy 路由重定向、GitHub/Slack 账号链接(CopilotKit#763)、 memory-on-Intelligence 与默认开启(CopilotKit#773/CopilotKit#776)、Web Bot Auth(CopilotKit#775)、 headed 浏览器与住宅代理(CopilotKit#772)、admin 审计 CSV 导出(CopilotKit#751)、 v0.2.0(CopilotKit#768)等。 合并要点: - drizzle 迁移:上游 0053-0055 重编号为 0084-0086,快照按上游增量 叠加我方 0083 合成,journal 时间戳在 0083 后递增;0076 快照缺失 为合并前遗留,保持原样。 - createApp 尾参并入上游 identity/identityGithubCallback,两个按位 装配的测试(self-host-banner、identity-app-wiring)改为从尾部计数。 - UI 冲突取上游重写版;我方 i18n 键补进 settings/admin locale; billing/openConnector/craft/workshop/marketplace 全部保留。 - agent-computer/bun.lock 重装再生(web-bot-auth 依赖)。 - 删除上游已删的 agent-dialog/inbox/bots.$agentId 与遗留损坏的 mobile-links.test.ts。 验证:typecheck 全绿;vite build 通过;e2e 43/43(本地起服务); 迁移 journal/identity/billing 集成测试与合并前基线一致(无新增失败, 剩余失败均为合并前遗留或本机环境项:Appium 模拟器、VPN、日期腐化)。 Co-Authored-By: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When a Bot that holds
bot-creatororskill-creatorproposes a coworker or a skill:list_skillstells the Bot "No skills exist here yet. Any slug is free." while skills exist, andread_skill/list_skill_toolsanswer from the same empty list.Cause
The same one #777 fixed in the sign-in card. CopilotKit's
useFrontendTool(anduseHumanInTheLoop, which calls it) registers a tool when its name,availableor deps change, and keeps that renderer and handler. Both tools turn on in the render where the Bot's grant arrives, which is also the render that first asks for the roster and the skills, so the kept card and handlers closed over the empty lists from before those queries loaded, and never saw them.Fix
bot-tools.tsx: thesave_botcard is now a module-level component that reads the roster with its ownuseQuery(agentListQueryOptions())and owns itsuseMutation. The three read tools already fetch at call time (lib/agents/answers.ts).skill-tools.tsx: thesave_skillcard is a module-level component reading the plugins page and the current user with its own queries.list_skills,read_skillandlist_skill_toolsfetch at call time withensureQueryData, as the coworker reads do.Module scope also keeps the card's identity stable, which is what the old
useMemowas for.How tested
app/tests/authoring-tool-cards.test.tsxuses the realCopilotKitProviderand the real hooks, with no SDK mocks and nomock.module. It captures the renderer and handlers the SDK actually kept, lets the roster and skills arrive after the grant (the order a first visit sees), then draws the card and calls the handlers. On main, all three fail:With the fix all three pass. Lint, format, typecheck, the app suite (1294 pass) and
bun run buildare green locally. The file runs in the CItestsjob viabun run test:ci.Suspected but not bugs
gallery-tools.tsxrefusals: the kept renderer does read a stale map, but nothing visible depends on it. The handler sets the refusal and returnsNOT_SHOWN + title + reasonin the same step, and the renderer's stored-result branch decodes exactly that reason into the sameRefusedCard. The map can only be read before the result exists, and before that the handler has not refused yet.isHeldis passed asavailable, so it re-registers. Left alone.createAgent/saveSkill: stale objects, butmutateAsyncis the persistedMutationObserver'smutate, so a kept copy still creates against current state. They moved into the cards anyway as part of the restructure.