Skip to main content

Native Settings backdrop and blur delivery

This delivery starts from 283c3f595cc1777ae102dc3c4884029ecda6a433. Settings now covers the whole workbench below the titlebar with a 30% black overlay and a live Gaussian background blur. The dialog and window controls remain sharp. Build information moves to the first General card, followed by Completion sound, Input request sound, and Navigation density.

ui/settings_modal.rs contains the crate-private production modal host, geometry, focus ownership, and transition state. The application continues to own the preference values, search, persistence, and control callbacks. Stable Settings element IDs are preserved.

The old absolute backdrop was inside a normal-flow wrapper without a height. The host now gives the backdrop part explicit viewport width and height, then positions the painted/hit-tested region below the titlebar. A click in that region dismisses Settings and is consumed. The surface blocks propagation of internal clicks and scrolling. The base native Dialog retains Escape handling and its focus trap; Ctrl+, toggles the application-owned Settings state.

The phases are Closed, Opening, Open, and Closing. A 100 ms ease-out cubic transition controls panel opacity, a 4-to-0 logical pixel vertical offset, 0-to-30% darkness, and blur blend. Closing stays mounted and blocks background input. Focus returns once after closing completes. Repeated closes retain the original timeline. Reopening reverses from the current progress and keeps the original external focus owner. Another top-level overlay retires Settings immediately and discards its pending focus restoration. Reduced motion settles immediately while preserving static blur and dimming.

General search uses the same new row order and scroll indices as the cards. The existing dimensions, responsive stacking, colors, preference storage, and build-information content are retained. The publication lint pass expresses the viewport limits with clamp and gives the shared dismissal callback a private type alias.

Ordered GPU backdrop filtering

Both local renderer crates use Zed commit cc053a4a6fa2fd0e8793201ed9099466af1be0b1. The new Windows path patch preserves the dependency versions and Apache license. The backend's GPUI dependency points to the existing local core; both crates remain excluded from workspace membership. Existing dependency versions are retained. Native tests activate the existing GPUI test-support feature and its optional test dependencies.

Window::paint_backdrop_blur(bounds, sigma, opacity) records a Windows-only scene barrier. Sorting and batching operate independently on either side of each barrier. Cached paint replay inserts the command at the same semantic position, with fresh segment indices, so cached foreground primitives cannot move into the captured background.

At that command, Direct3D copies the already-painted, bounded BGRA region into a reusable source texture. A horizontal Gaussian writes the second texture; a vertical Gaussian blends the result with the original source directly into the original target. Both intermediate textures are single-sample BGRA8 and are reused across frames and reopenings. Resize invalidates textures; device recovery invalidates all blur resources. Closed Settings emits no filter pass.

The Gaussian uses standard deviation 2 logical pixels multiplied by DPI, normalized weights, and a three-standard-deviation radius. Integer texel loads clamp at the copied region's edges. All premultiplied channels receive the same filter. The renderer restores target/depth bindings, viewports, blend state, topology, shaders, and the shader resources/constants it changes.

The implementation follows the CSS Gaussian blur definition and the Direct3D region-copy requirements. The blur shaders participate in debug compilation and optimized embedded shader builds. A resource failure retains dimming and dismissal, logs one diagnostic, and permits retry after resource invalidation. Normal acceptance requires the blur to work. No production path performs CPU image readback.

Unsloth's local dialog at 984402b9a is a behavior reference only. Its reference checkout and the Comet reference remain unchanged. This increment introduces no new user setting, persistence migration, provider protocol, or transcript behavior.

Validation evidence

Automated checks

  • Desktop library suite: 537 passed, zero failures, five native harnesses intentionally excluded from the default run.
  • Settings/source contract suite: three passed. Discovery/navigation contract suite: five passed. Search order, scroll indices, stable IDs, responsive geometry, and existing preference behavior remain covered.
  • New transition tests cover exact 100 ms endpoints, cubic intermediate values, continuous reversal, repeated-close idempotence, reduced motion, and retirement.
  • The scene test checks two ordered filter barriers within an active layer, where an ordinary shadow/quad sort would reorder the capture. Replay and clear are checked as well.
  • The new native Settings harness passes on Direct3D at 96, 144, and 192 DPI. It uses the production modal host inside the production GPUI component Root.
  • All four existing native harnesses also pass: message rail on Native Chat, Codex, DSH Chat, and DSH Trajectory at all three scales; auto-scroll; width reflow preserving a nonzero row offset; and workbench navigation animation.
  • cargo fmt --all --check, explicit Rust formatting checks on the adapted renderer files, and git diff --check pass. Both reference checkouts are clean; all 18 copied, unchanged backend files match upstream byte for byte.
  • cargo check -p exepert-desktop --tests --locked --offline passes. The lockfile retains every existing registry package version and one local identity each for gpui and gpui_windows.
  • pnpm --dir docs-site exec docusaurus build passes, including this delivery page and its sidebar entry.
  • Publication checks also pass strict Windows Clippy (--workspace --all-targets --target x86_64-pc-windows-msvc --locked --offline -- -D warnings) and documentation TypeScript checking (pnpm --dir docs-site typecheck).
  • After the lint cleanup, the refreshed optimized build passes all 22 focused Settings tests and a separate rerun of the native Direct3D Settings harness.

