Skip to content

fix: 修复 macOS 12 Monterey (Intel) 上桌面端白屏问题#347

Open
zhoujarvy wants to merge 2 commits intoNanmiCoder:mainfrom
zhoujarvy:main
Open

fix: 修复 macOS 12 Monterey (Intel) 上桌面端白屏问题#347
zhoujarvy wants to merge 2 commits intoNanmiCoder:mainfrom
zhoujarvy:main

Conversation

@zhoujarvy
Copy link
Copy Markdown

Vite 8 默认构建目标为 baseline-widely-available (Safari 16.4+), 需要 macOS 13+。macOS 12 Monterey 的 WebView 仅支持 Safari 15.x, 无法加载构建产物导致白屏。显式设置 target 为 es2021/safari15。

关闭 #284

Summary

Feature Quality Contract

  • Changed surface:
  • Tests added or updated:
  • Coverage evidence:
  • E2E / live-model evidence:
  • Known risk / rollback:

Verification

  • I ran the relevant local checks, or explained why they do not apply.
  • I added or updated same-area tests for every production behavior change.
  • I ran bun run verify for code changes, including the coverage gate.
  • New or changed executable production lines meet the changed-line coverage threshold, or the blocker/maintainer override is documented.
  • I attached or summarized the quality report path, JUnit/log artifact path, and pass/fail/skip counts.
  • I ran E2E/live smoke for cross-boundary, provider/runtime, desktop chat, agent-loop, native, or release changes, or documented the blocker.

Risk

  • This PR does not touch CLI core paths, or it has maintainer approval for allow-cli-core-change.
  • Production code changes include matching tests, or have maintainer approval for allow-missing-tests.
  • Coverage baseline/threshold changes have maintainer approval for allow-coverage-baseline-change.
  • Quarantined tests still have owners, exit criteria, and unexpired review windows.
  • Provider/runtime changes were covered by mock contract tests, and live smoke was run or explicitly deferred.

@dosubot review this PR for changed-area risk, missing tests, docs impact, desktop startup risk, and CLI core impact.

Vite 8 默认构建目标为 baseline-widely-available (Safari 16.4+),
需要 macOS 13+。macOS 12 Monterey 的 WebView 仅支持 Safari 15.x,
无法加载构建产物导致白屏。显式设置 target 为 es2021/safari15。

关闭 NanmiCoder#284
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label May 10, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 10, 2026

PR quality triage

Changed areas: area:desktop

CLI core policy: No CLI-core policy block detected.

Missing-test policy: Blocked by policy until a maintainer applies allow-missing-tests or matching tests are added.

Coverage baseline policy: No coverage-baseline policy block detected.

CLI core files:

  • none

Coverage policy files:

  • none

Expected checks:

  • change-policy
  • desktop-checks
  • desktop-native-checks
  • coverage-checks

Test coverage signals:

  • BLOCKING unless allow-missing-tests is applied: Desktop product files changed without a desktop test file in the PR.

Risk notes:

  • No special risk notes from changed paths.

Hard merge gates still come from GitHub Actions, not AI review.

Dosu handoff: Dosu can be used as the AI reviewer for risk explanation, missing-test prompts, and maintainer Q&A. If it does not comment automatically from the PR template, ask:

@dosubot review this PR for changed-area risk, missing tests, docs impact, desktop startup risk, and CLI core impact.

@dosubot dosubot Bot added the bug Something isn't working label May 10, 2026
@dosubot
Copy link
Copy Markdown

dosubot Bot commented May 10, 2026

Here's my review of PR #347 across the requested dimensions:

Changed-Area Risk: Low 🟢

This is a minimal, surgical change — 4 lines added to desktop/vite.config.ts that explicitly set target: ['es2021', 'safari15'] in the build config . It only affects the output JS feature level of the desktop frontend bundle. The risk is limited to potentially larger bundle sizes (less minification opportunity with older targets) but no functional regression for users on macOS 13+ since ES2021 is a subset of what they already support.

Missing Tests ⚠️

There are no direct unit tests for the Vite build configuration itself. The repository does have quality-gate tests for build targets and coverage metrics [1] [2], but nothing that validates the actual Vite target value. Given this is a build config constant, a smoke test verifying the desktop app launches on a Safari 15-equivalent environment would be ideal but may not be practical in CI. This is a reasonable gap for a config-only change — consider documenting the manual verification (e.g., "tested on macOS 12 Intel machine") in the PR description.

Docs Impact: None 🟢

No user-facing documentation changes are needed. The inline comment in the config file adequately explains the rationale. If there's a "supported platforms" doc, it might be worth confirming macOS 12 is officially supported.

Desktop Startup Risk: Low 🟢

The change targets the Vite build output, which the Tauri WebView loads at startup [3] [4]. Since it widens compatibility (Safari 15 instead of 16.4+), it should not break startup on any currently-working system. The Tauri config, Rust entry point, and React initialization are untouched [5] [6].

CLI Core Impact: None 🟢

This change is isolated to desktop/vite.config.ts. No CLI paths are affected.


Suggestions:

  1. Add a brief note in the PR description about how this was verified (e.g., manual test on macOS 12 Monterey Intel).
  2. Consider whether macOS 12 is in the official support matrix — if so, a CI matrix entry or periodic smoke test would prevent future regressions if Vite defaults change again.
  3. The Feature Quality Contract sections are currently blank — filling in "Changed surface: desktop/vite.config.ts build target" and noting manual verification would satisfy the checklist.

To reply, just mention @dosu.


Docs are dead. Just use Dosu.

Leave Feedback Ask Dosu about cc-haha Share Dosu with your team

color-mix() CSS 函数需要 Safari 16.2+,macOS 12 Monterey 的
WebView (Safari 15.x) 不支持,导致包含该值的 CSS 规则整体失效,
侧边栏按钮和滚动条样式丢失引发白屏。将所有直接使用的 color-mix()
替换为在 light/dark 主题中预计算的 rgba() 变量。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:desktop bug Something isn't working needs-maintainer-approval size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant