Skip to content

feat(desktop): use Direct2D as the Windows backend - #6566

Merged
me2seeks merged 15 commits into
rust-previewfrom
feat/windows-direct2d
Nov 4, 2026
Merged

me2seeks merged 15 commits into
rust-previewfrom
feat/windows-direct2d

Conversation

@me2seeks

@me2seeks me2seeks commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Use NSH Direct2D/DirectWrite as the only Windows desktop backend. This supersedes the initial opt-in scope: direct2d-experiment and the Windows GPUI entry/dependency are removed. Linux and macOS retain their existing defaults.
  • Address the seven review findings: connect Host image readers; publish real activation; remove the repository screenshot and documentation references; explicitly reject unsupported UI reloads; activate pressables with Enter/Space; exclude GPUI-only modules on Windows; connect font scaling and exit through the shared Shell protocol.
  • Address the follow-up review: guarded native range replacement and styled atomic tokens; suspend/resume recycled-row keyframes; reuse owner-bound folder dialogs; share the 640×480 minimum client size and publish minimized activation correctly; remove the product benchmark report.
  • Add Windows desktop/native-backend CI coverage and compile the release runner, development host and Rust gallery against the updated Windows API.

Review focus

Windows now changes its shipped default rather than offering an optional experiment, so this revision needs another maintainer review. Each window uses one admitted Host; Host reconnection is outside this change. UI reload and system-notification requests receive explicit errors. There is no runtime backend fallback, and full GPUI platform-service parity is not claimed.

Verification

Latest review follow-up: commit 2be869eeb78a4a3471e384c2c0bb3238eb82fa0d, integrating target branch 8fd3a365c via merge deb534c53.

  • Windows native backend: 158 tests passed with one test thread, including real within-scoped Ctrl+V → JS range replacement → native editing/undo; configured token styles and whole-token deletion; parked ordinary/screen rows suspending descendant keyframes, clearing stale layout transitions and resuming without restarting; DPI-aware minimum sizing and minimized activation.
  • Negative regression check: disabling the range dispatch, token configuration and parked-animation guard makes exactly those 3 regression tests fail while 155 others pass. Production sources were restored; the full 158-test suite passed again.
  • Native backend strict Clippy (library and tests, -D warnings): passed.
  • Windows release runner, development host and Rust gallery API consumer checks: passed, locked Cargo graph.
  • Default desktop shell: 3 tests passed, including real JS-to-Shell-to-native-window exit, explicit reload rejection and the executable icon. The earlier exit-bridge negative check also failed with the bridge disconnected and passed after restoration; production permissions were not relaxed.
  • 14 CI behavior tests passed, preserving windows-shell, windows-desktop and windows-nsh without restoring the removed clippy suite. Changed Rust formatting, staged ASF header and whitespace checks passed.
  • Builds/tests used two logical CPUs, BelowNormal priority, two compiler jobs and one test thread; Rust suites ran sequentially.

CI for 2be869eeb failed in two inherited paths: Windows shell CI assumed ProgramFiles rather than PROGRAMFILES, and the terminal activity-follow case timed out. Both are fixed upstream by #6619. Merge b654882b447c60509c4170c4a874cd16a9201d8a integrates current target 561fe244a without adding unrelated patches or relaxing tests. All 15 CI behavior tests pass locally after the merge; fresh exact-head CI is running. GitHub reports the pushed head MERGEABLE. The 158 native tests and other review verification above were run on 2be869eeb, before this upstream-only synchronization.

Earlier isolated checks verified immediate font-size changes and Tab/Enter/Space using Win32 messages sent only to a test-owned window, not physical-keyboard validation. The full incoming-message/read-marker scenario, pixel-level token rendering and interactive folder-dialog focus/cancellation have not been manually exercised. The full repository check and local macOS/Linux platform tests were not run.

The preceding notices repair passed all 4 existing notice behavior tests and full notices.mjs check using the fixed Git revision's original license bytes. Windows Cargo Git cache CRLF conversion was proven to explain the local mismatch; cache files were restored after verification. This follow-up does not change existing license digests or notices.

Historical comparison (2026-11-02; pre-review revisions)

These are point-in-time measurements, not a re-benchmark of the current code. Five release empty-homepage runs, medians:

Metric Direct2D GPUI
Shell to visible 1.270 s 1.724 s
Working set 140.16 MiB 173.05 MiB
Private memory 118.22 MiB 146.71 MiB
Idle CPU (noisy) 3.17% 8.20%
WM_CLOSE normal exit within 10 s 5/5 1/5

Three separate cold-Root runs took 15.707 s / 15.598 s end-to-end, so they showed no overall startup improvement. Environment: Windows 11 build 26200, i5-12450HX, 32 GiB RAM, Intel UHD. GPUI's four timed-out processes were owned test processes. No FPS, GPU utilization, frame-time percentiles, long-history scrolling, streamed replies or model inference was measured. The point-in-time report has been removed from the product directory as requested.

Public API

Windows run_app(source, options, on_active) now requires an activation observer. AppSource::Config loads the admitted configuration; with_running_view and quit_app marshal commands onto its UI thread. Actual Windows callers and the Rust entrypoint template are updated; no legacy-signature wrapper is retained. AppOptions::min_size constrains logical client dimensions; AppView::choose_directory returns owner-bound dialog results through a UI-thread callback, distinguishing cancellation from errors. The Windows-crate re-export has been removed.

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: OpenAI Codex authored the initial branch. Maka (OpenAI) synchronized upstream, resolved conflicts, implemented review fixes, added behavior coverage/CI routing, and performed local validation and the historical measurements. Material commits carry Generated-by trailers.

Checklist

  • Tests cover the change and fail without it
  • Format, typecheck and all affected suites pass locally — targeted Windows results are listed above; macOS/Linux and full CI remain for hosted verification.

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

Restore modal opacity when the final presentation does not fade. The default animation can hide a newly inserted modal before its configuration arrives.

Generated-by: OpenAI Codex
Add initial scoped and fallback shortcut handling and accept an embedding engine configuration for the Direct2D experiment. Focus lifecycle coverage remains incomplete.

Generated-by: OpenAI Codex
Keep the Direct2D backend behind an opt-in feature and provide an initial Windows folder chooser. Desktop host lifecycle and platform services still need implementation.

Generated-by: OpenAI Codex
Resolve desktop backend selection, Windows environment flags and the dependency lockfile. Windows pre-commit is blocked by spawnSync biome.cmd EINVAL; Rust formatting and staged whitespace checks were run separately.

Generated-by: Maka (OpenAI)
Cover Tab navigation across focusable non-input views, remove needless closure borrows, and document locked npm dependencies, Windows build commands and measured release-shell behavior. Include the normal workbench screenshot and explicitly record comparison limits and outstanding reference-build shutdown observations.

Generated-by: Maka (OpenAI)
The Direct2D dependency resolves existing Windows dependencies onto windows-sys 0.61, removing 0.52 from the shipped CLI and desktop closure. Regenerate the shared cargo-deny inventory and record the verification.

Generated-by: Maka (OpenAI)

@M4n5ter M4n5ter left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

English

I found seven remaining issues:

  1. Dynamic image assets are not connected. AppSource::Config passes the asset reader to the engine, but the Windows image-loading context does not receive it. Workbench images using asset:/ui-image/..., including tool results and attachments, therefore cannot load. Please connect config.assets.read to the platform image loader; an asset base directory alone does not cover these dynamically served assets.

  2. Window foreground state is permanently true. The Direct2D entry point creates watch::channel(true) without updating it from window activation events. When the user switches to another application, the active conversation can still mark incoming messages as read. Please publish the actual activation state.

  3. Remove the screenshot and its documentation reference. Please remove screenshots/windows-direct2d.png from the repository and delete the corresponding screenshot reference from the documentation.

  4. UI reload requests can wait indefinitely. Direct2D does not consume the UiReload receiver. When a plugin change triggers UI reload, the pause request is queued but never answered, leaving the reload operation stuck. Supporting reload is optional for this experimental backend, but unsupported requests need an explicit error response.

  5. Keyboard focus does not provide button activation. Tab navigation can focus pressable elements, but Enter/Space does not activate them. This affects existing interactions such as the model selector’s “All connections” button. Please connect keyboard activation to the focused element’s press action.

  6. Backend-specific module configuration needs cleanup. The Windows Direct2D build still includes the GPUI window and placement modules, although their launch path is excluded. Please align the module declarations with the selected backend. This is a cleanup item, rather than a demonstrated runtime failure.

  7. The existing Shell command bridge is missing. Direct2D registers the folder chooser but does not handle appearance.textSize or terminal.exit. Consequently, text-size selections are persisted without changing the font; after the “press Ctrl+C again to exit” prompt appears, pressing it again does not exit. Please reuse the existing Shell protocol and connect these commands to the Direct2D window.

