fix(desktop): 修复资源监视器全屏切换异常 - #3493
Conversation
Signed-off-by: David <david@DaviddeMacBook-Air.local>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bb7b1efd19
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
| Filename | Overview |
|---|---|
| apps/desktop/src/main/resource-usage-window/controller.ts | 删除显式全屏同步与退出状态机,并按平台调整 owner 显隐事件绑定;未发现具有当前可达触发条件的缺陷。 |
| apps/desktop/src/main/resource-usage-window/window.ts | 由资源窗口自身广播原生全屏进入和退出事件,保持现有隔离与专用 preload 配置。 |
| apps/desktop/src/preload/resourceUsagePreload.ts | 为资源窗口补充受控的全屏状态查询和事件订阅接口,与现有 renderer hook 契约一致。 |
| apps/desktop/src/renderer/components/resource-usage/ResourceUsageWindowLayout.tsx | 使用窗口自身的 macOS 全屏状态动态切换标题栏间距,并补充了对应布局测试。 |
| apps/desktop/src/main/resource-usage-window/tests/controller.test.ts | 测试已调整为验证原生全屏生命周期、macOS Space 切换和非 macOS owner 显隐行为。 |
Sequence Diagram
sequenceDiagram
participant U as 用户
participant W as 资源监视器窗口
participant P as 专用 Preload
participant R as Renderer
U->>W: 点击原生全屏按钮
W->>P: fullscreen-change
P->>R: onFullscreenChange(isFullscreen)
R->>R: 调整标题栏左侧间距
U->>W: 关闭资源监视器
W->>W: hide(保留窗口实例)
U->>W: 再次打开
W->>W: show + focus
Reviews (1): Last reviewed commit: "fix(desktop): 修复资源监视器全屏切换异常" | Re-trigger Greptile
|
@DavidShenXD 👋 这个 PR 还有 1 条 review conversation 没 resolve(apps/desktop/src/main/resource-usage-window/controller.ts),auto-review 因此暂时跳过、没法继续审查 / 合并。 如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。 |
Signed-off-by: David <david@DaviddeMacBook-Air.local>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 31385a27d2
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
反馈已处理已处理:
变更:
验证:
备注:
|
Signed-off-by: David <david@DaviddeMacBook-Air.local>
反馈已处理已处理:
变更:
验证:
备注:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d2bc3c7b7c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@DavidShenXD 👋 这个 PR 还有 2 条 review conversation 没 resolve(apps/desktop/src/main/resource-usage-window/controller.ts / apps/desktop/src/main/resource-usage-window/window.ts),auto-review 因此暂时跳过、没法继续审查 / 合并。 如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。 |
Signed-off-by: David <david@DaviddeMacBook-Air.local>
反馈已处理已处理:
变更:
验证:
备注:
|
这次改了什么
摘要
setFullScreen同步和异步退出状态机,交回 macOS 原生 Space / 全屏生命周期。hide误判为需要收起资源窗口,同时继续跟随主窗口最小化、关闭和退出。变更类型
feat新功能fix缺陷修复refactor/perf重构或性能优化docs/test/chore文档、测试或工程维护范围
UI 变化
DESIGN.md§5「Spacing System」沿用既有 12px / 80px 标题栏间距;§8「Desktop Window」按 BrowserWindow 状态自适应;§10「Light / Dark Dual-Mode Delivery Gate」继续复用语义 token,不新增颜色或单模式条件样式。怎么验证的
自动验证
手工验证
未执行的验证
风险
风险分类
影响与回滚
提交前检查
git commit -s,见 DCO)