The native harness renders the production host over deterministic backgrounds and reads actual Direct3D pixels using GPUI's test-only render_to_image hook. It checks coverage, dimming, blur, foreground sharpness, and live backgrounds with cached modal replay. It also exercises input, focus, lifecycle, DPI, resource recreation, failure fallback, stable allocations, and no closed-state blur work. CPU submission and GPU timestamp queries measure frames independently of CPU image readback and presentation waits.

Input coverage includes all four outside regions, consumed background clicks, internal controls and blank panel space, scrolling, Escape, the close button, Ctrl+,, and Tab cycling between real focusable controls. Lifecycle checks include mounted/input-blocking closing, rapid reversal, one focus restoration, and cancellation of queued focus restoration when another overlay replaces Settings. Narrow 500 by 420 logical pixel windows and resize during opening are covered at all three scales. The harness dispatches native DPI changes to its own window without changing Windows display preferences.

Native pixel and resource measurements

The flat background channel value falls from 180 to 126: exactly 30% darkening at 8-bit precision. Blur strength is compared against an independent normalized Gaussian reference with a tolerance of three channel values. Foreground text is pixel-identical with blur enabled and disabled. A changing background remains visible through cached modal replay without rerendering the modal entity.

Window scaleDimmed stripe contrast without blurContrast with blur
100% / 96 DPI17962
150% / 144 DPI17965
200% / 192 DPI17965

Contrast is the measured bright-minus-dark channel difference in the fixture. The half-progress frame also verifies 15% darkness, a 50% blur blend, and a two logical pixel panel offset. The titlebar and foreground remain unaffected.

After warm-up, consecutive frames and reopenings reuse the same two blur textures. Resize and the shared device-resource invalidation path recreate resources and then stabilize. Closing emits zero blur passes. An injected allocation failure retains dimming and outside-click dismissal, emits exactly one diagnostic, and recovers after invalidation. This validates the recovery resource path; it does not physically remove the graphics device.

Optimized build and frame timings

The optimized Windows build passed on 2026-09-03 with Rust 1.96.0-x86_64-pc-windows-msvc, --release --locked --offline. This exercises the embedded shader path as well as ordinary application compilation. The optimized native test executable also passed the complete Settings harness.

The following final run used a 1280 by 760 logical pixel fixture on Windows 11 Home 10.0.22631. Each condition records 60 frames after five warm-up frames. CPU submission and GPU timestamp durations cover the whole fixture scene; CPU image capture and presentation waits are excluded. The smoke-test app had exited before this run. These are local renderer measurements, not full-app input-to-display latency measurements. All values below are milliseconds, shown as median / p95.

ScaleCPU, blur onCPU, blur offGPU, blur onGPU, blur off
100%0.138 / 0.2210.091 / 0.1610.610 / 1.4810.160 / 0.183
150%0.213 / 0.3660.097 / 0.1601.444 / 2.7170.265 / 0.302
200%0.238 / 0.3880.109 / 0.2552.245 / 3.8850.384 / 0.437

Debug measurements are retained separately in debug-results.txt; the table above comes from release-results.txt. Native pixel screenshots and both reports are local, ignored build artifacts under desktop/target/settings-modal-evidence/.

The production executable is desktop/target/x86_64-pc-windows-msvc/release/exepert-desktop.exe, 40,619,008 bytes. Its SHA-256 is 4931093058ec703c354ea2feb7e950d6309e910db032f8d90d1f701c72986194. This executable was built and tested before the source commit, so its build label records the base Git commit. The hash identifies that validated local artifact; subsequent builds embed the commit checked out when they are built.

Release application smoke test

The actual optimized EXEPERT window was launched and inspected with native Windows input and screenshots at the current 125% display scale. Its process path matched the release artifact, its title was EXEPERT, and Windows reported Responding = True.

Observed behavior, separate from automated harness coverage:

  • Settings displays the full dimmed, blurred background in Brain and Chat. The titlebar and Settings panel remain sharp.
  • Build information is the first General card. Searching for build and selecting its result highlights that first card with the existing content.
  • A click on empty space inside Settings leaves it open. Clicking outside over the underlying Auditory preset dismisses Settings while the active preset remains Visual, confirming the click does not activate that background control.
  • Escape and the close button dismiss Settings, and the Chat composer regains its visible focus. Ctrl+, reopens the modal.
  • Maximize and Restore remain usable with Settings open. The modal and backdrop adapt to both sizes. The original window size was restored afterward.

The native lifecycle tests establish transition duration and reversal behavior; the smoke test confirms the resulting appearance and interactions in the full application. Existing sound preferences were left unchanged.

Complete change inventory

The increment changes 44 paths. The Windows backend includes 18 unchanged upstream source files, seven adapted upstream files (including manifest and license material), and three new files. Both vendored license placeholders are resolved to the full upstream Apache license text.

PathChange
THIRD_PARTY_NOTICES.mdRenderer provenance, licenses, and behavior-reference attribution
desktop/Cargo.tomlWindows backend path patch; retain a single application workspace member
desktop/Cargo.lockLocal backend identity and optional test-support dependency closure; existing versions unchanged
desktop/README.mdSettings behavior, native test command, and delivery link
desktop/exepert-desktop/Cargo.tomlWindows-only development dependency enabling native renderer tests
desktop/exepert-desktop/src/app.rsModal lifecycle integration, overlay retirement, search/card order, and ordering assertions
desktop/exepert-desktop/src/ui/mod.rsCrate-private modal module
desktop/exepert-desktop/src/ui/settings_modal.rsProduction host, geometry, transition state, focus lifecycle, and unit tests
desktop/exepert-desktop/src/ui/settings_modal/native_tests.rsProduction-host native pixel, input, lifecycle, DPI, cached replay, resource, and timing tests
desktop/exepert-desktop/tests/settings_sound_model_contract.rsUpdated native-modal and stable-ID contracts
desktop/vendor/gpui/LICENSE-APACHEFull upstream license replacing the Windows checkout's symlink placeholder
desktop/vendor/gpui/src/platform.rsDefault test-only Windows renderer hooks
desktop/vendor/gpui/src/scene.rsOrdered blur commands, segmented sorting/batching/replay, and test diagnostic types
desktop/vendor/gpui/src/window.rsWindows paint API and native test hook forwarding
desktop/vendor/gpui_windows/Cargo.tomlExpanded upstream manifest and local GPUI dependency
desktop/vendor/gpui_windows/LICENSE-APACHEFull upstream Apache license
desktop/vendor/gpui_windows/README.EXEPERT.mdPinned fork provenance and local change summary
desktop/vendor/gpui_windows/build.rsOptimized blur shader compilation and include tracking
desktop/vendor/gpui_windows/src/backdrop_blur.rsGPU resources, Gaussian weights, clipped copy, separable passes, binding restoration
desktop/vendor/gpui_windows/src/backdrop_blur.hlslHorizontal and vertical Gaussian/composite shaders
desktop/vendor/gpui_windows/src/directx_renderer.rsOrdered filter dispatch, recovery/fallback, native capture, diagnostics, and timing
desktop/vendor/gpui_windows/src/gpui_windows.rsRegisters the backdrop module
desktop/vendor/gpui_windows/src/shaders.hlslIncludes the blur shader entry points
desktop/vendor/gpui_windows/src/window.rsWindows platform implementation of the test hooks
desktop/vendor/gpui_windows/src/alpha_correction.hlslUnchanged upstream source
desktop/vendor/gpui_windows/src/clipboard.rsUnchanged upstream source
desktop/vendor/gpui_windows/src/color_text_raster.hlslUnchanged upstream source
desktop/vendor/gpui_windows/src/destination_list.rsUnchanged upstream source
desktop/vendor/gpui_windows/src/direct_manipulation.rsUnchanged upstream source
desktop/vendor/gpui_windows/src/direct_write.rsUnchanged upstream source
desktop/vendor/gpui_windows/src/directx_atlas.rsUnchanged upstream source
desktop/vendor/gpui_windows/src/directx_devices.rsUnchanged upstream source
desktop/vendor/gpui_windows/src/dispatcher.rsUnchanged upstream source
desktop/vendor/gpui_windows/src/display.rsUnchanged upstream source
desktop/vendor/gpui_windows/src/events.rsUnchanged upstream source
desktop/vendor/gpui_windows/src/keyboard.rsUnchanged upstream source
desktop/vendor/gpui_windows/src/platform.rsUnchanged upstream source
desktop/vendor/gpui_windows/src/system_notifications.rsUnchanged upstream source
desktop/vendor/gpui_windows/src/system_settings.rsUnchanged upstream source
desktop/vendor/gpui_windows/src/util.rsUnchanged upstream source
desktop/vendor/gpui_windows/src/vsync.rsUnchanged upstream source
desktop/vendor/gpui_windows/src/wrapper.rsUnchanged upstream source
docs-site/docs/architecture/native-settings-backdrop-blur-delivery.mdArchitecture, full inventory, reproduction, and measured evidence
docs-site/sidebars.tsDelivery-document navigation entry

Git delivery

The documented 44-path source and documentation change set is delivered through codex/native-settings-backdrop-blur with a normal merge into main. Both the feature commit and merge commit carry the contributor's DCO sign-off. Publication verification compares the feature branch and main hashes with GitHub and checks that the local working tree is clean.

The optimized executable, native screenshots, and timing reports remain local build artifacts under desktop/target; their measured results and executable hash are recorded above. The two reference checkouts are unchanged.

Build and run

Run from C:\xampp\htdocs\exepert-prod\MASTER-exe\desktop:

cargo +1.96.0-x86_64-pc-windows-msvc build -p exepert-desktop --target x86_64-pc-windows-msvc --release --locked
Test-Path '.\target\x86_64-pc-windows-msvc\release\exepert-desktop.exe'
& '.\target\x86_64-pc-windows-msvc\release\exepert-desktop.exe'

Open Settings with Ctrl+, or the Settings button in the activity rail.