Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions AUDIT_LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

This log tracks all significant changes, updates, and versions in the PaperCache project.

## 2026-06-25
**Change:** fix: switch autostart from LaunchAgent to LoginItem (AppleScript)

**Details/Why:**
The app was registered via `MacosLauncher::LaunchAgent`, creating a hidden `.plist` in `~/Library/LaunchAgents/` invisible to the user. Changed to `MacosLauncher::AppleScript`, which uses AppleScript to register via System Events — the app now appears in System Settings > General > Login Items as a user-manageable entry. The `--silently` flag and `hide_dock_icon()` still work as before.

**Files changed:** `src-tauri/src/lib.rs`, `CHANGELOG.md`.

---

## 2026-06-25 - (Uncommitted)
**Change:** fix: window state persistence and login-item toggle desync (v0.5.4)

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed
- **Window position/size now persists across restarts**: The window-state plugin's `on_window_ready` fires before the macOS display server is ready, causing `available_monitors()` to return empty and the saved position to be silently discarded. Fixed by deferring window-state restoration via a background thread + `run_on_main_thread` 300ms after `setup()` completes, bypassing the plugin's monitor-intersection check with a direct file read. Both the tray "Quit" and Settings "Quit" buttons now explicitly save window state before exit.
- **Launch at Startup now registers as a proper Login Item**: Changed `MacosLauncher` from `LaunchAgent` to `AppleScript`, which registers PaperCache in System Settings > General > Login Items instead of creating a hidden `launchd` plist. Users can now see and manage the autostart entry directly from System Settings.
- **Login-item toggle stays in sync with macOS System Settings**: The launch-at-startup toggle only read from `localStorage`, so removing PaperCache from System Settings left the toggle permanently stuck in the checked state. Fixed by adding a `get_launch_at_startup` Tauri command that queries the actual OS login-item state via `app.autolaunch().is_enabled()`, and syncing the toggle with the real OS state on every Settings mount.

## [v0.5.3] - 2026-06-24
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub fn run() {
)
.plugin(tauri_plugin_global_shortcut::Builder::default().build())
.plugin(tauri_plugin_autostart::init(
tauri_plugin_autostart::MacosLauncher::LaunchAgent,
tauri_plugin_autostart::MacosLauncher::AppleScript,
Some(vec!["--silently"]),
))
.plugin(tauri_plugin_updater::Builder::new().build())
Expand Down
Loading