Skip to content

Release v0.5.9: Image Support, UI Consistency, Linux CI Fix#90

Merged
VariableThe merged 3 commits into
mainfrom
feature/v0.5.9-image-support
Jul 1, 2026
Merged

Release v0.5.9: Image Support, UI Consistency, Linux CI Fix#90
VariableThe merged 3 commits into
mainfrom
feature/v0.5.9-image-support

Conversation

@VariableThe

@VariableThe VariableThe commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Release v0.5.9

Features & Improvements

  • Image Support: Users can copy and paste images directly into notes. Images are saved locally in .images and rendered inline as image cards.
  • Consistent Visual Design: Standardized background blur styling across search modal and timers menu.
  • Dynamic Typography: Timers menu respects chosen font settings from App Settings.
  • Linux CI Fix: Pinned GitHub Actions Linux runner to ubuntu-22.04 for glibc 2.35 compatibility.

Pre-PR Verification

  • npm run lint passed clean (0 errors)
  • npx vitest run passed clean (68/68 passing)
  • cargo check passed clean

Summary by CodeRabbit

  • New Features
    • You can now paste images directly into notes; they’re saved locally and rendered inline as image cards.
    • Added a shortcut to quickly start recording a voice memo.
  • Bug Fixes
    • Improved glass/blur styling consistency across overlays.
    • Timers now use the font selected in App Settings for better visual consistency.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@VariableThe, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 7 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a9c96178-0c1d-4b67-9ea7-3af99168ad35

📥 Commits

Reviewing files that changed from the base of the PR and between 9f5d43b and df59465.

📒 Files selected for processing (1)
  • src/lib/editor/extensions.ts
📝 Walkthrough

Walkthrough

This PR adds image paste support with asset save/read commands and inline image rendering, disables the /memo command path, updates related shortcut and UI styling behavior, and bumps the app to v0.5.9 with matching release notes.

Changes

Image paste and asset persistence feature

