HotFix: Fix Linux Building Errors#24
Conversation
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Rust | May 20, 2026 5:54a.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
There was a problem hiding this comment.
Pull request overview
This PR prepares PinStick v2.8.1 with a cross-platform version bump, adds macOS-side media + overlay support utilities/UI, and adjusts the Linux/X11 cursor implementation in the Tauri app to address build/runtime issues.
Changes:
- Bump versions to 2.8.1 across Xcode project + Tauri (Cargo + npm + tauri.conf).
- Add macOS note enhancements: persisted note text, local/remote media embedding, and overlay-mode window behavior.
- Update Linux cursor handling by introducing a cached X11
Display*for X11 cursor queries.
Reviewed changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents overlay mode behavior, including Linux X11 vs Wayland limitations. |
| PinStickApp.swift | Implements macOS media embedding UI and overlay mode behavior/state. |
| OverlayWindowSupport.swift | Adds macOS overlay window helpers + polling mouse monitor for click-through control. |
| MediaNoteSupport.swift | Adds parsing/classification and bookmark persistence for note media. |
| Jot.xcodeproj/project.pbxproj | Bumps MARKETING_VERSION to 2.8.1 across targets/configs. |
| cross-platform/src-tauri/tauri.conf.json | Bumps Tauri app version to 2.8.1. |
| cross-platform/src-tauri/src/main.rs | Updates Linux/X11 cursor retrieval with cached X11 display helper. |
| cross-platform/src-tauri/Cargo.toml | Bumps Rust crate version to 2.8.1. |
| cross-platform/src-tauri/Cargo.lock | Updates locked crate version to 2.8.1. |
| cross-platform/package.json | Bumps npm package version to 2.8.1. |
| cross-platform/package-lock.json | Updates lockfile package versions to 2.8.1. |
Files not reviewed (1)
- cross-platform/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)
cross-platform/src-tauri/src/main.rs:229
linux_x_display()returns a single sharedDisplay*used byXQueryPointer. Tauri commands can run concurrently, and Xlib requires eitherXInitThreads+ locking or external synchronization around Display usage. Consider guarding Xlib calls with aMutex(or initializing Xlib threading) to avoid data races/UB under concurrent command invocations.
let display = linux_x_display()?;
let mut root_return: xlib::Window = 0;
let mut child_return: xlib::Window = 0;
let mut root_x: i32 = 0;
let mut root_y: i32 = 0;
let mut win_x: i32 = 0;
let mut win_y: i32 = 0;
let mut mask: u32 = 0;
let ok = xlib::XQueryPointer(
| private var remoteMedia: [RemoteMediaItem] { | ||
| MediaNoteSupport.parseRemoteMedia(from: text) | ||
| } |
|
|
||
| if let existing = localMedia { | ||
| existing.url.stopAccessingSecurityScopedResource() | ||
| } | ||
|
|
||
| MediaNoteSupport.saveLocalMediaBookmark(for: url) | ||
| _ = url.startAccessingSecurityScopedResource() |
| let markdownPattern = #"!\[[^\]]*\]\((https?://[^)\s]+)\)"# | ||
| if let regex = try? NSRegularExpression(pattern: markdownPattern) { | ||
| let range = NSRange(noteText.startIndex..<noteText.endIndex, in: noteText) |
| static DISPLAY: OnceLock<Result<*mut xlib::Display, String>> = OnceLock::new(); | ||
| DISPLAY | ||
| .get_or_init(|| unsafe { | ||
| let display = xlib::XOpenDisplay(std::ptr::null()); | ||
| if display.is_null() { |
…mpute Agent-Logs-Url: https://github.com/SillyLittleTech/PinStick/sessions/cc446c19-a279-4d17-9e50-cdaa0342e5a5 Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>
This pull request introduces version 2.8.1 of PinStick, updating version numbers across all platforms and adding new features and improvements for media handling and overlay support. The most significant changes include new Swift support utilities for media and overlay window management, enhancements to overlay mode documentation and Linux support, and a fix for X11 cursor handling on Linux.
Version Bump:
Jot.xcodeproj/project.pbxproj,cross-platform/package.json,cross-platform/package-lock.json,cross-platform/src-tauri/Cargo.toml, andcross-platform/src-tauri/tauri.conf.jsonto reflect the new release. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]New Swift Support Utilities:
MediaNoteSupport.swift, providing utilities for classifying, parsing, and managing local and remote media items in notes, including secure bookmark handling and media type detection.OverlayWindowSupport.swift, which encapsulates overlay window features such as opacity persistence, overlay application, mouse event management, and a polling-based mouse monitor class for overlay mode.Overlay Mode and Cross-Platform Documentation:
README.mdto document overlay mode support, including platform-specific notes for Linux (X11 and Wayland), and clarified overlay mode features in the cross-platform Tauri app.Linux/X11 Cursor Handling Fix:
cross-platform/src-tauri/src/main.rsby introducing a cached display connection, ensuring correct behavior and stability when running on Linux/X11.These changes collectively improve media handling, overlay window management, and cross-platform stability, while preparing the app for the 2.8.1 release.