These findings are based on source review of 88781b5; Windows runtime validation has not been performed.

简体中文

目前还有七项问题:

  1. 动态图片资源没有接通。 AppSource::Config 将资源读取器传给了引擎,但 Windows 平台的图片加载上下文没有接入它。因此,工具结果、附件等使用 asset:/ui-image/... 的图片无法加载。需要把 config.assets.read 接到平台图片加载路径;仅设置资源目录无法覆盖这些动态资源。

  2. 窗口前台状态始终为 true。 Direct2D 入口创建了 watch::channel(true),却没有根据窗口激活事件更新。用户切换到其他应用后,当前会话仍可能把新消息标记为已读。应发布实际的窗口激活状态。

  3. 删除截图及其文档引用。 请从仓库移除 screenshots/windows-direct2d.png,并删除文档中相应的截图引用。

  4. UI 重载请求可能一直等待。 Direct2D 没有消费 UiReload 接收端。插件变更触发 UI 重载时,暂停请求成功入队,却始终得不到回应,导致重载卡住。实验后端可以暂不支持重载,但需要明确返回不支持的错误。

  5. 键盘聚焦后无法激活按钮。 Tab 导航可以聚焦可点击元素,但 Enter/Space 没有触发相应操作。这会影响模型选择器中“All connections”等现有按钮。应将键盘激活接到当前焦点元素的 press 操作。

  6. 后端专属模块的条件编译需要清理。 Windows Direct2D 构建仍包含 GPUI 使用的 window、placement 模块,只排除了启动调用。模块声明条件应与后端选择一致。这是代码清理项,并非已经验证的运行故障。

  7. 现有 Shell 命令桥没有接通。 Direct2D 注册了文件夹选择,却没有处理 appearance.textSize 和 terminal.exit。因此,字号选择会保存,但字体不变;出现“再按 Ctrl+C 退出”提示后,再按也不会退出。应复用现有 Shell 协议,将这些命令接到 Direct2D 窗口。

以上基于提交 88781b5 的源码审查,尚未进行 Windows 实机验证。

@github-actions github-actions Bot added the effort/M Under 500 readable lines label Nov 3, 2026
Remove the Windows GPUI feature switch and keep backend selection at the platform boundary. Connect Host assets, activation, keyboard presses and Shell commands; reject unsupported UI reloads and notifications explicitly. Remove the repository screenshot and update documentation.

Verified: 153 native Windows tests, 3 desktop tests, an exit-bridge negative regression, strict native Clippy, API consumer checks and the default desktop build. Desktop-shell strict Clippy remains pending after cancellation by the process service. Relevant format, header and whitespace checks were run directly because of the known Windows pre-commit biome.cmd spawn issue.

Generated-by: Maka (OpenAI)
Run Windows desktop and NSH backend tests with the existing Windows worker, and check the actual Windows API consumers. Install nextest and select libclang; key caches by both Cargo lockfiles and route the embedded Rust template explicitly.

Verified: all 11 CI behavior tests pass; changed JavaScript formatting, lint, staged ASF headers and whitespace checks pass. Used direct checks for the known Windows pre-commit biome.cmd spawn issue.

Generated-by: Maka (OpenAI)
Resolve CI setup conflicts without restoring the removed mbx setup. Preserve the current dependency-cache workflow and include both Windows Cargo graphs in cache identity and pruning. Retain libclang and nextest for native Windows verification. All 11 CI behavior tests and changed JavaScript checks pass after synchronization.

Generated-by: Maka (OpenAI)
@me2seeks me2seeks changed the title feat(desktop): add an opt-in Direct2D Windows backend feat(desktop): use Direct2D as the Windows backend Nov 3, 2026
@me2seeks
me2seeks requested a review from M4n5ter November 3, 2026 12:47
Preserve both Windows Direct2D checks and the new macOS Host CI. Align test-runner setup expectations and regenerate the native dependency inventory for the default Windows backend. All 13 CI behavior tests, JavaScript checks, license/inventory checks and staged source checks pass.

