Skip to content

perf(desktop): harden GPUI and Tauri releases across all platforms - #2146

Merged
richiemcilroy merged 34 commits into
mainfrom
codex/desktop-cross-platform-release-validation
Aug 26, 2026
Merged

perf(desktop): harden GPUI and Tauri releases across all platforms#2146
richiemcilroy merged 34 commits into
mainfrom
codex/desktop-cross-platform-release-validation

Conversation

@richiemcilroy

@richiemcilroy richiemcilroy commented Aug 26, 2026

Copy link
Copy Markdown
Member

Summary

  • Package Tauri and GPUI together with reproducible CLI, muxer, exporter, updater and native-library handling on macOS, Windows and Linux.
  • Protect bidirectional Experimental switching, single-instance handoffs, active work, deep links, recovery, permissions, onboarding and authenticated Instant uploads.
  • Reduce audio decoding, decoder-cache growth, render allocations, camera-effects work, Windows camera leaks, hidden-window polling and redundant full-frame copies.
  • Fix Linux PipeWire microphone/system-audio isolation, pure-Wayland startup and screenshot privacy, notifications, package dependencies and verified NVIDIA hardware encoding with software fallback.
  • Include the microphone/PipeWire behavior from fix: use BufferSize::Default for PipeWire ALSA devices on Linux #2142, the independently tested extension camera-preview ICE recovery, and the later shared 1x clip-mute fix.
  • Run the new editor-audio regressions on every platform and provide a stable Xvfb display for Linux GPUI tests.

Validation status

Latest source: a32c5595de37872572fdcc518d94deaca87f489a.

The latest Greptile review is 5/5. All A/V jobs have passed, including 27/27 editor-audio tests on each platform. Windows and Linux fully executed all 41 scenario records each; macOS fully executed 40, with one random 450-fps noise-video leg skipped after the runner stalled 1.18 seconds (its audio leg passed). The skipped portion is not counted as a passed test. Each platform also deliberately ignored three pre-existing manual tests; these are excluded from passing totals.

All desktop CI jobs passed: optimized sidecars, GPUI compilation, final Tauri application builds on all three platforms, and both strict workspace/all-features Clippy jobs. GPUI tests passed 577/577 on macOS ARM64, 571/571 on Windows x86-64, and 574/574 on Linux x86-64, with none failed or ignored. The CI application builds are development-profile, not newly production-signed installers. GitHub shows 25 successful checks, no failed or pending checks, and no unresolved review threads. Human review remains required; this is not a claim of perfect coverage or final production-release approval.

Optimized-artifact and real-world evidence

The Windows and Linux installers below were tested before the later audio-only fix. The separate encoded-media check validates that fix, while current CI validates the complete committed source. Do not interpret the installer hashes as containing the later fix.

Environment Verified runtime evidence
Windows NVIDIA + AMD Installed the same optimized NSIS artifact on both vendors and byte-verified all five executables and 12 DLLs. Exercised Tauri/GPUI Studio and authenticated Instant, display/area/camera workflows, microphone and system audio, scrubbing, complex playback, hardware export and four Experimental switch/cancel paths. The final AMD Tauri camera repeat has the limitation noted below.
Linux NVIDIA Launched the extracted optimized five-executable Debian-package payload; verified actual Wayland Tauri UI, 1080p60 recording, NVENC engine use, export retaining all 481 video frames and 376 AAC packets, and all four Experimental switch/cancel paths. This is payload runtime proof, not proof of a package-manager installation on this GPU host.
Linux AMD Installed the exact final Debian package through the package manager; verified installed Tauri/GPUI checksums and cap 0.6.0 install ok installed. Actual Radeon-backed Wayland with DISPLAY unset: Tauri recorded screen at 58.95 fps and webcam at 720p30 without drops, with separate 443-Hz microphone and 997-Hz system tracks. GPUI Studio/Instant ran around 59.6 fps without drops, including area pause/resume and camera-only recording. Verified visible playback, rapid scrubbing, exports, screenshot privacy, real D-Bus notifications and a valid native image clipboard.
macOS Earlier native snapshot: playback around 59.6-60 fps, plain/complex export equivalence and authenticated Instant behavior. Current CI checks later source changes; it is not a fresh visible-UI or uncontended performance benchmark.

Authenticated Instant tests used a controlled authenticated test endpoint, not the production backend. Linux AMD Tauri produced 33 real requests, 20 PUTs, 36.25 MB of progressive media and exactly one completion.

Windows NSIS SHA-256: e16de5a49e6c76949e976d583342d4cba944af5e20982395b24a801d84f598c6.

Linux Debian package SHA-256: d88e364c1fff670cbc816be3bc130279804ccdf64dc6cd5b0f4c32ea3901343f.

Measured performance

  • Linux NVIDIA capture: approximately 66% to 50% of one CPU core, with 15-16% hardware encoder utilization. An 8.02-second recording exported in 4.07 seconds versus 5.12 seconds before, approximately 1.97x real time.
  • Windows AMD Studio: 54.55% to 50.40% of one CPU core, a 7.6% reduction while preserving valid 60-fps output.
  • Linux hardware encoding: approximately 63% less measured CPU time than software encoding.
  • FFmpeg frame-retention microbenchmark: 439.515 to 0.115 microseconds per frame. This is not a whole-application speedup claim. The calculated avoided-copy bandwidth for 32-bit frames is approximately 949 MiB/s at 1080p60 and 3.7 GiB/s at 4K60 when both fast paths apply; PipeWire frame ownership requires matching pixel format and dimensions. These figures are not universal measured savings.

Later 1x clip-mute fix: actual MP4 proof

Exported two real recording-derived projects, each with three contiguous two-second clips and only the middle clip muted, both with and without independent music. Compared the earlier packaged CLI against a newly rebuilt CLI containing the exact audio fix on Linux NVIDIA.

All four outputs are valid six-second, 180-frame, 1280x720 H.264/AAC files using actual Tesla T4/Vulkan and NVENC. Independently decoded AAC measurements, using one-second interior windows in each two-second clip, reproduce the old bug and confirm the fix:

  • No music: middle-cut source amplitude falls from 0.35348 to zero, with exact zero RMS.
  • With music: muted source amplitude falls to 0.000000185 while the independent music remains at 0.09896.
  • Neighboring clips remain audible with source amplitudes changing by less than 0.02%.

The rebuilt CLI is debug-profile: this proves encoded-output correctness, not a new signed installer or a release-profile speed comparison. Normal Linux Cargo execution and current CI on all three platforms passed all 27 editor-audio tests with no failures or ignored tests.

Canonical installed Linux paths and real switching

A separate final AMD check verified the installed desktop entry, clean package verification, all five executable hashes and native dependency lookup without development-library overrides. Actual Tauri and GPUI processes ran from /usr/bin, loaded FFmpeg from /usr/lib/cap, selected the Radeon GPU and displayed native Wayland windows with no DISPLAY, CAP_GPUI_BIN or CAP_TAURI_BIN overrides.

All four actual Experimental flows passed: forward cancel/confirm and reverse cancel/confirm. Cancel preserved the original process and preference; completed countdowns launched the correct installed sibling and shut down the prior app. Screenshots, process executable paths, hashes, preferences and logs were checked.

All apps ran as the existing ubuntu user. The switch fixture retained the documented vblank fallback, an inherited WebKit sandbox-disabling flag and a hook that only opened GPUI settings. A separate final ordinary-user Tauri launch passed with the sandbox-disabling flag and settings hook absent, retaining only the vblank fallback. No users, permissions or application source were changed. This is installed-path verification of the original optimized package, not another performance matrix or a rebuilt installer containing the later audio fix.

Linux GPUI fixture stability

The intermittent display-listing failure was traced to Xvfb resetting when its last client disconnected, independently reproduced with a root-window property probe. Adding -noreset changes only the CI display fixture:

  • Original fixture: 17 failures in 30 full-suite runs, plus 3 failures in 300 focused repetitions.
  • Corrected fixture: 100/100 complete 574-test suites and 500/500 focused repetitions passed.
  • No test assertions were changed, filtered or retried; all 57,400 full-suite test executions passed.

Supporting automated checks include 174 desktop Vitest tests, 18 extension tests, packaging-script tests, real NVENC tests, Wayland privacy checks and shared-buffer lifetime regressions.

Release boundaries

  • Final production-trusted signing, Apple notarization and Windows SignPath approval still require the protected release workflow. Earlier notarized releases and validation-only signatures do not prove trust for this commit.
  • Changing audio settings during active playback still requires pause/play in both apps because of a pre-existing shared configuration-snapshot limitation.
  • No physical webcam hardware was exercised; tests used real OS-level virtual camera streams.
  • The latest optimized macOS UI binary predates the final frame-reference/import and audio refinements; current Apple Silicon CI covers compilation and tests, not new visible runtime measurements or a fresh Intel build.
  • Final Windows AMD Tauri camera-only/pause-resume replay could not be automated through the transparent overlay because production correctly rejects debug-only control links. The workflow passed on an earlier optimized installer, the camera path is unchanged, and final GPUI camera/microphone recording passed.
  • Wayland selected-window screenshots intentionally fail closed when the portal cannot safely isolate the target. Multi-monitor selection remains compositor/portal-dependent.
  • The AMD nested test compositor reports zero-Hz refresh and uses WebKit's vblank timer fallback; rendering remains genuine Radeon-backed native Wayland.
  • All four AWS GPU test instances and the separate camera-test VM are independently confirmed stopped at their original sizes. Human review remains required; this PR has not been merged or deployed.

Greptile Summary

The PR hardens cross-platform GPUI and Tauri packaging while reducing work throughout recording, playback, rendering, and import paths.

  • Bundles and validates desktop executables, sidecars, runtime libraries, signatures, and updater artifacts across macOS, Windows, and Linux.
  • Strengthens application switching, lifecycle handling, uploads, deep links, permissions, and recovery flows.
  • Optimizes media capture, decoding, rendering, camera effects, and hardware encoding with expanded platform regression coverage.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/desktop-gpui/patches/zed-gpui.patch Extends patched GPUI surface rendering for source-UV regions, corner radii, and platform texture handling.
.github/workflows/desktop-release.yml Adds platform-specific validation of packaged binaries, runtime dependencies, signing, and updater artifacts.
apps/desktop-gpui/src/main.rs Expands native desktop initialization and cross-platform application lifecycle behavior.
crates/recording/src/capture_pipeline.rs Refines recording-frame ownership and capture-pipeline processing.
crates/enc-ffmpeg/src/video/h264.rs Updates FFmpeg H.264 encoding and hardware-fallback behavior.

Reviews (5): Last reviewed commit: "test(ci): run editor audio regressions o..." | Re-trigger Greptile

Context used:

  • Context used - AGENTS.md (source)

@superagent-security

Copy link
Copy Markdown

Manage your Superagent protection

Superagent has paused scans for this repository because this unlinked GitHub App installation has used all three included PR scans.

You have 0 of 3 included PR scans remaining.

Create a free account to continue protection, manage scan settings, review security history, and control which repositories are protected.

@richiemcilroy

Copy link
Copy Markdown
Member Author

hey @greptileai, please re-review the PR

@socket-security

socket-security Bot commented Aug 26, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​tauri-apps/​cli@​2.8.4991008897100

View full report

Comment thread apps/desktop-gpui/patches/zed-gpui.patch Outdated
@richiemcilroy

Copy link
Copy Markdown
Member Author

hey @greptileai, please re-review the PR

@richiemcilroy

Copy link
Copy Markdown
Member Author

hey @greptileai, please re-review the PR

@richiemcilroy

Copy link
Copy Markdown
Member Author

hey @greptileai, please re-review the PR

@richiemcilroy

Copy link
Copy Markdown
Member Author

hey @greptileai, please re-review the PR

@richiemcilroy
richiemcilroy merged commit 98b0e68 into main Aug 26, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant