Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug] Windows 项目树"定位当前文件"间歇性失效:点击后有时不展开、不选中、不滚动(v0.6.5)

Open
#1,540 3 comments 0 reactions 1 assignee View on GitHub

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
Domain
desktop, tooling

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

area:project bug claimed P1 platform:windows review: low
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 / 复现步骤
  1. 在 Windows 上打开一个较大的项目,等待项目树加载完成。
  2. 打开多个文件,并在编辑器标签之间来回切换,使当前活动文件发生变化。
  3. 点击 Project 侧边栏头部的“定位当前文件”按钮。
  4. 观察项目树:有时能正常展开祖先目录、选中并滚动到当前文件;有时点击后没有任何反应(目录不展开、没有选中、也不滚动)。

该问题不是每次必现,尚未找到稳定的最小复现路径。

Expected behavior / 预期行为

无论当前活动文件位于哪一层目录、项目树此前处于什么状态(目录折叠、之前滚动到别处、切换过标签),每次点击“定位当前文件”都应:

  1. 展开目标文件的所有祖先目录;
  2. 选中目标文件所在行;
  3. 把该行滚动到可视区域。
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from 1lck/Lithe-IDEA

All issues in 1lck/Lithe-IDEA

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.