fix(windows): 收紧 Capsule 几何契约#182
Conversation
There was a problem hiding this comment.
Sorry @Cooper-X-Oak, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 75633f1898
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| display: 'flex', | ||
| alignItems: 'center', | ||
| justifyContent: 'center', | ||
| justifyContent: os === 'win' ? 'flex-end' : 'center', |
There was a problem hiding this comment.
Use cross-axis alignment for Windows pill anchoring
In this flex container, flex-direction is the default row, so switching justifyContent to flex-end moves the pill horizontally, not vertically. On Windows that pushes the 196px pill to the right side of the 220px host while the translation badge is still centered via left: '50%', creating a visible horizontal misalignment. If the goal is bottom anchoring, this needs cross-axis alignment (alignItems or a column direction) instead of main-axis justification.
Useful? React with 👍 / 👎.
| let y = (logical_h - capsule_visual_height(translation_active) - 80.0 - bounds.bottom_inset) | ||
| .max(0.0); |
There was a problem hiding this comment.
Preserve non-Windows bottom clearance when translating
The new y position uses capsule_visual_height(translation_active), but on non-Windows that function is constant (42.0) while capsule_window_bounds(true) grows host height to 110.0. This means translated state keeps the same top coordinate as non-translated state and drops the larger host 68px lower, so the window bottom no longer respects the prior 80pt clearance behavior on macOS/Linux. Non-Windows positioning should still account for the expanded host height.
Useful? React with 👍 / 👎.
75633f1 to
9fd726e
Compare
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
自动 Windows 实机回归补充:\n\n- fresh-start 后通过 windows-open-dev.ps1 成功 bring-to-foreground\n- 主窗口进程状态:Responding=True\n- 窗口矩形:约 Left=102, Top=56, Right=1356, Bottom=864\n- 已抓到一张主窗口截图,说明这条分支至少在 main-window visible baseline 上是正常的\n\n剩余仍需人工确认的是 Capsule 本体在 normal / translating / ending-stage 下的视觉几何,以及 100% / 125% / 150% DPI 的稳定性。 |
治理归属
docs/windows-window-governance-board.zh-CN.mddocs/2026-05-02-window-capability-family-audit.mddocs/github-tracking/windows-window-family-canonical-map.md摘要
Closes #142
这条 PR 承接 Windows Capsule 几何契约修复。
本轮把:
收口成同一套几何契约,避免继续混用视觉尺寸和宿主窗口尺寸。
修复 / 新增 / 改进
windows-ui-config.test.mjs,锁住 capsule geometry contract兼容
测试计划
node openless-all/app/scripts/windows-ui-config.test.mjsnpm run buildcargo check --manifest-path openless-all/app/src-tauri/Cargo.tomlpowershell -ExecutionPolicy Bypass -File openless-all/app/scripts/windows-build-gnu.ps1powershell -ExecutionPolicy Bypass -File openless-all/app/scripts/windows-open-dev.ps1 -ExePath <GNU dev exe>说明