Layer / File(s) Summary
Rust asset save/read commands
src-tauri/src/commands/fs.rs, src-tauri/src/lib.rs
New save_asset and read_asset Tauri commands validate folders/paths, base64 encode/decode file content, skip .images/.audio dirs during traversal, and are registered in the invoke handler.
Frontend API and type contracts for assets
src/api.ts, src/types.d.ts
Adds saveAsset/readAsset wrappers to tauriApi and corresponding ElectronAPI type declarations.
Editor paste handling and voice memo command
src/lib/editor/extensions.ts
Paste handler detects image clipboard data, saves it as an asset, and inserts a markdown image link; the /memo command logic is commented out.
ImageWidget rendering and markdown embed decoration
src/lib/editor/widgets.ts, src/lib/editor/markdownPlugin.ts, src/lib/editor/widgets.test.ts
New ImageWidget caches/loads asset data URLs and renders <img>; markdownPlugin decorates ![alt](path) embeds and skips them in link matching; tests cover the widget.
Keybinds shortcut, UI blur, and typography updates
src/components/KeybindsModal.tsx, src/App.css, src/components/TimersPage.tsx
Adds a voice memo shortcut entry, adds/aligns backdrop-filter/-webkit-backdrop-filter blur on modal overlays, and applies settings-driven fontFamily to TimersPage.
Version bump and release documentation
package.json, src-tauri/Cargo.toml, src-tauri/tauri.conf.json, AUDIT_LOG.md, CHANGELOG.md, notes/New Features in v0.5.9.md
Bumps version to 0.5.9 across manifests and adds corresponding changelog/audit log/release notes entries.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Editor
  participant tauriApi
  participant TauriFS
  participant AssetStore
  participant ImageWidget
  Editor->>tauriApi: saveAsset(dataBase64, ext, folder)
  tauriApi->>TauriFS: invoke save_asset
  TauriFS->>AssetStore: write asset bytes
  Editor->>tauriApi: readAsset(path)
  tauriApi->>TauriFS: invoke read_asset
  TauriFS->>AssetStore: read asset bytes
  ImageWidget->>tauriApi: readAsset(path)
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 37.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main release items: image support, UI consistency updates, and the Linux CI fix.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/v0.5.9-image-support

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src-tauri/src/commands/fs.rs`:
- Around line 530-545: The asset filename generation in the save flow uses only
a millisecond timestamp, which can collide and overwrite an existing pasted
file. Update the filename construction in the asset-saving logic around the
`timestamp`, `prefix`, `filename`, and `file_path` steps to add a random/UUID
suffix or check for an unused path before writing. Keep the existing
decode/write flow (`BASE64.decode` and `tokio::fs::write`) but ensure the chosen
path is unique before persisting the asset.
- Around line 551-557: `read_asset` is currently using `get_safe_path()`, which
creates parent directories and allows non-asset paths under `.papercache`;
update this resolver to be read-only by rejecting any path outside the allowed
asset prefixes (such as `.images` and `.audio`) and resolving the target path
without calling directory-creating logic. Keep the fix localized to `read_asset`
and use the existing helper symbols like `get_safe_path`/path validation logic
to ensure broken embeds do not mutate disk state before the read.

In `@src/api.ts`:
- Line 70: The readAsset helper is sending the wrong argument shape to the Tauri
command, so `read_asset` never receives the file path. Update the `readAsset`
function in `api.ts` to pass the path using the exact `path` key expected by
`invoke('read_asset', ...)`, keeping the `readAsset` symbol and its call to
`invoke` aligned with the command contract.

In `@src/components/KeybindsModal.tsx`:
- Around line 64-70: The KeybindsModal entry for the voice memo shortcut
references a missing SETTINGS_KEYS value, so either add SHORTCUT_VOICE_MEMO to
SETTINGS_KEYS in the settingsKeys module and wire it through the shortcut
handling path, or remove the shortcut row from KeybindsModal if it is not meant
to be supported. Make sure the label, storageKey, and any handler usage all stay
consistent with the new or removed shortcut definition.

In `@src/lib/editor/extensions.ts`:
- Around line 280-291: The paste handling in extensions.ts should preserve the
original selection across the async FileReader/saveAsset gap, because reading
view.state.selection.main.from after await can insert into the wrong place and
never replace a non-empty selection. In the reader.onload flow, capture the
selection range synchronously before starting the async work, replace that range
immediately (or with a placeholder token), and then use the saved range/marker
to swap in the final image embed once window.electronAPI.saveAsset returns.
🪄 Autofix (Beta)

✅ Autofix completed


ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c6c7f584-5c71-49a7-a8b8-f759e636963b

📥 Commits

Reviewing files that changed from the base of the PR and between d83cd7a and 0ce55dc.

⛔ Files ignored due to path filters (1)
  • src-tauri/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (17)
  • AUDIT_LOG.md
  • CHANGELOG.md
  • notes/New Features in v0.5.9.md
  • package.json
  • src-tauri/Cargo.toml
  • src-tauri/src/commands/fs.rs
  • src-tauri/src/lib.rs
  • src-tauri/tauri.conf.json
  • src/App.css
  • src/api.ts
  • src/components/KeybindsModal.tsx
  • src/components/TimersPage.tsx
  • src/lib/editor/extensions.ts
  • src/lib/editor/markdownPlugin.ts
  • src/lib/editor/widgets.test.ts
  • src/lib/editor/widgets.ts
  • src/types.d.ts

Comment thread src-tauri/src/commands/fs.rs
Comment thread src-tauri/src/commands/fs.rs
Comment thread src/api.ts Outdated
Comment thread src/components/KeybindsModal.tsx
Comment thread src/lib/editor/extensions.ts
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Fixes Applied Successfully

Fixed 5 file(s) based on 5 unresolved review comments.

Files modified:

  • src-tauri/src/commands/fs.rs
  • src/api.ts
  • src/lib/editor/extensions.ts
  • src/lib/settingsKeys.ts
  • src/setupTests.ts

Commit: 9f5d43b5a4c9982f972f0514f2cd919a6dd2d56e

The changes have been pushed to the feature/v0.5.9-image-support branch.

Time taken: 9m 34s

Fixed 5 file(s) based on 5 unresolved review comments.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
src/lib/editor/extensions.ts (1)

299-308: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Resolve the upload placeholder by marker, not stale offsets.

The async completion still replaces from..from + placeholder.length. If the user edits before the placeholder while the asset is saving, this can replace unrelated note text. Use a unique placeholder/decoration and resolve its current range before replacing; wire reader.onerror/reader.onabort to the same failure replacement path.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/lib/editor/extensions.ts` around lines 299 - 308, The async image save
flow in extensions.ts still uses the original from/to range after the upload
completes, which can become stale if the document changes. Update the
placeholder replacement logic in the image upload path to identify the
placeholder by a unique marker or decoration and resolve its current range at
dispatch time before inserting the final image or failure text. Also route
reader.onerror and reader.onabort through the same failure handling used in the
catch block so all upload failures replace the active placeholder consistently.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/lib/editor/extensions.ts`:
- Around line 307-309: The dispatch call in the editor placeholder update uses a
single-line object for changes, which violates the Prettier-required multiline
object format. Update the object passed to view.dispatch in the placeholder
handling logic so the changes property is written in multiline form, matching
the project's formatting rules and keeping the structure consistent with the
surrounding editor extension code.

---

Duplicate comments:
In `@src/lib/editor/extensions.ts`:
- Around line 299-308: The async image save flow in extensions.ts still uses the
original from/to range after the upload completes, which can become stale if the
document changes. Update the placeholder replacement logic in the image upload
path to identify the placeholder by a unique marker or decoration and resolve
its current range at dispatch time before inserting the final image or failure
text. Also route reader.onerror and reader.onabort through the same failure
handling used in the catch block so all upload failures replace the active
placeholder consistently.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0acd0dac-73b7-44b6-92be-7986e3373762

📥 Commits

Reviewing files that changed from the base of the PR and between 0ce55dc and 9f5d43b.

📒 Files selected for processing (5)
  • src-tauri/src/commands/fs.rs
  • src/api.ts
  • src/lib/editor/extensions.ts
  • src/lib/settingsKeys.ts
  • src/setupTests.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/api.ts
  • src-tauri/src/commands/fs.rs

Comment thread src/lib/editor/extensions.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@VariableThe VariableThe merged commit f4452f9 into main Jul 1, 2026
4 checks passed
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.

1 participant