Skip to content

fix(startup): 后台准备图标并消除首次显示的尺寸跳变 - #2

Merged
JoyElliot merged 21 commits into
mainfrom
startup-first-frame
Sep 26, 2026
Merged

JoyElliot merged 21 commits into
mainfrom
startup-first-frame

Conversation

@JoyElliot

@JoyElliot JoyElliot commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner

Result / 用户结果

修复 Windows 正常启动时先出现透明空窗口、随后扩展到终端目标尺寸的过程。创建 HWND 前计算首屏尺寸,图标解码与缩放移到后台;窗口完成首次呈现后才按原有焦点请求显示。首屏无需等待图标准备。

本 PR 仅包含启动修复。Acrylic 材质修复保留在 #1;acrylic-startup-preview 整合分支用于同时验证两项改动,不要求将两个 PR 合并为一个。

Design / 设计边界

  • 使用原有字体测量、116×30 终端布局和工作区尺寸限制;非 Windows / DPI 查询失败时保留原回退路径。
  • 保留原 PNG、着色、缩放和像素处理。无主题差异的纹理共享;每个工作区拥有唯一的前台发布任务;替换请求或销毁窗口时取消该任务,并通知后台停止后续解码,不再维护重复代次状态。
  • 图标未就绪时使用固定宽度的原有字形回退,防止加载完成后标签文字移动。DPI 切换期间保留旧图直到新图就绪。
  • 首次呈现适配仅作用于原本需要显示并聚焦的 Windows 窗口。静默启动、后台窗口和 Quick Terminal 保留原路径。没有固定延时、持续轮询或全局缓存。
  • 原因、放弃方案和生命周期边界见 architecture/notes/nebula_app/gpui_shell/workspace/2026-09-22-nonblocking-first-frame.md。

Evidence / 验证依据

  • cargo test -p nebula --bin pebrel --features gpui-test-support gpui_shell::workspace::logos:: --locked --offline -- --test-threads=1:3 passed,覆盖像素一致性、协作取消和已排队回填的取消,保留请求作为正常发布对照。
  • 当前测试二进制:startup_geometry 3 passed;first_frame 1 passed;首个 PTY 尺寸 / 最大化回归 1 passed。相关检查共 8 passed。
  • cargo fmt --all --check -- --config newline_style=Auto、git diff --check、python scripts/check_architecture.py --base 3050374343f0b3b1821c38ffaedb3a75201b6355、python scripts/check_platform_cfg.py 通过。
  • Windows 150% DPI、隔离配置、组合 Acrylic + startup 的 3 次 Debug 原生启动:进程到窗口可见约 0.60–0.95 s,UI 线程累计 CPU 0.52–0.59 s;首次完整截图已有 UI,采样到的 HWND 尺寸始终为 1938×1103。使用目标窗口所属线程 CPU,不以整机负载作性能结论。
  • 关闭模糊的原生启动同样保持尺寸。静默启动未显示窗口;其隐藏 HWND 被记录为 foreground 的既有行为在修复前后均复现,本 PR 不宣称修复该独立问题。
  • Windows 开窗动画保留;HWND 可见事件不等同于合成器所有像素已完成动画。上述单机 Debug 数值不是跨硬件或 Release 性能保证。
  • macOS/Linux 原生外观、多显示器/其他 DPI 和 Quick Terminal 交互未在本次原生探针中覆盖。整合分支的 Windows Release CI 另行执行。

Required Review / 必须确认

  • I followed CONTRIBUTING.md, docs/architecture.md, and docs/project-constraints.md.
  • I split responsibilities, not arbitrary line ranges; no duplicate behavior authority was added.
  • python scripts/check_architecture.py --base 3050374343f0b3b1821c38ffaedb3a75201b6355 passes; budgets were not inflated to fit the change.
  • Tests cover success and failure; platform/feature coverage limitations are stated.
  • New messages use typed i18n IDs and matching placeholders; untranslated content has an explicit fallback. (No new UI messages.)
  • Governance changes include a counterexample, corrected contract, tests, and a maintainer-reviewed decision. (No governance rule changes.)

上游草稿 PR:Kuddev#251

@github-actions

Copy link
Copy Markdown

This pull request changes 7671 source lines (limit 1500; docs, lockfiles and assets excluded). Changes this large cannot be reviewed reliably, so please split it into independent pull requests — one behaviour change each, with its own tests.

本 PR 改动 7671 行源码(上限 1500,不计文档、lockfile、资源)。这么大的改动无法可靠审查,请拆成多个相互独立的 PR,每个只做一件事并附测试。

Maintainers can add the size-exempt label for integration branches. / 维护者可对集成分支加 size-exempt 放行。

@JoyElliot
JoyElliot marked this pull request as ready for review September 26, 2026 02:07
thynomex and others added 13 commits September 26, 2026 12:20
…#133)

Localize GPUI workspace controls, split actions, file panels, and close confirmations using existing typed messages and application language.

Add 57 English/Chinese message entries and focused i18n regressions. Keep close confirmations in the existing closing lifecycle module.

Retain the scoped contribution from PR Kuddev#133 without adding global language state, translation macros, or legacy-shell migrations.
Use pinned nextest for full native tests while retaining doctests, production-feature checks and both macOS release checks.

Publish shared dependency snapshots from successful default-branch runs, keep compiled artifacts architecture-specific, and preserve cross-process exclusion for shared theme fixtures.

Run the full platform matrix for both draft and ready pull requests without repeating it for readiness-only transitions.
Forward the current and legacy hook executable variables through WSLENV with /p path translation. Document the boundary contract and cover the primary hook variable in the existing environment test.
…ddev#293)

Add opt-in off/smooth cursor-motion preferences with conservative defaults and reset support. Add GPUI-local motion trajectory contracts and synchronized-update snapshot regression coverage. Renderer and settings UI integration remain separate.
Complete the Traditional Chinese catalog and align Taiwan UI terminology. Preserve message IDs and placeholders, correct the search coverage wording, and label backup contents consistently.
Keep DECSET 2031 enable/re-enable silent while retaining reports for actual palette changes. Cover repeated subscriptions and byte boundaries.

Fixes Kuddev#283.
…ws (Kuddev#234)

Reanchor only uniquely matched content after complete synchronized Pi redraws. Preserve standard clearing and cancel stale anchors on user actions or interrupted updates.

Related to Kuddev#159.
…dev#250)

Use a supported installed Acrylic controller with owned window and runtime lifetimes. Retain the existing Accent fallback and pixel-opacity behavior.

Addresses the Acrylic portion of Kuddev#236; the Aero issue remains open.
…ev#248)

Restore configurable macOS Command aliases, preserve RenameTab rebinding and dispatch Command-Q through the normal quit path. Register Command aliases through the existing runtime platform entry without changing platform budgets or validation rules.

Fixes Kuddev#238.
Use the existing opaque settings panel surface for the update dialog without changing terminal transparency or update actions. Cover the modal with light and dark themes, shell opacity values, and visible layout checks.
@JoyElliot
JoyElliot merged commit 89c315f into main Sep 26, 2026
9 of 11 checks passed
@JoyElliot
JoyElliot deleted the startup-first-frame branch September 27, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants