fix: nested @ file mention lookup and store link button labels#250
Merged
Conversation
…uncated In workspaces with more than 5000 entries the backend caps the mention list and reports `truncated`, but both composers ignored the flag: the session fetched once with the empty at-open query and every keystroke only narrowed that incomplete snapshot locally (the empty string is a prefix of every query, so the refetch condition never fired). Files outside the first walk-order batch could never be found by typing. - Add mentionSnapshotCoversQuery as the single coverage decision: a snapshot answers a new query locally only when it is complete for the fetched query (or the query is unchanged); anything else goes back to the backend. Mirrored byte-identically on both frontends and enforced by the new mention-refetch test. - Track `truncated` on the fetch snapshot, pessimistically true while a fetch is in flight and corrected by the response. - Debounce file refetches (150ms) and keep the current entries while loading so fast typing neither walks a large workspace per keystroke nor flashes the popup empty; a pending refetch reports as loading instead of a premature "no matching files". - Rust: use the 20k candidate pool for empty queries too so depth-first walk order cannot fill the cap from one large directory and drop shallow entries; break unconditionally once the pool is full instead of walking the remaining tree; sort with sort_by_cached_key. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The Base UI render prop gives the render element's own props priority over the component's, children included. The external-link buttons in the MCP store and Skills store detail drawers passed an <a> whose only child was an sr-only span (added to satisfy biome's useAnchorContent), so it replaced the Button's icon and visible label with hidden text. Move the icon and label inside the render <a> element and drop the Button children, matching the existing render usage elsewhere. Applied to both GUI and WebUI mirrors of McpRegistryBrowser and SkillsHubPage. Co-Authored-By: Claude Fable 5 <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.
概述
修复 #249 报告的两个问题:
1. @ 引用多层嵌套目录下的文件时搜索不到
大仓库中文件索引快照被截断(上限 20k 条)时,前端仍在本地窄化过滤,导致深层嵌套路径的文件永远不出现在候选里。修复后由
mentionSnapshotCoversQuery单一裁决快照是否覆盖当前查询,不覆盖则重新请求后端检索:keepEntries避免列表闪烁,pending 状态并入 popupLoading2. MCP 商店 / Skills 商店详情页“打开外部链接”按钮无任何文字
两端 Button 均为 Base UI
useRender,render元素自带的 children 会覆盖 Button 自身 children。原代码给<a>塞了一个 sr-only span(为通过 biomeuseAnchorContent规则),结果把图标和可见文字整体覆盖成隐藏文本,按钮视觉空白。修复:把图标 + 文字移入 render 的
<a>元素内部、Button 不留 children(与 ChatHistorySidebar 既有 render 用法一致)。共修复 4 处:GUI/WebUI 的McpRegistryBrowser.tsx与SkillsHubPage.tsx详情抽屉。验证
biome check通过(原 GUI 端 2 个useAnchorContenterror 随修复消除)tsc --noEmit无错误Closes #249
🤖 Generated with Claude Code