Feat/2.6.0 - #2205
Merged
Merged
Conversation
HIGH: - useLazyDepartmentTree: reset the normalized state when cacheKey (data source) changes on a still-mounted hook. DepartmentSettings is not keyed by dept, so DepartmentUsersSelect's rootDeptId-derived cacheKey could change while mounted and the root-load guard kept rendering the previous scope's subtree (wrong scope). Track loadedKeyRef; on change, clear nodeMap/childIds/expanded/search and reload. + regression test (rootDeptId change without remount). - design.md: refresh to the final state — mark /departments/tree, the full-tree grant endpoints and _list_knowledge_space_grant_departments as removed; add the new contracts (full-path subject_name, /user/list?with_department_path) and pitfalls #9-#11 (per-grant path-tree N+1, sub-tenant out-of-scope parent gate, fail-closed scope); revision-history entries. MEDIUM: - asearch_tree: short-circuit to empty for a non-sys-admin with an empty visible scope (was degrading to an unscoped name LIKE that leaked a tenant-wide match count via total_matches). DepartmentDao.aget_by_name_like now fails CLOSED — an empty path_prefixes list yields no rows (distinct from None=unscoped). + two tests. LOW cleanups: - DepartmentSpaceDialog: wrap the org-tree picker in a height-capped flex container so it scrolls instead of growing the dialog (same class as the grant-dialog scroll fix). - SubjectSearchDepartment: guard isImplicit on node.path. - client channels: fail-safe the channel dept search unwrap (parity with the resource twin); remove the unused client/channel path-tree wrappers and the orphaned departmentPathUtils.ts.
…tments under the single org root"" This reverts commit 64b881d.
…om SSO paths + backfill"" This reverts commit 1ac6b21.
…ment backfill scripts"" This reverts commit c0e8aa4.
…dept backfill logs"" This reverts commit e6004db.
…0-department-single-root-fga
…el + card polish TaskPanel takes a terminated flag (Stoped status via PinnedTaskPanel): stop the spinner and running-name shimmer, show a static glyph and the 已终止 label instead. Bump terminated/error banners and TaskErrorCard to rounded-2xl with px-4 py-3. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…s depts `_list_knowledge_space_grant_users` (shared by the knowledge_space AND channel `grant-subjects/users` pickers) loaded the ENTIRE tenant department table via `DepartmentDao.aget_active_by_tenant` just to build a name map for the primary- department full-path label of at most `page_size` users. On the 50k-department DM8 load-test tenant that single call fetched ~50,009 rows in ~2.8s — ~94% of the endpoint's ~3s latency (measured on 105). Everything else (main user query 160ms, user_department 4ms) was already fast. Fix: resolve labels via bounded `aget_by_ids` — this page's primary departments plus their materialized-path ancestors (reusing `_grant_path_ids`), never the whole table. Same pattern already used by `_department_path_label_map` (/user/list) and `_resolve_subject_names` (permission list); this callsite was the last holdout. Measured on the load-test env: 2987ms -> 218ms (dept step 2822ms -> 17ms; 6 depts loaded instead of 50009). Fixes both channel and knowledge_space pickers. Adds a regression test asserting the full path is resolved AND that `aget_active_by_tenant` (whole-table load) is never called.
…me index The grant-subjects/users candidate query filtered `user_name LIKE '%kw%'`, a leading wildcard that can't use the `user_name` index (Field(index=True)) and forces a full scan of the users table. Switch to a `kw%` prefix match so the index range scan applies. Measured on the 150k-user DM8 load-test tenant (warm, best of 3): the matching `z` case drops ~107ms -> ~86ms. The gain is modest because the residual cost is the `ORDER BY user_id DESC LIMIT 50` + 3-table join, not the LIKE — but the prefix match is both faster and the intended search semantics. Note: this narrows search semantics from substring to prefix (typing "z" now matches only names starting with "z").
The footer container is flex justify-between, but AutoPagination's root carries w-full justify-center, so the pager grabs full width — squeezing the count span (共 N 条 wraps to two lines) and centering the page buttons. Override with w-auto justify-end so the pager shrink-wraps and right-aligns, and add whitespace-nowrap to the count span. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
# Conflicts: # features/v2.6.0/release-contract.md # src/backend/scripts/README.md
…INV-7 例外) - 4 入口知识库选择器加「知识空间」tab;两工作流节点改名(仅显示名) - 权限校验开关两档:开=运行使用者 view_file / 关=配置者 view_file(借用配置者可见范围) - 角标溯源 accessScope 分级(方案B);复用 F029 双层过滤 + F030 type=3 多态 - release-contract 登记 F041 + INV-7 例外(含 F038 表1 登记随行)
- CitationRegistryItemSchema.accessScope(默认 per_user);MessageCitation.access_scope 列 + f046 迁移(idempotent,DM8 安全) - save/load/group 三处保持 accessScope,历史会话重开走 DB 不丢标记;Redis 缓存经 pydantic 自动 round-trip - 赋值(4 生成点)留待 T008;覆盖 AC-19
- Workflow→GraphEngine→BaseNode 新增 flow_user_id(创建者)透传,范式对齐 tenant_id - tasks.py 从 workflow_info.user_id 取配置者传入;BaseNode 未透传时回退 user_id - 关档知识空间检索按配置者 view_file 过滤的身份来源(design 决策3/坑5.1);覆盖 AC-14
- 知识域新模块 space_flow_retrieval:按 user_id+当前 flow 租户构造 UserPayload, 直接调 init_login_user、绕开 resolve_operator 的 set_current_tenant_id 副作用(坑5.10) - 放知识域(非 workflow/common)以便工作流节点与 AssistantAgent 共用、无跨模块依赖 - 测试断言构造后 current_tenant_id 不变;覆盖 AC-14 身份侧
- knowledge 域 space_flow_retrieval.aretrieve_space_documents:逐空间 build_index_prefilter → AND 组合节点元数据过滤 → 2 次尝试检索(KnowledgeRetrieverTool) → post_filter_visible_files - 身份参数化(开档运行者/关档配置者),镜像 F029 _retrieve_and_filter;Milvus/ES 走测试降级 - 单测覆盖过滤组合/丢弃(AC-12/13)/身份切换(AC-14)/None守卫;回写 design §4.3+tasks 偏差
- RagUtils: init_multi_retriever/retrieve_question 加 'space' 分支 → 经 run_async_safe(坑5.2) 调 aretrieve_space_documents;身份=开档 self.user_id/关档 self.flow_user_id;元数据过滤按空间回调 - RagNode/KnowledgeRetriever 继承即获空间支持,检索后走既有 annotate/collect(格式+溯源一致,6.3) - 空间分支用函数内懒导入,零新增顶层领域导入(RULE-1 既有违规不加重,design 已修正注) - 覆盖 AC-12/14/17/18/23/25(节点级 Milvus/ES 测试降级,逻辑见 T004 helper 单测)
- space_flow_retrieval: SpaceKnowledgeRetrieverTool(子类化 KnowledgeRetrieverTool,_run→run_async_safe/_arun→await) + build_space_knowledge_tool(包成 KnowledgeRagTool,供 agent/assistant 复用其 .knowledge_retriever_tool 检测) - agent 节点: __init__ 读 user_auth(默认关) + _init_knowledge_tools 'space' 分支(身份=开档 user_id/关档 flow_user_id) - 修 T004 测试 patch 目标(KnowledgeRetrieverTool 改顶层 import);覆盖 AC-10/12/14/17/18
- Assistant 模型加 knowledge_auth(默认关)+ f047 迁移(idempotent/DM8) - assistant_agent: 按 row.type 拆分 space(type=3)/KB → space 用 build_space_knowledge_tool, 身份=开档 invoke_user_id/关档 assistant.user_id;KB 走既有 init_knowledge_tool - 空间名并入 kb_name_by_id;覆盖 AC-10/12/14/17/18
T008: 空间检索给 doc.metadata 打 access_scope('shared'关档/'per_user'开档);
build_rag_registry + collect_rag_citation_registry_items 读取→item.accessScope;4 入口统一
T009: CitationResolveService 分级——_permitted_file_ids(扁平化)+_apply_tier_filter:
per_user 无 view_file 剔除(F029不变)、shared 保留但 enrich 按 view_file 收 previewUrl/downloadUrl;
单条 resolve: per_user 无权 NotFoundError / shared 无权返元数据不抛错
- 覆盖 AC-13/19/20/21/22;F029 既有 citation 测试同步(stub 加 url_allowed) 全绿(19 passed)
- T010 getSelectableKnowledgeSpacesApi(mine+joined+department 去重并集,client 口径) - T011 KnowledgeSelectItem 加 'space' 模式 tab(互斥):一次性加载+前端过滤+空间校验;覆盖 rag/knowledge_retriever/agent 节点 - T013 两节点改名(文档知识库问答→知识库问答/文档知识库检索→知识库检索)三语 + knowledgeSpace/tips i18n key - 覆盖 AC-01~07(前端手动验证)
…tion infra) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…color, knowledge 14px) Pin the tools-select trigger to text-[#4E5969] even in Radix's placeholder state so it matches the knowledge/model selects; bump the knowledge-space trigger text 13px -> 14px for the same alignment. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
T012 助手应用选择器: - KnowledgeSelect 加 enableSpace opt-in 双 tab(文档知识库/知识空间),每项带 type 标记(file/space);混选保留 type,MultiSelect 点击后按 value→type 映射回补 - Setting.tsx 开 enableSpace, echo 按 KnowledgeTypeEnum.SPACE=3 归类, persist type - AssistantDetail.knowledge_list 加 type 字段 T014 用户知识库权限校验开关: - 后端 AssistantUpdateReq 补 knowledge_auth 字段 + update 服务按 None 语义赋值 (修复助手开关保存被丢弃的缺口) - 助手 Setting.tsx 加开关(默认关)绑 knowledge_auth + tips - agent 节点模板(workflow.ts)知识库组加 user_auth switch(默认关)+ node.agent.user_auth i18n - RetrievalWeightSlider tip 指向详细 userAuthVerificationTips - bs.json/flow.json 三语补 documentKnowledgeBase/knowledgeSpace/userAuthVerification(Tips) e2e(T016): test_e2e_f041_knowledge_space_select.py 6/6 通过 - AC-02/05 空间列表口径(mine+joined+department 并集/不含广场/一次性加载) - AC-10/11 knowledge_auth 默认关 + ON/OFF 持久 + None 不覆盖 - AC-03/04 knowledge_list 混选 KB(type0)+空间(type3)回显各带 type 迁移 f046/f047 已 alembic upgrade head(DB 到 f047 head) T017 真实检索/溯源/UI 见 e2e-checklist.md(worker 已冒烟启动无报错) 补交前序漏提的 spec.md
…View
iOS WKWebView / WeCom renders the canvas at the large-viewport height
(100vh, e.g. 718px) but reports the dynamic viewport (100dvh/innerHeight,
e.g. 684px when the host toolbar is shown). Anything sized to the dynamic
height leaves the 684->718 strip exposing the native WebView background
(black in dark mode, host watermark bleeds through).
index.html:
- html: height 100vh !important (covers the full canvas; !important beats
style.css's runtime-injected html{height:100%})
- body: height 100dvh !important (clips UI to the visible area)
- overflow:hidden + overscroll-behavior:none on both (no scrollable
overflow -> avoids the top-cut-off WebKit quirk; no rubber-band reveal)
- static white background on the strip (app UI is always light)
- disable pinch/double-tap zoom
- reset root scrollTop on keyboard blur (touch-only) so the page isn't
left nudged up under the host header after the keyboard closes
MainLayout: route the chat/linsight pages through innerScrollShell so
their content scrolls in an inner container (body overflow is now hidden).
Prevent the right-click / long-press callout menu app-wide while keeping text selection intact (no user-select override).
Update GalleryApp wiring and the Button/Color/ConfirmDialog/Feedback/Illustration/Modal/Responsive/Typography showcases. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The .coaligne/ dir holds per-developer project bindings that the tool regenerates (it re-binds and rewrites them on its own), so it should never have been tracked — untrack the two committed state files and ignore the dir. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The tool overwrites .coaligneignore with its own default template, so tracking it means the rewrite lands in everyone's tree — keep it per-developer alongside .coaligne/. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The page styled itself with class names that tailwind.config.js never defined (text-text-primary, text-text-secondary, text-text-tertiary, border-border-subtle, bg-background-primary). These emit no CSS, so text colours came from inheritance and only happened to look right on light backgrounds. Map them onto the tokens that do exist -- foreground, muted-foreground, border, card, background -- and add dark variants to the hardcoded gray/status colours. Opacity modifiers on `white` are unusable here: tailwind.config.js overrides white to var(--white), and Tailwind v3 cannot apply an alpha channel to a CSS variable, so `bg-white/5` is dropped entirely. Use the gray-50 scale for translucent dark overlays instead.
npm run dev:docs / build:docs serve the design specs + live component demos (@rspress/plugin-preview) with the app's vite aliases and style.css mirrored into the rspack config; stubs/url-stub.ts shims Node's url module for the browser bundle. doc_build/ output gitignored. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…o feat/2.6.0-beta4
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.