Repository navigation
fix(panel): 引导任务态搬进模块级 store——tab 关闭不再吞掉在飞请求与结果(#558) - #632
modusensus wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 37 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
做什么
#558(从 PR #556 评审分出的已知缺口):面板「⋯ → 从目录引导」的请求在飞时关掉整个 better-sidebar 标签页,MemoryExplorer 与引导弹层随标签页体一起卸载——keepMounted 覆盖隐藏与切视图、不含关闭(它自己的设计文档写明「记录的寿命只由原生 tab 关闭与会话消失回收」)。请求照样跑完、行照样落库(三元组去重 + _overwrite 刷新,重复执行不写坏数据),但成功/失败提示没地方显示、忙碌态也丢了,重开还能再提交一次。
按 issue 指的方向修:把 in-flight 状态与结果搬到标签页体之外(模块级 pub/sub),标签页重开时恢复。不改 better-sidebar 行为、不碰 #556。
实现
lib/client.js):bootstrapJob(phase: idle/running/done/failed + dir/result/error)+setBootstrapJob/useBootstrapJob/resetBootstrapJob——就是overlayListeners/setOverlayOpen的现成形状。onBusyChange三段转发(弹层 → explorer → overlay)删除。MemoryOverlay 的 Esc/背板/✕ 三条关闭守卫改为直接订阅——顺带修掉 tab 注册路径守卫为空的老缺口(那条路径没有 onBusyChange,busy 从来报不上去)。setBootstrapJob(running)一落,三处订阅者同步被唤醒。验证
npm test:3155 / 3154 通过 / 0 失败 / 1 跳过;check-sync 通过(client.js 是 lib-only 手写件,无 src 对应物)。test/client.test.js:两条旧锁更新到新形状(⋯ 收起连带回 idle、overlay 从 store 派生 busy)+ 新增 面板:引导请求在飞时关掉侧边栏标签页,结果与忙碌状态无处显示 #558 专项锁(模块级 store、弹层为视图、存活规则、fresh-done 与回放的按钮差异、terminal 只写 store);面板套件 134/134。euthyna gate9/9 通过(exit 0)。报告在车道本地不入库。Closes #558