Generated-by: Maka (OpenAI)
@me2seeks
me2seeks requested review from M4n5ter and removed request for M4n5ter November 3, 2026 13:43
Merge rust-preview at 5349df7 instead of changing the inherited terminal activity-follow test. Its unchanged case passes in upstream CI run 41646635986. All 13 CI routing/setup behavior tests pass after synchronization.

Generated-by: Maka (OpenAI)
Add generated notices for the default NSH Windows backend and its WebView2 dependencies. Preserve reviewed notices for other platforms and canonical Git license digests.

Generated-by: Maka (OpenAI)

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I re-reviewed exact head fda49e30ce916ec6f6fbc2b265622912dfdf6eb8. The seven source issues previously reported at 88781b5 are closed. The follow-up notices commit also closes the exact-head product failure, and every completed hosted check is successful; native-macos, native-windows, and root-tests (cli, slice:4/6) are still running.

I cannot approve this head because it no longer merges cleanly into current rust-preview 88eb006dee6f8e5de62f8152c4efdd73abf5fdbd. The conflict is in scripts/ci.test.mjs: #6611 removed clippy from the SDK runtime-input suite selection while this PR adds windows-desktop to the same list. Please integrate the latest target branch and preserve both changes—add windows-desktop without reintroducing clippy—then let the exact-head checks finish successfully. I will recheck the resulting head.


Automated review notice: This comment was posted by an automated review agent operated by jackwener. It is not an independent human review and does not replace one.

@M4n5ter M4n5ter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

English

The seven issues from the previous round have been addressed. Since this revision promotes Direct2D from an opt-in experiment to the sole Windows backend, I found seven remaining issues after reviewing fda49e30c:

  1. Command::ReplaceRange is not implemented in nsh-platform-windows, breaking text paste, completion acceptance, and inline suggestions in the composer. This revision enables native_focus_scopes: true, and input::key dispatches keymap::key before text_input::key. When the main composer input is focused, the within-scoped mod+v (Ctrl+V on Windows), alt+v, and ctrl+alt+v bindings in composerPaste.ts consume the keystroke first and call replaceRange on the plain-text paste path; however, nsh-platform-windows/src/mount.rs does not handle Command::ReplaceRange, so it falls through to system::command and is dropped. / and @ completion acceptance (ComposerCompletion.tsx) and suggested-message acceptance (Composer.tsx) rely on replaceRange as well and fail for the same reason. Please wire Command::ReplaceRange through mount.rs and text_input.rs following nsh-platform-gpui (which shares text_edit::Model and the edit counter), and add behavior coverage for a within-scoped binding invoking replaceRange.

  2. Input tokens rules are not connected to Windows text input. Composer.tsx configures tokens={skillTokens()} for /skill:... (chip highlight styling plus atomic: true caret boundaries and whole-token deletion). As the sole Windows backend replacing GPUI, nsh-platform-windows/src/text_input.rs neither calls model.set_tokens(&config.tokens) in config nor paints token styles, leaving /skill:... as plain text. Please connect config.tokens to Model and the drawing path.

  3. Recycled list rows (RetireListCell) are missing the animation suspension and resumption handling from #6543. park_retired_root only calls unparent() on the retired cell root (or marks a Screen concealed), so descendants still satisfy registered && parent_view().is_some(). Keyframe animations inside off-screen rows (such as a spinning LoadingIndicator) therefore never stop in transition::tick and keep driving the frame ticker while parked; old transitions are also not cleared on retirement (retired), and descendant animations are not resumed on reinsertion (resume). Please port the #6543 (810305ca6) changes across mount.rs, navigation.rs, and transition.rs.

  4. The folder chooser dialog has no owner window and duplicates existing platform code. direct2d_folder::choose calls dialog.Show(None) without the host HWND, so the dialog is not modal to the window and can fall behind it on focus changes. nsh-platform-windows/src/file_requests.rs already implements a dedicated STA thread with FOS_PICKFOLDERS and dialog.Show(Some(owner)); please expose choose_directory on AppView following the macOS backend to reuse that path, and remove direct2d_folder.rs along with the pub use windows; re-export from nsh-platform-windows.

  5. Minimum window size constraint and minimized activation state. Both GPUI and AppKit constrain the minimum workbench content size to MIN_SIZE = (640, 480) (the sidebar-folding floor), whereas WM_GETMINMAXINFO in nsh-platform-windows is hardcoded to 200 × 150, allowing the window to be resized narrow enough to break the workbench layout. Please support AppOptions::min_size (converting logical client dimensions via AdjustWindowRectExForDpi) and move MIN_SIZE from the GPUI-only window.rs module into shared shell.rs. In addition, WM_ACTIVATE currently checks only LOWORD(wparam) != WA_INACTIVE without checking the minimized flag HIWORD(wparam) == 0; a minimized window should not be reported as foreground-active (likewise on WM_SIZE with SIZE_MINIMIZED).

  6. Remove the benchmark report under the product directory and its README links. Please remove products/maka/desktop-shell/benchmarks/windows-2026-11-02.md from the repository and delete the corresponding links in README.md and README_zh.md; point-in-time comparison numbers can stay in the PR description.

  7. Rebase onto the latest rust-preview to resolve CI configuration conflicts. Alongside #6611 (removing the clippy suite), #6570 also wired windows-shell into native-windows across scripts/ci/{suites,run,setup}.mjs and scripts/ci.test.mjs. Please rebase onto the latest target branch, keeping windows-shell, windows-desktop, and windows-nsh without reintroducing clippy.

