Repository navigation
fix(ios): Markdown reader can't be closed, shared files don't open into the Reader - #296
Merged
Merged
Conversation
…to the Reader Two bugs from build 35 tester feedback (Dutch, via Messages): - "Ik kan een md niet sluiten?" (#293): once the immersive-toolbar toggle hides ReaderView's navigation bar (and its back button), the only way back is the center-tap gesture in MarkdownReaderContent. That gesture was attached as .simultaneousGesture, which doesn't reliably win against the same view's .textSelection(.enabled) tap-to-place-cursor interaction — so the tap can get swallowed and the toolbar never comes back. .highPriorityGesture forces the center-tap to resolve first. - "de redirect is er nu.. maar die open libra.. niet de md zelf" (#294): opening a shared file via "Open in LibraVault" now correctly launches the app (onOpenURL -> importSharedFile), but importSharedFile only copied the file into the Imported vault and reloaded the Library list — nothing pushed the Reader for it. Added AppState.pendingImportedBook (mirroring the existing shouldNavigateToPlayer pattern) and a .navigationDestination(item:) on RootView so a successful import opens straight into the document, matched by the actual (possibly renamed by uniqueDestinationURL) fileURL. Fixes #293 Fixes #294 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
📱 iOS Build Status: FAILED❌ iOS Simulator Build & Unit Tests - failure iOS UI tests run in a separate, informational job and are not reflected above — check "iOS UI Tests (informational)" for those. |
…n(item:) CI's iOS Simulator build caught what local review missed (no Xcode available in this environment): navigationDestination(item:) requires D: Hashable, not just Identifiable. BookItem and its MediaFormat property pick up Hashable conformance — a plain no-associated-values enum plus all-Hashable stored properties, so synthesis is free. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
📱 iOS Build Status: PASSED✅ iOS Simulator Build & Unit Tests - success iOS UI tests run in a separate, informational job and are not reflected above — check "iOS UI Tests (informational)" for those. |
This was referenced Aug 19, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Build 35 tester feedback (R, via Messages, Dutch) surfaced two related iOS bugs, filed as #293 and #294 and both fixed here — see each issue for the full root-cause writeup.
#293 — can't close a Markdown document ("Ik kan een md niet sluiten?")
MarkdownReaderContent's center-tap toolbar toggle was.simultaneousGesture, which doesn't reliably win against the same view's.textSelection(.enabled)tap-to-place-cursor interaction. When the tap gets swallowed by text selection instead of reachingonCenterTap,ReaderView's navigation bar (hidden along with the rest of the toolbar) never comes back — no back button, no way out. Switched to.highPriorityGestureso the toggle always wins.This also fixes #294 — shared-file redirect opens the Library, not the document ("de redirect is er nu.. maar die open libra.. niet de md zelf")
AppState.importSharedFile(triggered by.onOpenURL) copied the shared file into the Imported vault and reloaded the Library, but never navigated into the Reader for it. AddedAppState.pendingImportedBook(mirrors the existingshouldNavigateToPlayerpattern) + a.navigationDestination(item:)onRootView, so a successful import now pushes straight into the document. Matched by the actualfileURLpost-copy (not the original filename), sinceuniqueDestinationURLmay have renamed it to avoid clobbering an existing file.navigationDestination(item:)requiresHashable, not justIdentifiable— addedHashabletoBookItem/MediaFormatfor that (caught by this PR's own iOS Simulator CI run, not by me — no local Xcode in the environment that wrote this).Only one closing keyword above (
Fixes #293) — this repo's PR-intake script only supports a single linked issue per PR (see.github/scripts/resolve_linked_issue.sh). #294 will be closed manually referencing this PR once it merges, since both bugs are fixed by the same small, tightly-coupled change.Testing
AppStateFileImportTestscoverage forpendingImportedBook: set on success, follows a renamed (name-collision) destination, stays nil on a failed copy.iOS App Build & Test) is what actually compiles/runsLibraVaultTests/LibraVaultUITestshere; watching that before merge..textSelectionswallowing taps, but on-device behavior can't be confirmed from CI alone — worth a real-device retest by R once the next TestFlight build ships.ReaderTapZoneTests(unchanged) still covers the tap-zone classification logic itself, which wasn't the bug.Fixes #293
🤖 Generated with Claude Code