Skip to content

Preview indicator window intercepts clicks when visually empty/invisible #577

Description

@czxtm

Summary

The preview-indicator Tauri window can sit above the main nixmac window while appearing empty/invisible, so mouse clicks intended for the main UI (e.g. Run build) never reach the webview. Accessibility / CUA targeting of the main window reports success, but React onClick does not fire until the Preview window is moved aside or the main window is raised above it.

Repro (Mac Studio, #565 debug build in /Applications)

  1. Launch com.darkmatter.nixmac.dev with both the main window and the Preview indicator present (System Events lists windows: Preview, nixmac).
  2. Onboarding Step 7 — First Build is visible; Run build is in the AX tree and can be focused.
  3. Click Run build with the mouse (or CUA click / HID click) while Preview is stacked such that it covers the button region — click has no effect; UI stays idle (Logs will appear here once the build starts.).
  4. Raise/move the main window above Preview (or minimize Preview) and click again — rebuild starts (Building…, darwin-rebuild build --flake …).

Observed while driving onboarding via Codex Computer Use against /Applications/nixmac.app (debug bundle). Accidental screen-coordinate clicks also hit the wrong chrome (e.g. reset toward Permissions) because the invisible Preview layer eats events.

Expected

  • Preview indicator should not accept hit-testing when it has nothing to show (or should use ignoresMouseEvents / non-activating panel behavior when transparent/empty).
  • Alternatively: keep Preview always below the main window, or only create/show it when there is a non-empty preview delta to display.

Actual

Preview window remains in the window list (Window: "Preview", URL tauri://localhost/preview-indicator.html) and can be the frontmost / hit-test target while visually blank, blocking interaction with the main onboarding UI underneath.

Likely area

apps/native/src-tauri/src/peek.rscreate_preview_indicator_window / show_preview_indicator / hide_preview_indicator (label preview-indicator).

In create_preview_indicator_window the builder sets:

  • .transparent(true)
  • .always_on_top(true)
  • .visible(true) // Start hidden ← comment says hidden, but the flag starts it visible
  • macOS floating panel level (NSFloatingWindowLevel)

So an empty transparent always-on-top panel can remain in the hit-test path over the main window even when there’s no preview content to show.

Workaround

Raise the main nixmac window (AXRaise) or minimize/hide Preview before interacting with the main UI.

Note

Originally opened as #576 on GitHub; closed in favor of this Linear issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions