[Bug] Windows 项目树"定位当前文件"间歇性失效:点击后有时不展开、不选中、不滚动(v0.6.5)
Maintainers usually reply within 1 day
@AACS111 is already working on this.
Since Oct 29, 2026.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- tauri, typescript
Research direction
Start by tracing the reveal button in windows/tauri/src/features/file-explorer/components/file-explorer-tree.tsx, then read use-file-explorer-sync.ts and file-system.store.ts to follow request IDs and ancestor expansion. Check how the visible row index is updated after expansion and whether the active pane supplies a path. Done means each click expands, selects, and scrolls to the current file; the report does not name a test or provide diagnostic logs.
Written by the indexing model from the issue text.
Description
Platform / 平台
Windows
Area / 模块
Project and workspace / 项目与工作区
Lithe version / Lithe 版本
0.6.5
Priority / 优先级
P1 / 尽快处理:使用体验大幅下降,但通常仍可继续使用
OS and architecture / 操作系统与架构
Windows x64(具体系统版本未记录)
Environment / 环境信息
Lithe v0.6.5(Windows x64 安装包),本地项目(非 WSL / 远程)。
Steps to reproduce / 复现步骤
- 在 Windows 上打开一个较大的项目,等待项目树加载完成。
- 打开多个文件,并在编辑器标签之间来回切换,使当前活动文件发生变化。
- 点击 Project 侧边栏头部的“定位当前文件”按钮。
- 观察项目树:有时能正常展开祖先目录、选中并滚动到当前文件;有时点击后没有任何反应(目录不展开、没有选中、也不滚动)。
该问题不是每次必现,尚未找到稳定的最小复现路径。
Expected behavior / 预期行为
无论当前活动文件位于哪一层目录、项目树此前处于什么状态(目录折叠、之前滚动到别处、切换过标签),每次点击“定位当前文件”都应:
- 展开目标文件的所有祖先目录;
- 选中目标文件所在行;
- 把该行滚动到可视区域。
Actual behavior / 实际行为
间歇性失效。点击后有时正常定位,有时没有任何可见反馈:既不展开目录,也不改变选中项,也不滚动。界面没有报错提示或 toast,无法判断是请求失败还是被静默丢弃。
Logs or diagnostic output / 日志或诊断输出
未采集,暂无可提供的日志。
Screenshots or recordings / 截图或录屏
暂无。如有需要可以补充录屏。
补充线索(未验证,仅供定位参考)
以下为阅读代码后的猜测,未做实际调试,仅供排查方向参考:
- Windows 侧入口在
windows/tauri/src/features/file-explorer/components/file-explorer-tree.tsx,按钮调用requestRevealPath(activePath);若activePath未随活动标签更新,或当前活动 pane 不是常规编辑器类型,可能拿不到目标路径。 use-file-explorer-sync.ts中每次定位都会递增 request id,旧请求完成会被丢弃;若短时间内有多个请求竞争,可能出现最后一次请求被更晚的无效请求覆盖的情况。file-system.store.ts的revealPathInTree会先展开祖先目录再返回;file-explorer-tree.tsx的滚动逻辑在visibleRowIndexByPath.get(revealRequest.path)取不到索引时直接return,不重试也不提示。若祖先目录展开后的行列表尚未更新,定位会被静默跳过。getExplorerTargetPath只对 editor / image / pdf / binary / externalEditor / markdownPreview / htmlPreview / csvPreview 返回路径,其他类型的 pane 会返回undefined。
以上任何一处若与设计预期不符,可能即为问题所在。
Checklist / 提交前检查
- I searched existing issues for duplicates. / 我已搜索现有 Issue,确认没有重复报告。
- I removed secrets and personal data from the report. / 我已从报告中移除敏感信息和个人数据。
- Dominant language
- TypeScript
- Stars
- 1.8k
- Forks
- 151
- Avg merge
- 11h 43m
- Merged PRs (30d)
- 345
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from 1lck/Lithe-IDEA
-
[Bug]项目是jdk6,为什么设置中还显示其他版本,设置是跟项目来的还是全局Possibly taken A pull request linked to this issue is open or already merged. Openarea:editor bug P0 platform:macos review: low
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
1lck/Lithe-IDEA#1118 · 2 comments ·
Maintainers usually reply within 1 day
-
area:editor enhancement issue-form:feature P0 platform:macos review: medium
Difficulty 5/5 Over a week Newbie friendliness 20/100
1lck/Lithe-IDEA#1584 ·
Maintainers usually reply within 1 day
-
[Bug] Windows: Git 2.48.1 被判定为低于 2.31,提示 "Git 2.31 or newer is required",仓库无法读取Possibly taken @AACS111 claimed this 1 day ago. Openarea:git bug claimed issue-form:bug P1 platform:windows review: low
Difficulty 4/5 3-5 days Newbie friendliness 52/100
1lck/Lithe-IDEA#1566 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
[Bug] 全局搜索逻辑匹配问题Possibly taken @arkleselect claimed this 1 day ago. Openarea:editor bug issue-form:bug P0 platform:macos review: medium
1lck/Lithe-IDEA#1564 · 1 assignee ·
Maintainers usually reply within 1 day
-
area:run bug P1 platform:windows review: low
Difficulty 4/5 3-5 days Newbie friendliness 55/100
1lck/Lithe-IDEA#1562 ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
components-web-app/docs#307 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
localstack/localstack-mcp-server#112 ·
Maintainers usually reply within 1 day
-
area:frontend kind:bug priority:p1 ready
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
bug ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
PhyberApex/kuroshiro#1687 ·
Maintainers usually reply within 1 day
-
Performance (Web Vitals) collector: LCP/FCP from background tabs are not discarded, inflating p75Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
umami-software/umami#4720 ·
Maintainers usually reply within 3 days