Refactor window handling, improve theme support, and update dependencies#1807
Refactor window handling, improve theme support, and update dependencies#1807ItsEeleeya wants to merge 126 commits into
Conversation
The header height now matches that of windows with Toolbars on macOS 26
…ier + fix onboarding decorations
The header height now matches that of windows with Toolbars on macOS 26
…ier + fix onboarding decorations
…a/Cap into next-base-improvements
…lugin_window_state's deny list
Co-authored-by: tembo[bot] <208362400+tembo[bot]@users.noreply.github.com>
Co-authored-by: tembo[bot] <208362400+tembo[bot]@users.noreply.github.com>
Co-authored-by: tembo[bot] <208362400+tembo[bot]@users.noreply.github.com>
Co-authored-by: tembo[bot] <208362400+tembo[bot]@users.noreply.github.com>
…a/Cap into next-base-improvements
| ); | ||
| } | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
Nit: this file is missing a trailing newline (\\ No newline at end of file), which tends to cause noisy diffs.
| } | |
| } |
| "core:webview:default", | ||
| "core:webview:allow-create-webview-window", | ||
| "core:app:allow-version", | ||
| "core:app:allow-set-app-theme", |
There was a problem hiding this comment.
This adds core:app:allow-set-app-theme to the default capability. If this is only needed for specific windows/flows, consider scoping it to a narrower capability to keep the allowlist tight.
Co-authored-by: tembo[bot] <208362400+tembo[bot]@users.noreply.github.com>
|
hey @greptileai please review the PR |
|
hey @greptileai please re-review the pr |
|
|
||
| #[cfg(target_os = "macos")] | ||
| const DEFAULT_TRAFFIC_LIGHTS_INSET: LogicalPosition<f64> = LogicalPosition::new(12.0, 12.0); | ||
| const DEFAULT_TRAFFIC_LIGHTS_INSET: LogicalPosition<f64> = LogicalPosition::new(12.0, 20.0); |
There was a problem hiding this comment.
Small maintainability nit: these inset values are pretty tuned; a short note helps prevent someone from “fixing” them later without realizing this is for macOS 26 titlebar spacing.
| const DEFAULT_TRAFFIC_LIGHTS_INSET: LogicalPosition<f64> = LogicalPosition::new(12.0, 20.0); | |
| const DEFAULT_TRAFFIC_LIGHTS_INSET: LogicalPosition<f64> = LogicalPosition::new(12.0, 20.0); // tuned for macOS 26 titlebar spacing |
| showMinimize={false} | ||
| showZoom={false} | ||
| /> | ||
| {isMacOS && !isSettings() && <div class="h-full w-[70px]" />} |
There was a problem hiding this comment.
This spacer is purely layout; adding aria-hidden avoids it ever being treated as meaningful structure (and makes the intent a bit clearer).
| {isMacOS && !isSettings() && <div class="h-full w-[70px]" />} | |
| {isMacOS && !isSettings() && <div class="h-full w-[70px]" aria-hidden="true" />} |
Refactor window handling, improve theme support, and modernize native integration
Overview
This PR refactors a few things with small improvements as a base for upcoming PRs. The changes modernize how windows are revealed, streamline macOS integration with native AppKit APIs, and better theme handling.
Key Changes
Window Management Refactoring
AutoRevealWindowOnReady: Automatically shows windows once content is loadedRevealWindowWithSuspense: Defers visibility for windows like Settings until routing and child mounting completesShowCapWindow→CapWindowthroughout the codebaseAppDelegateas Tauri now supports custom traffic lights insetdata-tauri-drag-region="deep"attribute (eliminates scattered manual markers)onMouseDown={showCropOptionsMenu}in Editor crop section withonClickas keyboard/touch fallbackTheme/Appearance Improvements
AppTheme→Appearance(with serde fallback for backward compatibility)Code Organization
src-tauri/src/display_utils.rsout ofwindows.rsMonitorExtandCursorMonitorInfotypes organizedpanel_manager.rs: Now macOS-only with streamlined logicmenu.rsmoduleNative Platform Integration
objc2ecosystem crates (app-kit, foundation, permissions)objc2-app-kitversionWebviewWindowExttrait withwith_nswindow_on_main()utility for direct AppKit window accesstauri_plugin_window_statedenylist)UI/UX Enhancements
scale-50class)Dependencies & Plugins
tauri-plugin-prevent-default: Enables default context menu only during developmentTechnical Notes
objc2crates instead of legacy objc/cocoaGreptile Summary
This PR refactors desktop window handling and native integration. The main changes are:
ShowCapWindowtoCapWindowacross Rust and generated bindings.themetoappearancewith persisted-store compatibility.Confidence Score: 5/5
This looks safe to merge.
Important Files Changed
appearancewhile accepting the old persisted key.Reviews (3): Last reviewed commit: "Merge branch 'main' into pr/1807" | Re-trigger Greptile
Context used: