Skip to content

Conversation

@xgrommx
Copy link

@xgrommx xgrommx commented Nov 27, 2025

This is native support for quicklook, because qlmanage isn't good solution, for example u cannot to get preview for video (will be throw error).

@ldm0 ldm0 requested review from Copilot and ldm0 and removed request for ldm0 November 27, 2025 07:22
@ldm0
Copy link
Collaborator

ldm0 commented Nov 27, 2025

Thanks, It's a fantastic addition! Would look into it tonight.

Copilot finished reviewing on behalf of ldm0 November 27, 2025 07:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds native macOS QuickLook support to replace the qlmanage command-line tool approach. The native implementation provides better video preview support and integrates more seamlessly with the application's UI through custom event handling and state management.

Key changes:

  • Implements native QuickLook API integration using objc2 bindings for macOS
  • Adds three new Tauri commands: open_quicklook, toggle_quicklook, and update_quicklook
  • Introduces QuickLook state management in the frontend to track when QuickLook is active

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
cardinal/src-tauri/src/quicklook.rs New module implementing native QuickLook panel management with event interception for keyboard and mouse handling
cardinal/src-tauri/src/commands.rs Replaces preview_with_quicklook command with three new commands for opening, toggling, and updating QuickLook preview
cardinal/src-tauri/src/lib.rs Updates module declarations and command registration to include new QuickLook commands
cardinal/src-tauri/build.rs Adds QuickLook framework linking for macOS builds
cardinal/src-tauri/Cargo.toml Adds objc2 ecosystem dependencies for macOS API interop
cardinal/src-tauri/Cargo.lock Lock file updates for new dependencies
cardinal/src/hooks/useContextMenu.ts Updates context menu to call open_quicklook and accept optional callback for QuickLook activation
cardinal/src/App.tsx Adds QuickLook state management, Space key handler for toggling, and Escape key handler for tracking state
cardinal/src/App.css Defines CSS styles for QuickLook active mode, including row selection and hover behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@xgrommx
Copy link
Author

xgrommx commented Nov 27, 2025

Thanks, It's a fantastic addition! Would look into it tonight.

Yes, quicklook doesn't like a new threads, so smth like video will be crashed via qlmanage (as for me this cli for debugging or smth similar to)
Also my advice will be use some state manager like https://github.com/pmndrs/zustand or smth similar (u can eliminate props-hell)
We can create more reusable store (or sequence of stores)
I tried to start working on it but I don't have more time for investigating whole app.

@xgrommx xgrommx force-pushed the quicklook-native-implementation branch from b8feed3 to 1640707 Compare November 27, 2025 17:46
@xgrommx
Copy link
Author

xgrommx commented Nov 27, 2025

@ldm0 Is that ok PR for u?

@ldm0
Copy link
Collaborator

ldm0 commented Nov 28, 2025

Also my advice will be use some state manager like https://github.com/pmndrs/zustand or smth similar (u can eliminate props-hell)

Thanks for the suggestion! I will look into it and it's awesome you have done some investigation.

@ldm0 Is that ok PR for u?

Yes, this is a good feature, I am trying to understand it and tweak it.

For example, the event monitor you add are trying to propagate the arrow key event to cardinal main window(I think it's a nich catch to sync the behaviour with Finder), but currently it's not working on my mac. I am investgating the underlying issue.

@xgrommx
Copy link
Author

xgrommx commented Nov 28, 2025

Also my advice will be use some state manager like https://github.com/pmndrs/zustand or smth similar (u can eliminate props-hell)

Thanks for the suggestion! I will look into it and it's awesome you have done some investigation.

@ldm0 Is that ok PR for u?

Yes, this is a good feature, I am trying to understand it and tweak it.

For example, the event monitor you add are trying to propagate the arrow key event to cardinal main window(I think it's a nich catch to sync the behaviour with Finder), but currently it's not working on my mac. I am investgating the underlying issue.

By default quicklook has big priority and focus will be on quicklook. My trick need for add possibility when u make active main window (click on title, or click inside list of files) - use arrows for navigating by list of files and quicklook automatically updating. It's works on my old mac with intel (2015) and my current m3.
This some situation because main window - is tauri, but quicklook is native, and native will be has bigger priority.

Here small example how it works

Monosnap.screencast.2025-11-28.11-43-30.mp4

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.

2 participants