[Bug] Linux 运行面板折叠测试在切回首个会话时找不到 Test run 控件

Open
#2,434 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
57/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
go
Domain
testing

Research direction

Start with desktop/internal/workbench/run_panels_test.go, especially TestRunPerformanceCollapseKeepsSummaryAndPersistsTheChoice at line 217, and compare its Test run lookup with the aggregated tabs in runSessionTabs and the session tree interaction. The CI log shows earlier assertions pass, but no hit snapshot or baseline run establishes why the control is missing. Done means the test follows the current interaction path and verifies switching sessions, sample retention, and persisted collapse behavior.

Written by the indexing model from the issue text.

Description

review: medium
Platform / 平台

Other / 其他

Area / 模块

Test / 测试

Lithe version / Lithe 版本

源码 CI 构建 6a165839fd21b362a1f31e47a3b4cd08831b51a5(PR #2427)。相关 run_panels_test.go、run_view.go、runs.go 相对 main 349f389ba027bedd003fbda2faf0e7f64d7e7f10 无差异;它们最近的运行会话聚合改动来自 #2426。未单独运行 main 基线,不能把源码相同写成 main 已运行复现。

Priority / 优先级

P2 / 后续考虑:目前不着急,可安排到后续版本

OS and architecture / 操作系统与架构

Linux:Ubuntu 26.04.1 LTS,GitHub Actions ubuntu-26.04 runner,amd64。Runner image 20261116.88.1。

Environment / 环境信息
  • 证据来自 Desktop CI run 45758452244、job 139702538494(Vet and test on Linux)。运行时间 2026-11-26 04:57:34–05:06:23 UTC;失败输出时点为 05:05:01 UTC。
  • 日志确认 Go go1.27.4 linux/amd64、Rust 1.100.0。源码固定 Core e8927412b6324636f2636b58c521758451d97fc4、Viva 448b0553faf8;不是开发机的 Windows 环境。
  • 失败属于 Vet and test 中的工作台包用例;该 job 的后续 LSP editor、运行性能等 headless 步骤成功。日志仅出现这一项测试失败,没有 Go 编译错误。
  • 用例以合成的 dev.lithe.test.output-links 工具夹具和本地临时项目创建运行会话,注入 CPU/内存样本,验证性能图折叠、样本保留和设置持久化;它不依赖真实用户插件或业务项目。
  • 未采集 runner 当时的 CPU/内存/磁盘负载,也未在失败前导出控件 hit snapshot;这些信息缺口不被当作已确认根因。没有额外执行本地、隔离或 main 基线测试。
Steps to reproduce / 复现步骤
  1. 在上述提交启动 Desktop CI,运行 Linux job 的 scripts/desktop/check.sh。本报告记录的是该完整 job 中一次实际失败,不声称孤立运行必现。
  2. 工作台用例 TestRunPerformanceCollapseKeepsSummaryAndPersistsTheChoice 创建首个运行会话,注入两次性能样本,折叠图表并验证偏好落盘。
  3. 向同一插件注入第二个 RunStarted 会话,再注入样本并验证第二会话共享折叠偏好、显示自己的资源摘要。
  4. 用例在 run_panels_test.go:217 调用 h.clickNamed("Test run"),尝试切回首个会话,此时失败。
Expected behavior / 预期行为

测试应通过当前运行面板公开的控件切回首个会话,继续校验该会话独立的性能样本,以及重开工作台后的偏好恢复和键盘展开行为。若运行会话聚合改变了控件结构,应让测试覆盖新的实际交互路径,同时保持上述行为断言。

Actual behavior / 实际行为

该用例在 0.03s 失败,错误为 run_panels_test.go:217: no control named "Test run",使 Vet and test on Linux 失败。前面关于折叠状态、持久化和第二会话资源摘要的断言已经通过;失败之后的首会话样本保留与重开工作台部分尚未执行,不能称为已经通过。

原因尚未确定。静态检查确认当前 runSessionTabs 已按插件聚合运行会话,相关变化来自 main 上的 #2426,而测试此处仍按 Test run 名称寻找控件。应先核对当时生成的 hit labels、聚合 tab 和会话树交互,再判断是测试沿用了旧的控件选择假设,还是产品行为异常。没有控件快照和基线运行,不能直接断定根因,也不能据此声称 PR #2427 的编辑器功能导致了这个失败。

相关 job:Vet and test on Linux。本报告只跟踪该运行面板测试失败,不夹带编辑器或生产实现修复。

Logs or diagnostic output / 日志或诊断输出
2026-11-26T05:05:01.5729628Z --- FAIL: TestRunPerformanceCollapseKeepsSummaryAndPersistsTheChoice (0.03s)
2026-11-26T05:05:01.5730399Z     run_panels_test.go:217: no control named "Test run"
2026-11-26T05:05:01.5730790Z FAIL
2026-11-26T05:05:01.5731159Z FAIL github.com/1lck/Lithe-IDEA/desktop/internal/workbench 221.475s
2026-11-26T05:05:01.5731517Z FAIL
2026-11-26T05:05:01.6058293Z ##[error]Process completed with exit code 1.

0.03s 为失败用例的整体耗时,221.475s 为工作台包耗时。仅摘录必要测试输出,未附完整环境变量或整份 CI 日志。

Screenshots or recordings / 截图或录屏

未采集失败瞬间的控件截图或 hit snapshot。后续 headless 截图步骤成功,但其场景不同,不能当作本用例通过或失败控件状态的证据。

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
3h 48m
Merged PRs (30d)
571

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.