Merging fix for Android file I/O permissions#28
Merged
kevincarlson merged 3 commits intoMar 30, 2026
Merged
Conversation
… audit gaps - Split epub-logic/src/lib.rs (609 lines) into six focused submodules (conversion, html, css, nav, opf, table) so every file is ≤ 300 lines - G1: Block::Image now renders <img src alt title/> and embeds data-URI images in OEBPS/Images/ via base64 decoding (new base64 dep) - G2: Block::Table/TableRow/TableHeader/TableCell now render <table>, <thead>/<tbody>, <tr>, <th colspan rowspan>, <td colspan rowspan> - G3: Inline text content is XML-escaped before HTML wrapping - G4: Link href values are XML-escaped - G5: Section <title> content is XML-escaped - G6/G7: BlockAttrs.text_align and indent produce inline style= attributes on <p> and <h*> elements - G8: TiptapMark::NamedSpanStyle wraps text in <span class="style-..."> - G9: Inline::Text.style_name wraps text in <span class="style-..."> - G10: fo:color, fo:background-color, style:font-name, fo:text-decoration, fo:letter-spacing, fo:font-variant and border/padding properties added to ODF→CSS mapping - G11: metadata.creation_date emitted as <dc:date> in OPF - G12: metadata.description and metadata.subject emitted in OPF - G13: Embedded images listed in OPF manifest under OEBPS/Images/ - G14: 609-line file size violation resolved by submodule split - Section titles extracted from first heading block instead of generic "N" - EpubDocument gains images: Vec<ImageAsset> field; from_tiptap gains images parameter for pre-loaded assets from caller - write_epub_zip writes OEBPS/Images/ directory with embedded image assets - All 4 existing tests pass; cargo clippy -D warnings clean https://claude.ai/code/session_01QXTY8ndVt2UpgKFqcJodX5
Formatting-only changes to satisfy the cargo fmt --all -- --check CI gate. No logic changes. https://claude.ai/code/session_01QXTY8ndVt2UpgKFqcJodX5
…pg5lF Refactor EPUB generation: modularize code and add image asset support
61aca09
into
claude/bug-opening-a-file-from-recents-fails-with-a-permi-lFadJ
6 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Android's Storage Access Framework (SAF) grants only a temporary permission for a content:// URI when the user picks a file via the file picker. That permission is tied to the app process and is revoked when the app is killed. Attempting to re-open the same URI from Recents in a new session therefore fails with a permissions error.
Fix — 4 changes:
Both calls are wrapped in try/catch so they are silently ignored on desktop and on URIs that don't support persistable permissions.