Skip to content

Add safe on-demand attachment actions - #27

Merged
emsi merged 4 commits into
masterfrom
feature/16-attachment-actions
Aug 8, 2026
Merged

Add safe on-demand attachment actions#27
emsi merged 4 commits into
masterfrom
feature/16-attachment-actions

Conversation

@emsi

@emsi emsi commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • add a reusable bounded, cancellable streaming API for lazy OneNote resources
  • add explicit Open and Save As... attachment actions with progress and cancellation
  • use GIO/portal file handling, private cache storage, safe filenames, and guarded destination publication
  • add theme-aware pointer and keyboard interaction for attachment objects
  • document the ownership boundaries, limits, and remaining accessibility scope

Safety and compatibility

  • notebook sources remain read-only and attachments are never extracted eagerly
  • attachment payloads are capped at 2 GiB and copied with a fixed 64 KiB buffer
  • unsafe display names cannot become paths, and interrupted writes do not replace existing files
  • Open uses a private XDG cache and the desktop launcher path
  • no broad Flatpak filesystem permission is added

Validation

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --locked --offline -- -D warnings
  • cargo test --workspace --all-targets --locked --offline
  • GTK_A11Y=none GSK_RENDERER=cairo xvfb-run -a cargo test -p onenote-render-gtk attachment_ --locked --offline
  • ./scripts/check-licenses.sh
  • ./scripts/update-flatpak-sources.sh
  • git diff --check

Closes #16

@emsi
emsi merged commit 3755932 into master Aug 8, 2026
4 checks passed
@emsi
emsi deleted the feature/16-attachment-actions branch August 8, 2026 11:43
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.

Add safe on-demand save and open actions for attachments

1 participant