Repository navigation
fix(sessions): keep large scratch deletion responsive - #2677
Merged
vastsa merged 3 commits intoDec 1, 2026
Merged
Conversation
The icon tooltip contract requires the row menu to expose nav.sessionActions as its accessible name. Swapping in nav.deletingTask matched the visible title change but broke that contract and took away the stable name screen readers rely on. Keep the fixed name; aria-disabled and the row title already announce the deletion.
Owner
|
已合入 |
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.
Summary / 概要
确认删除后,侧栏显示「正在删除」,并在请求结束前阻止该会话重复提交。批量删除会先锁定所有待删条目,再逐个提交请求。
Host 在数据库删除后重命名会话临时目录,递归清理由串行后台任务执行,整个遍历与删除过程不再持有
AppState锁。重启时会接续清理遗留目录,成功清理会记录耗时。Scenario / 场景
一个已经停止运行的本地会话在临时目录中留下三份测试项目副本。脱敏现场约有 23.7 万普通文件,其中约 21.5 万在
node_modules,另有约 2.9 万目录和 1.2 万符号链接。确认后菜单关闭,数据库会话先消失,侧栏条目迟迟不消失。同时其他会话读取、设置和定时任务的 Host 请求也受到阻塞,31 个已接收请求达到 135 秒预算。可用 #2674 中的合成目录复现,无需模型、网络或登录。62532ce13session.delete回执settings.get修复后,
settings.get返回时被移走的临时目录仍存在,随后清理完成。测量验证的是 Host 锁和回执顺序。完整事故规模的耗时取决于文件系统和机器负载。8 万个合成文件的追加验证里,删除回执约 4.0 ms,并行设置读取约 1.9 ms,后台物理清理约 4.2 s。
Validation / 验证
macOS arm64,候选提交
11ae3143d6e0,基线62532ce130a3。Rust
scratch::tests通过,覆盖路径脱离、原路径复用和重启后清理。Electron 侧栏交互测试通过。用延迟的删除响应观察「正在删除」,确认菜单无法重新打开,响应成功后条目消失。
pnpm test:e2e:boot、桌面构建、桌面类型检查、架构检查和pnpm check:pr-base通过。本机完整 Host 测试 1,396 项通过、1 项忽略、1 项失败。失败项
tools::shell::tests::user_login_path_probes_a_real_path的PATH entries stay absolute断言在未修补的62532ce13上独立复现。Requirement link / 需求关联