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
14 changes: 8 additions & 6 deletions AUDIT_LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

---

Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions notes/New Features in v0.5.5.md
Original file line number Diff line number Diff line change
@@ -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)*
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "papercache",
"private": true,
"version": "0.5.3",
"version": "0.5.5",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
46 changes: 43 additions & 3 deletions src-tauri/src/commands/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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" };
Expand All @@ -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 {
Expand Down Expand Up @@ -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(&note_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);
}
}
Expand All @@ -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(&note_filename);
let bundled_note_up = resource_dir.join("_up_").join("notes").join(&note_filename);
let bundled_note_up =
resource_dir.join("_up_").join("notes").join(&note_filename);
if bundled_note.exists() {
let _ = fs::copy(&bundled_note, &note_target_path);
} else if bundled_note_up.exists() {
let _ = fs::copy(&bundled_note_up, &note_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);
}
}
}
}
}
}
}
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
23 changes: 12 additions & 11 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
}
Expand Down
20 changes: 1 addition & 19 deletions src/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -240,24 +240,6 @@ export default function Settings({ onClose }: { onClose?: () => void }) {
style={{ width: 'auto', marginRight: 'auto' }}
/>
</div>
<div className="setting-group">
<label>Auto-Updates</label>
<button
onClick={() => window.electronAPI.checkForUpdates()}
style={{
padding: '6px 12px',
background: 'rgba(128,128,128,0.1)',
border: '1px solid rgba(128,128,128,0.2)',
borderRadius: '6px',
cursor: 'pointer',
color: 'inherit',
fontFamily: 'inherit',
margin: '0 auto',
}}
>
Check for Updates Now
</button>
</div>
<div className="setting-group">
<label>Submit a Bug Report</label>
<button
Expand Down
2 changes: 1 addition & 1 deletion src/setupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { vi, afterEach } from 'vitest'
import type { ElectronAPI } from './types'

vi.mock('@tauri-apps/api/app', () => ({
getVersion: vi.fn().mockResolvedValue('0.5.3'),
getVersion: vi.fn().mockResolvedValue('0.5.5'),
}))

// Mock matchMedia which is not present in jsdom but might be needed by some components
Expand Down
Loading