diff --git a/AUDIT_LOG.md b/AUDIT_LOG.md index 06f3916..82c706b 100644 --- a/AUDIT_LOG.md +++ b/AUDIT_LOG.md @@ -2,15 +2,17 @@ This log tracks all significant changes, updates, and versions in the PaperCache project. -## 2026-06-27 (Settings & Onboarding Fixes) -**Change:** feat: add Bug Report option and About section in Settings; fix Windows onboarding file path generation +## 2026-06-27 (v0.5.5 Release & Smart Onboarding) +**Change:** chore(release): bump version to 0.5.5; implement smart onboarding and release notes routing **Details/Why:** -1. Added "Submit a Bug Report" button under Settings > System linking directly to GitHub Issues creation page (`https://github.com/VariableThe/PaperCache/issues/new`). -2. Added dedicated "About" section in Settings featuring app logo (`/icon.png`), dynamic app version number (`getVersion`), check for updates button, Ko-fi support button (`https://ko-fi.com/thevariable`), and user thank you message. -3. Resolved onboarding note generation and `/file` linking failures on Windows. Previously, `walk_dir` generated note IDs with backslashes on Windows (e.g. `onboarding\Editor.md`), causing internal `/file` links using forward slashes in `Welcome.md` to fail lookup and duplicate empty notes. Normalized path generation across Rust (`fs.rs`) and frontend (`useNoteStorage.ts`, `markdownPlugin.ts`, `GraphView.tsx`) to guarantee consistent forward slash IDs across all OS targets. Updated `write_onboarding_file` to regenerate onboarding files on version bumps. +1. Bumped application version from 0.5.3 to 0.5.5 across `package.json`, `src-tauri/Cargo.toml`, and `src-tauri/tauri.conf.json`. +2. Implemented smart onboarding routing: detected brand new installations vs existing user upgrades in `run_onboarding` (`fs.rs`). For new installs, release notes (`New Features in v0.5.5.md`) are suppressed and cleaned up so users open directly into a clean `Welcome.md`. For upgrading users, the release note is copied and opened automatically on startup via `checkVersion` (`App.tsx`). +3. Consolidated settings UI by removing duplicate "Check for updates" option from System settings, keeping it inside the new About menu. +4. Added "Submit a Bug Report" button and About section (logo, Ko-fi link, version display). +5. Fixed Windows path normalization for note IDs and internal links. -**Files changed:** `src/Settings.tsx`, `src/setupTests.ts`, `src-tauri/src/commands/fs.rs`, `src/hooks/useNoteStorage.ts`, `src/lib/editor/markdownPlugin.ts`, `src/GraphView.tsx`, `CHANGELOG.md`, `AUDIT_LOG.md`. +**Files changed:** `package.json`, `src-tauri/Cargo.toml`, `src-tauri/tauri.conf.json`, `src/App.tsx`, `src/Settings.tsx`, `src/setupTests.ts`, `src-tauri/src/commands/fs.rs`, `src/hooks/useNoteStorage.ts`, `src/lib/editor/markdownPlugin.ts`, `src/GraphView.tsx`, `CHANGELOG.md`, `AUDIT_LOG.md`. --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 182881f..3d78b43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,10 @@ All notable, user-facing changes to PaperCache will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [v0.5.4] - 2026-06-25 +## [v0.5.5] - 2026-06-27 ### Added +- **Smart Onboarding & New Features Note Routing**: Brand new installations now cleanly launch directly into `Welcome.md` without copying or showing release note files. Existing users upgrading from previous versions will automatically receive the release notes file and be taken directly to the `New Features in v0.5.5.md` note upon opening the app. - **Settings Bug Report & About Menu**: Added a "Submit a Bug Report" button under System settings linking directly to the GitHub issue creation form. Added a dedicated "About" section displaying the app logo, current version number, update checker, Ko-fi support link, and a thank you message. ### Fixed diff --git a/notes/New Features in v0.5.5.md b/notes/New Features in v0.5.5.md new file mode 100644 index 0000000..5732dc3 --- /dev/null +++ b/notes/New Features in v0.5.5.md @@ -0,0 +1,13 @@ +# New Features in v0.5.5 + +Welcome to PaperCache v0.5.5! + +Here are the new features and improvements implemented in this release: +- **Settings Bug Report & About Menu**: Added a "Submit a Bug Report" option in Settings to quickly open GitHub Issues, plus a dedicated "About" menu with the app logo, version number, update checker, and support link. +- **Windows Onboarding & Link Fixes**: Fixed a bug on Windows where backslashes in generated note IDs caused internal `/file` links in `Welcome.md` to fail. +- **Window Position Persistence**: Window size and position now reliably persist across app restarts on all platforms. +- **macOS Login Item Sync**: The "Launch at Startup" toggle now registers as a proper Login Item and stays in sync with macOS System Settings. +- **Overlay Escape Handling**: Pressing ESC now cleanly closes open panels (like Graph View or Timers) before hiding the application window. +- **UI & Formatting Polish**: Hidden persistent scrollbars in editor and settings on Windows/Linux, centered shortcut pill separators, and improved IPC error handling. + +*(If you have read this note, feel free to delete it)* diff --git a/package.json b/package.json index a317d73..158b2f1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "papercache", "private": true, - "version": "0.5.3", + "version": "0.5.5", "type": "module", "scripts": { "dev": "vite", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 2cdab6b..7a2daf1 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -2926,7 +2926,7 @@ dependencies = [ [[package]] name = "papercache" -version = "0.5.3" +version = "0.5.5" dependencies = [ "aes-gcm", "base64 0.22.1", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 4e04991..f45b6af 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papercache" -version = "0.5.3" +version = "0.5.5" description = "A PaperCache Tauri App" authors = ["Aditya Sharma"] edition = "2021" diff --git a/src-tauri/src/commands/fs.rs b/src-tauri/src/commands/fs.rs index 75aaade..628e23a 100644 --- a/src-tauri/src/commands/fs.rs +++ b/src-tauri/src/commands/fs.rs @@ -234,6 +234,30 @@ pub fn remove_onboarding_files() -> Result<(), String> { Ok(()) } +fn has_user_notes(dir: &Path) -> bool { + if let Ok(entries) = fs::read_dir(dir) { + for entry in entries.filter_map(Result::ok) { + let path = entry.path(); + if path.is_dir() { + if has_user_notes(&path) { + return true; + } + } else if path.is_file() { + if let Some(name) = path.file_name().and_then(|n| n.to_str()) { + if name.ends_with(".md") + && !name.starts_with("Welcome") + && !name.starts_with("New Features") + && !name.starts_with("Shortcuts") + { + return true; + } + } + } + } + } + false +} + pub fn run_onboarding(app: &AppHandle) { let is_hyprland = std::env::var("HYPRLAND_INSTANCE_SIGNATURE").is_ok() || std::env::var("HYPRLAND_CMD").is_ok(); let mod_key = if is_hyprland { "Alt" } else { "Command/Ctrl" }; @@ -242,6 +266,7 @@ pub fn run_onboarding(app: &AppHandle) { let version = app.package_info().version.to_string(); let version_marker = base.join(".onboarding_version"); let last_version = fs::read_to_string(&version_marker).ok(); + let is_existing_user = version_marker.exists() || has_user_notes(&base); let is_new_version = last_version.as_deref() != Some(&version); if is_new_version { @@ -432,12 +457,15 @@ pub fn run_onboarding(app: &AppHandle) { let note_filename = format!("New Features in v{}.md", version); let note_target_path = base.join(¬e_filename); - if !note_target_path.exists() { + if is_existing_user && is_new_version && !note_target_path.exists() { if let Ok(entries) = fs::read_dir(&base) { for entry in entries.filter_map(Result::ok) { let path = entry.path(); if let Some(name) = path.file_name().and_then(|n| n.to_str()) { - if name.starts_with("New Features in v") && name.ends_with(".md") && name != note_filename.as_str() { + if name.starts_with("New Features in v") + && name.ends_with(".md") + && name != note_filename.as_str() + { let _ = fs::remove_file(&path); } } @@ -446,13 +474,25 @@ pub fn run_onboarding(app: &AppHandle) { if let Ok(resource_dir) = app.path().resource_dir() { let bundled_note = resource_dir.join("notes").join(¬e_filename); - let bundled_note_up = resource_dir.join("_up_").join("notes").join(¬e_filename); + let bundled_note_up = + resource_dir.join("_up_").join("notes").join(¬e_filename); if bundled_note.exists() { let _ = fs::copy(&bundled_note, ¬e_target_path); } else if bundled_note_up.exists() { let _ = fs::copy(&bundled_note_up, ¬e_target_path); } } + } else if !is_existing_user { + if let Ok(entries) = fs::read_dir(&base) { + for entry in entries.filter_map(Result::ok) { + let path = entry.path(); + if let Some(name) = path.file_name().and_then(|n| n.to_str()) { + if name.starts_with("New Features in v") && name.ends_with(".md") { + let _ = fs::remove_file(&path); + } + } + } + } } } } diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 3526acd..e0dae98 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/2.0.0/tauri.schema.json", "productName": "PaperCache", - "version": "0.5.3", + "version": "0.5.5", "identifier": "com.variablethe.papercache", "build": { "beforeDevCommand": "npm run dev", diff --git a/src/App.tsx b/src/App.tsx index 37ab484..4518332 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -109,24 +109,25 @@ function App() { const currentVersion = await getVersion() const lastSeenVersion = localStorage.getItem('papercache-last-seen-version') - if (lastSeenVersion === null) { - localStorage.setItem('papercache-last-seen-version', currentVersion) - const welcomeIndex = notes.findIndex((n) => { - const filename = n.id.split('/').pop() || '' - return filename === 'Welcome.md' - }) - if (welcomeIndex !== -1) { - setCurrentNoteIndex(welcomeIndex) - } - } else if (lastSeenVersion !== currentVersion) { - localStorage.setItem('papercache-last-seen-version', currentVersion) + if (lastSeenVersion !== currentVersion) { const targetId = `New Features in v${currentVersion}.md` const targetIndex = notes.findIndex((n) => { const filename = n.id.split('/').pop() || '' return filename === targetId }) + if (targetIndex !== -1) { + localStorage.setItem('papercache-last-seen-version', currentVersion) setCurrentNoteIndex(targetIndex) + } else if (lastSeenVersion === null) { + const welcomeIndex = notes.findIndex((n) => { + const filename = n.id.split('/').pop() || '' + return filename === 'Welcome.md' + }) + if (welcomeIndex !== -1) { + localStorage.setItem('papercache-last-seen-version', currentVersion) + setCurrentNoteIndex(welcomeIndex) + } } } } diff --git a/src/Settings.tsx b/src/Settings.tsx index 0a698e6..1bb389d 100644 --- a/src/Settings.tsx +++ b/src/Settings.tsx @@ -59,7 +59,7 @@ export default function Settings({ onClose }: { onClose?: () => void }) { }) }, []) - const [appVersion, setAppVersion] = useState('0.5.3') + const [appVersion, setAppVersion] = useState('0.5.5') useEffect(() => { getVersion() .then((ver) => setAppVersion(ver)) @@ -240,24 +240,6 @@ export default function Settings({ onClose }: { onClose?: () => void }) { style={{ width: 'auto', marginRight: 'auto' }} /> -
- - -