Feat/3.0.0 beta1 - #2287
Merged
Merged
Conversation
added 5 commits
August 12, 2026 21:10
上一提交改错了地方:助手真正走的是带引用标注的包装层,它绕过知识库 工具、直接 invoke 内层检索器,于是每次检索多出一张卡,名字取自检索器 (tool_key=retriever_tool)而非知识库,显示「知识库已被删除」。 websocket 帧证实了这一点:两条 knowledge_4138/4141,两条 knowledge_retriever_tool。 同样的写法有四份拷贝——助手、工作流 Agent 节点、日常对话、RAG 节点, 一起改成直接调用;只修被看到的那一处会在另外三处留下同样的脏记录。 新增用例锁住这四个文件,防止再被改回 invoke。 test/api + test/tool 46 项通过。已热更新到 116 验证。
管理端早有的那层前端护栏没搬到 workspace,所以被授予「所有者」的人 在这边仍能改其他所有者的权限。现在两处都拦:名单里顶层那一行对非 创建者只读,新增授权的权限下拉也不再出现「所有者」——只拦列表、 新增却放行,等于没拦。判定沿用管理端:从已加载名单里找创建者那行 是不是自己。仍是界面护栏而非权限边界,目录里 allow_same_level 未动, 直接调接口照样能改;要堵死得改权限模型的表达,那个决定还挂着。 另:全局 select 样式画了一个背景箭头,行内又叠了一个自绘的,所以看到 两个重叠的箭头;关掉背景图,保留自绘那个(它按右对齐文字排版)。 client 的 jest 在本机跑不起来(jsdom 的 canvas 原生模块未编译,与本次 无关),新用例交 CI 验证;三个渲染这些组件的测试补了登录态 mock。 typecheck / eslint 通过。
Adding the same person under a second model left two rows for them in the roster — say owner and editor — of which only the higher one means anything, and the reader has no way to tell which is in effect. It also poked a hole in the owner guardrail: the owner row is read-only for a non-creator, but the duplicate editor row beside it stayed editable. The picker now checks and locks anyone already holding a local grant here, whichever model is selected, so the duplicate cannot be created in the first place. Changing someone's model stays where it belongs, in the roster's dropdown. An inherited-only grant does not lock the row: granting them locally is a real action, not a duplicate. Both apps. The client keeps its badge naming the model they hold, so a locked row explains itself; the platform pickers have no badge yet. This is the UI half only — the API still accepts the second grant, so existing duplicate rows in the database are untouched.
…e it off Deleting a custom model has two preconditions: it must be switched off, and no grant may still reference it. Neither was visible. The delete button was always enabled and quietly deactivated the model on the author's behalf, and when a grant still referenced it the request failed as a bare "delete failed" — 25004 covers several model-state conflicts, so its shared copy could not name the one in the way. - The button is disabled while the model is on, with a tooltip saying so. Turning it off is the one precondition the author can see and undo; doing it for them hid what the deletion cost. The auto-deactivate change (and its wasActive argument) is gone with it. - The backend now reports which precondition failed and how many grants still hold the model, so the toast can say "N grant(s) still use this permission model. Move them to another model before deleting it." All three languages. Deletion still publishes itself in one step — the four-step deactivate-publish- delete-publish dance is not coming back. Platform vitest and typecheck pass; test/permission matches its baseline (14 pre-existing failures, unrelated).
…ed off The guard read the model's saved `active` flag, so turning the switch off in the editor changed nothing until a separate publish — the button just sat there dead, which reads as broken. Gate on the switch the author is looking at instead, and hand the caller the saved flag so an unpublished deactivation rides along in the delete batch. The server judges the precondition on what the batch publishes, not on the release it started from, so switch-off and delete still cost one publish between them. Turning the model off remains the author's own move: it is the one precondition they can see and undo.
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.
No description provided.