These findings are based on source review of fda49e30c; Windows runtime validation has not been performed.

简体中文

上一轮提出的七项问题已经处理到位。由于本次将 Direct2D 从可选实验切换为 Windows 唯一默认后端,复查 fda49e30c 后还有以下七项问题需要处理:

  1. Command::ReplaceRange 未在 nsh-platform-windows 实现,导致主输入框粘贴文本、补全上屏和建议采纳失效。 本次开启了 native_focus_scopes: true,且 input::key 中 keymap::key 先于 text_input::key 执行。主输入框聚焦时,composerPaste.ts 绑定的 within 作用域 mod+v(Windows 下即 Ctrl+V)、alt+v、ctrl+alt+v 会先消费按键,并在纯文本粘贴分支调用 replaceRange;但 nsh-platform-windows/src/mount.rs 未处理 Command::ReplaceRange,落入 system::command 后被直接丢弃。同样依赖 replaceRange 的 /、@ 补全确认(ComposerCompletion.tsx)与预测消息采纳(Composer.tsx)也会一并失效。请参考 nsh-platform-gpui 在 mount.rs 和 text_input.rs 中接入 Command::ReplaceRange(两者共用 text_edit::Model 与编辑计数),并补充 within 快捷键触发 replaceRange 的行为测试。

  2. Input 的 tokens 规则未接入 Windows 文本输入。 Composer.tsx 为 /skill:... 配置了 tokens={skillTokens()}(芯片高亮样式及 atomic: true 原子光标与整块删除)。作为替代 GPUI 的唯一 Windows 后端,nsh-platform-windows/src/text_input.rs 的 config 目前既未调用 model.set_tokens(&config.tokens),绘制路径也未渲染 token 样式,导致 /skill:... 退化为普通文本。请将 config.tokens 接入 Model 与绘制路径。

  3. 虚拟列表回收行(RetireListCell)缺少 #6543 的动画挂起与恢复处理。 park_retired_root 仅对回收行根节点执行 unparent()(或对 Screen 标记 concealed),其后代节点仍满足 registered && parent_view().is_some(),导致滚出视口的行内关键帧动画(例如旋转的 LoadingIndicator)在 transition::tick 中不会停止,持续驱动帧时钟空转;同时回收时未清理旧行的过渡状态(retired),重新插入时也未遍历子树恢复动画(resume)。请同步 #6543(810305ca6)在 mount.rs、navigation.rs、transition.rs 中的改动。

  4. 文件夹选择对话框未绑定宿主窗口,且与平台层已有实现重复。 direct2d_folder::choose 调用 dialog.Show(None) 时未传入宿主 HWND,对话框既非窗口模态,切换焦点时也可能掉到主窗口后方。nsh-platform-windows/src/file_requests.rs 已有独立 STA 线程、FOS_PICKFOLDERS 及 dialog.Show(Some(owner)) 的实现;建议参考 macOS 后端在 AppView 上暴露 choose_directory 复用该实现,并删除 direct2d_folder.rs 及 nsh-platform-windows 对外重导出的 pub use windows;。

  5. 窗口最小尺寸约束与最小化激活状态细节。 GPUI 与 AppKit 均将工作台最小内容尺寸限制为 MIN_SIZE = (640, 480)(侧边栏折叠下限),而 nsh-platform-windows 的 WM_GETMINMAXINFO 固定为 200 × 150,拖窄窗口会挤压破坏工作台布局;建议支持 AppOptions::min_size(用 AdjustWindowRectExForDpi 换算客户区逻辑尺寸),并将 MIN_SIZE 从 GPUI 专属的 window.rs 移入公共的 shell.rs。另外 WM_ACTIVATE 目前只检查了低 16 位 != WA_INACTIVE,未检查高 16 位最小化标志 HIWORD(wparam) == 0,窗口处于最小化状态时不应上报为前台活跃(WM_SIZE 的 SIZE_MINIMIZED 同理)。

  6. 移除产品目录内的基准测试文档及其 README 引用。 请从仓库移除 products/maka/desktop-shell/benchmarks/windows-2026-11-02.md,并删除 README.md 与 README_zh.md 中的相应链接;阶段性的对比数据保留在 PR 描述中即可。

  7. 同步最新 rust-preview 解决 CI 配置冲突。 除 #6611(移除 clippy suite)外,#6570 也在 scripts/ci/{suites,run,setup}.mjs 与 scripts/ci.test.mjs 中为 native-windows 接入了 windows-shell。请 rebase 最新目标分支,在不恢复 clippy 的前提下同时保留 windows-shell、windows-desktop 和 windows-nsh。

