Skip to content

fix(startup): splash 透明背景 + 卡片化,避免长启动时左半白屏#291

Merged
appergb merged 1 commit into
mainfrom
fix/startup-splash-transparent
May 6, 2026
Merged

fix(startup): splash 透明背景 + 卡片化,避免长启动时左半白屏#291
appergb merged 1 commit into
mainfrom
fix/startup-splash-transparent

Conversation

@appergb
Copy link
Copy Markdown
Collaborator

@appergb appergb commented May 6, 2026

User description

用户反馈

启动时间较长时(凭据迁移 / 权限 probe / hotkey hook 还没 ready),main window 左侧出现白色矩形显示「OpenLess 正在启动」,本应是纯磨砂玻璃背景。

根因

main window 在 `tauri.conf.json` 是 `transparent: true` + `macOSPrivateApi: true`(NSVisualEffectView vibrancy)。但 `App.tsx::StartupShell` 之前用:
```tsx
background: linear-gradient(180deg, rgba(245,245,247,0.96), rgba(232,232,236,0.96))
```
96% 不透明渐变 → 盖过 vibrancy。在 'checking' phase 持续较长时(mac 端权限 probe / Windows 端 hotkey poll 10s 上限),左侧已 paint StartupShell 浅灰,右侧 vibrancy 区域看起来成了割裂的「白 + 磨砂」。

修复

```diff

  • background: linear-gradient(180deg, rgba(245,245,247,0.96) 0%, rgba(232,232,236,0.96) 100%),
  • background: transparent,
    ```
    让 vibrancy 全屏展开。提示文字 + icon 用一个圆角 pill 卡片承载(`rgba(255,255,255,0.55)` + `backdrop-filter: blur(20px) saturate(180%)`),跟 Capsule 视觉一致。

Test plan

  • frontend build 通过
  • CI `Windows Tauri checks` + `pr_agent_job`
  • 真机 mac:刻意拖慢启动(断网 / 等 hotkey hook poll 满 10s)观察是否仍出现白屏

PR Type

Bug fix


Description

  • 将 StartupShell 背景改为透明,允许全屏磨砂 vibrancy 效果

  • 用圆角卡片包裹提示文字与图标,带模糊和阴影

  • 消除长启动时左侧白屏割裂问题


File Walkthrough

Relevant files
Bug fix
App.tsx
startup splash transparent background and pill card           

openless-all/app/src/App.tsx

  • 替换 StartupShell 背景渐变(96% 不透明)为 transparent,避免遮盖 macOS vibrancy 效果
  • 为启动提示容器新增圆角卡片样式:paddingborderRadius: 999、半透明白色背景、backdropFilter
    模糊与饱和度、阴影及细边框
  • 添加 WebkitBackdropFilter 保证 Safari 兼容
  • 保留原有图标与文字布局,仅改动样式
+22/-2   

用户反馈:当启动时间较长时(凭据迁移 / 权限 probe / hotkey hook 还没
ready),窗口左侧出现白色矩形并显示「OpenLess 正在启动」,本应是纯
磨砂玻璃背景。

根因:main window 在 tauri.conf.json 是 transparent + macOSPrivateApi
(NSVisualEffectView vibrancy)。但 StartupShell 之前用:

    background: linear-gradient(180deg, rgba(245,245,247,0.96), ...)

96% 不透明渐变盖过 vibrancy。在窗口内容布局首帧或啥的时候,左侧 paint
StartupShell 浅灰,右侧未完成 vibrancy → 视觉割裂「左白右磨砂」。

修:StartupShell 容器改 background: transparent 让 vibrancy 全屏展开;
提示文字 + icon 用一个圆角 pill 卡片承载(rgba(255,255,255,0.55) +
backdrop-filter blur),跟 Capsule 视觉一致。
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected

@appergb appergb merged commit 08b5b88 into main May 6, 2026
2 checks passed
@appergb appergb deleted the fix/startup-splash-transparent branch May 6, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant