budget-app/docs/DESKTOP_VALIDATION.md

5.6 KiB

Desktop capture validation — 2026-10-27

Executed results

Validated the real two-member workspace using temporary Rust/Cargo 1.99.1, Linux native libraries, Xvfb, private D-Bus sessions and the actual Makepad app. The versioned docs/Cargo.lock is the lock used by the final --locked gates. No replacement/mock application or OCR injection hook was used.

Gate Result
Application library tests 96 passed
Native library tests, including cancellation/late-result rejection 6 passed
Application model integration tests 7 passed
Desktop review, exact money, quote suggestion, failed-save rollback and idempotency 5 passed
Pixel-buffer tests plus opt-in real X11 capture → offline OCR 4 passed
Embedded offline OCR tests 3 passed
Native StatusNotifier/DBusMenu transport, four commands and drop/recreate 1 passed
Real Makepad release UI tests 5 passed
Application/native Python packaging and layout contracts 4 passed
Existing Android Java extraction tests 12 passed
Linux native cargo build --locked Passed
Linux cargo run --locked, isolated native display, 15 seconds Stayed alive; no app startup/script errors
Whole app cargo check -p budget --target x86_64-pc-windows-gnu --locked Passed
Whole app cargo check -p budget --target aarch64-apple-darwin --locked Passed
New Rust source formatting, shell syntax, Git whitespace Passed

127 Rust tests + 4 Python tests + 12 Java tests passed. The opt-in live tests were actually enabled, not merely counted after an environment-based early return.

The full desktop UI test starts a synthetic product window in an isolated X11 session, clicks the actual consent button, waits for real screenshot OCR, edits all review fields, selects an expense category/item and clicks Confirm. It observes the actual durable-save success state. Other UI tests verify opening capture does not capture, the discard button responds without capturing, the History capture button routes correctly, and the existing history date checks still work.

The D-Bus transport test calls the real tray menu interface and checks Open, Capture, Minimize and Quit actions and wake notifications, then repeats after recreating the tray. This tests integration, not real panel icon visibility.

Fixes caught during validation

  • Fixed the new UI's Makepad wrapping enum (Words, not Word). The clean runner now rejects app startup/script errors, not only a process that stays alive.
  • Updated the former desktop-unsupported UI expectation to the new workflow.
  • Bounded the OCR excerpt's display height so review controls remain usable.
  • Fixed menu-handler lifetime routing: muda's handler is a once-only cell; clearing an owned routing sink handles teardown/recreation correctly.
  • Avoided macOS's fullscreen-toggle restore operation; use deminiaturization plus main-thread AppKit activation instead.
  • Windows checking caught duplicate derived/manual PartialEq implementations in the Makepad fork. A minimal two-line fix was committed on its existing branch: 9965c04940358ad664f190ea92f7b2c0c09fb1b4, based on 3265305. MAKEPAD_DESKTOP_COMPILE_FIX.patch is included in this source bundle.

Existing Makepad deprecation/FFI-signature warnings remain. The headless Linux launch reports unavailable PulseAudio and falls back to ALSA; that is not a capture or application startup failure.

What is NOT validated or complete

  • Windows/macOS: cross-target type checks are not native executable linking, installers, signing/notarization, TCC/permission testing or runtime tray/capture testing. Those require their actual native OS/SDK environments.
  • Linux desktop shell: Xvfb has no normal desktop panel/window manager. Real panel visibility, window-manager minimize/raise behavior and multi-monitor use still need desktop acceptance testing.
  • Wayland: the fresh portal/PipeWire backend compiles, but no real compositor permission/denial/cancellation/session-shutdown test ran. The pinned Makepad backend lacks activation-token integration, so automatic minimization is disabled; returning/raising the window requires the OS application switcher.
  • HarmonyOS PC: blocked pending the Huawei PC SDK/API version and device or simulator. No fake adapter or generic OHOS build is presented as PC tray support.
  • Android: native Java and manifest/layout regression gates passed. The APK was not rebuilt for this desktop revision; the earlier full APK validation remains historical and is documented separately.

Reproduction and cleanup

See DESKTOP_CAPTURE.md for native packages, workflow, the required Makepad revision/patch and app/tests/run-clean.sh. The owner-local runner includes the new suites; LIVE_X11_CAPTURE=1 opts into isolated capture, D-Bus and full UI gates.

Validation used one temporary environment for iterative builds, with one build job on this 2 GB host. Temporary swap was used to complete the large AppKit metadata check after an initial memory kill. The swap was disabled and removed, and the temporary toolchains, registry, build products and test homes were removed. No global Rust installation was left behind.

Final evidence logs are retained in the surrounding workspace: branch-cleanup/desktop-locked-final.log, desktop-ui-final-locked.log, desktop-windows-check.log, desktop-macos-check.log, desktop-native-smoke-final.log and desktop-cleanup.log. The Makepad fix is also preserved in branch-cleanup/makepad-desktop-fix.bundle (prerequisite: 3265305).

No new branches were created. These desktop changes and the new Makepad fix were not pushed; the prior published Budget revision remains unchanged.