以上基于提交 fda49e30c 的源码审查,尚未进行 Windows 实机验证。

Preserve windows-shell, windows-desktop and windows-nsh without restoring the removed clippy suite.

Generated-by: Maka (OpenAI)
Wire guarded range replacement and styled atomic tokens into Windows inputs. Suspend recycled-row keyframes and resume retained subtrees, preserving phase while dropping stale transitions. Reuse owner-bound folder dialogs, apply the shared minimum client size and handle minimized activation. Remove the product benchmark report and retain measurements in the PR.

Generated-by: Maka (OpenAI)
@me2seeks

me2seeks commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Automated implementation update by Maka (OpenAI) for the follow-up review, pushed as 2be869eeb78a4a3471e384c2c0bb3238eb82fa0d.

@M4n5ter @jackwener

  1. Range replacement: Windows now dispatches Command::ReplaceRange to the native text model with focus/activation/editability, edit-count, expected text/selection, composition and UTF-16 boundary guards. It reports one undoable edit through the normal change/selection path. A real scoped Ctrl+V → JS replaceRange → native edit test also verifies undo.
  2. Input tokens: configuration reaches Model::set_tokens; Direct2D paints rounded token backgrounds and foreground overrides, excluding masked text and IME preedit. Native selection/deletion and directional movement respect atomic token boundaries. Coverage checks configured style spans and whole-skill deletion.
  3. Recycled-row animations: retirement clears the old assignment's transient transitions while retaining keyframes. A parked root suspends descendant callbacks; normal, screen, modal and header reinsertion resumes the retained subtree. The controlled-clock test covers ordinary rows and screens in a real native stack, stale layout-track removal and retained animation phase after reattachment.
  4. Folder chooser: AppView::choose_directory reuses file_requests' dedicated STA/FOS_PICKFOLDERS path with the surface HWND as owner. Cancellation and errors remain distinct; completion returns to the UI thread. The duplicate desktop chooser and pub use windows are removed.
  5. Window constraints/activation: shared shell::MIN_SIZE is used by the desktop backends; Windows AppOptions::min_size converts logical client size using current DPI/window styles and AdjustWindowRectExForDpi. Minimized WM_ACTIVATE and WM_SIZE do not publish foreground-active. Tests cover 96/144/192 DPI and minimized activation flags.
  6. Benchmark report: deleted the product report and both README links. Historical measurements and their limits now live directly in the PR description; no new benchmark run is claimed.
  7. Target integration: merged current rust-preview 8fd3a365c in deb534c53, resolving the four CI configuration conflicts. windows-shell, windows-desktop and windows-nsh are retained without restoring clippy. All 14 routing/setup behavior tests pass. GitHub reports the pushed head MERGEABLE.

Local verification: 158 native tests passed, strict native Clippy passed, release/dev/gallery API consumers checked, and 3 default desktop tests passed. Temporarily disabling the three relevant production seams makes exactly their three regression tests fail (155 others pass); sources were restored and the full suite passed again. Builds remained two-core/BelowNormal, two compiler jobs and single-threaded tests.

Exact-head CI is running. Interactive folder-dialog focus/cancellation and pixel-level token rendering have not been manually validated; this update does not claim independent approval. Please re-review the resulting head.

@github-actions github-actions Bot added effort/XL Under 2500 readable lines and removed effort/M Under 500 readable lines labels Nov 4, 2026

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I re-reviewed exact head 2be869eeb78a4a3471e384c2c0bb3238eb82fa0d against current rust-preview 8fd3a365c82d3c13459283937040056e4d467848. The merge is clean, and the seven source findings reported on fda49e30c are closed: guarded native range replacement, styled atomic input tokens, recycled-row animation suspension/resumption, owner-bound folder selection, minimum-size/minimized-activation handling, benchmark removal, and the CI merge resolution are all present. I found no new product-code blocker in this follow-up.

I cannot approve this head because its exact-head CI is not successful and, more importantly, the Windows job never reaches the suites that validate this PR. native-windows finishes the Computer Use compilation and then fails at scripts/ci/run.mjs:67:45 while constructing the Git Bash fallback from an undefined env.ProgramFiles. This path-construction defect is inherited from current rust-preview, whose own Windows job fails the same way, but on this PR it stops windows-shell before execution and leaves windows-desktop and windows-nsh uncompiled and untested. The author's reported 158 Windows tests therefore do not yet have exact-head hosted verification.

The other failed shard is root-tests (cli, slice:2/6), where terminal::components::activity_resumes_following_after_reading_an_expanded_tool timed out. That test and its product path are unchanged by this PR, and the same test passed in 2.080 seconds on current-base run 41757837601; this looks like an unrelated intermittent failure, but the exact-head check still needs a successful rerun. A local exact rerun could not finish because this host lacks Xcode's Metal shader compiler.

Please fix or integrate the ProgramFiles CI-path correction so the three Windows suites actually compile and run, then rerun the failed exact-head checks. Locally, git diff --check, stable Rust workspace formatting, all 14 CI routing tests, CI-script syntax checks, and the 11 focused NSH text-edit tests pass. A macOS cross-check of the Windows crate was inconclusive because the local host lacks the MSVC C headers required by ring.


Automated review notice: This comment was posted by an automated review agent operated by jackwener. It is not an independent human review and does not replace one.

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rechecked exact head 2be869eeb78a4a3471e384c2c0bb3238eb82fa0d against the current rust-preview head 561fe244af3f917d0850ec212e799c4cf92abc58.

The target branch now contains #6619's ProgramFiles / PROGRAMFILES compatibility fix, so my previous statement that current rust-preview itself still failed during Windows preparation is historical and no longer describes the current target. The fresh merge is clean. Its result retains windows-shell, windows-desktop, and windows-nsh without restoring clippy, and also retains the new environment-variable fallback test. The current target's run 41777863213 completed all 40 jobs successfully, including native-windows and the CLI shard that previously timed out. On the actual merge result, git diff --check, all 14 CI routing tests, and the CI-script syntax checks pass.

I still cannot approve this PR yet because its attached exact-head checks are the older failed run 41768826034. The target branch's successful Windows job validates windows-shell, but it does not contain this PR's windows-desktop and windows-nsh suites, so it cannot substitute for a hosted run of the current merge result. Please update the PR branch to the current target or otherwise trigger a fresh current-base merge-result run. If those exact-head checks succeed, the remaining CI gate will be closed.


Automated review notice: This comment was posted by an automated review agent operated by jackwener. It is not an independent human review and does not replace one.

Integrate rust-preview 561fe24 (#6619), including the inherited Windows PROGRAMFILES path failure and terminal activity end-follow fix. Preserve this PR Windows desktop/native CI coverage.

Generated-by: Maka (OpenAI)
@me2seeks
me2seeks merged commit 7345af5 into rust-preview Nov 4, 2026
41 checks passed
@me2seeks
me2seeks deleted the feat/windows-direct2d branch November 4, 2026 06:47
M4n5ter added a commit that referenced this pull request Nov 4, 2026
Resolve merge conflicts with #6566 and #6618 across installation tool
descriptions, generated SDK contracts and multi-platform notice digests,
and migrate newly merged delegation and queue authorship tests to
BackendPreference.

Generated-by: Antigravity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/XL Under 2500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants