Repository navigation
fix(mobile): show restored player from the sidebar picker - #507
Merged
Merged
Conversation
Deploying podnotes with
|
| Latest commit: |
f74d8a5
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a0f0149b.podnotes.pages.dev |
| Branch Preview URL: | https://fix-mobile-view-blank.podnotes.pages.dev |
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
Selecting Podcast Player in the mobile sidebar after a restart now shows its saved page. PodNotes mounts when Obsidian opens the view and relies on Obsidian's deferred views to keep hidden sidebars idle.
The removed gate came from #208's mitigation for a suspected startup loop on Obsidian 1.6.7. The supported minimum is now 1.13.0, and playback lives outside the view.
Fixes #505
Verification
npm run lint,npm run format:check,npm run typecheck,npm run build,npm run test,npm run test:tooling, andnpm run docs:buildpass on Node 22.23.2. 2,783 unit tests and 41 tooling tests pass.npm run test:e2epasses all 242 tests on fresh isolated vaults with Obsidian 1.14.4 and 1.13.7 on Linux. The mobile journey uses 390 by 844 phone emulation. API playback and commands also passed a separate check with the restored view still deferred.activateView().npm run sizepasses at 101,443 gzip bytes, 154 bytes below master and within the 103,000-byte budget.Verification report · Raw logs, measurements and reproduction scripts
Before, blank sidebar · After, Library
Release impact
No migration. Settings, storage, the public API and URI handling are unchanged. Desktop still opens the view automatically only on a fresh install.
Docs at release
In
docs/src/content/docs/mobile.md, under Open the player, add this sentence after the opening instructions:Note
Medium Risk
Removes public
IPodNotesview-mount hooks and changes when restored mobile leaves mount UI; behavior now depends on Obsidian deferred views instead of plugin gating.Overview
Fixes #505 by dropping the mobile “dormant view” path that kept the Podcast Player from mounting until
activateView()ran.MainViewnow mounts the Svelte UI inonOpenwhenever Obsidian opens the view, so a deferred restored leaf can show Library (and saved page state) after the user picks Podcast Player in the mobile sidebar picker—not only when the ribbon/command reveals the pane.PodNotesno longer tracks aviewsset,podcastViewMountEnabled, orPlatform-based startup gating.registerViewreturns a plainMainView;activateViewonly finds/creates the leaf andrevealLeaf.IPodNotesdropsshouldMountPodcastView/unregisterPodcastView.Tests shed dormant-mount coverage and mocks; a new mobile e2e journey covers reload → deferred leaf → picker → Library UI with a single leaf.
Reviewed by Cursor Bugbot for commit f74d8a5. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix mobile restored Podcast Player view so it mounts when opened from sidebar picker
viewsset and mobilepodcastViewMountEnabledgating fromPodNotes, along with theshouldMountPodcastViewandunregisterPodcastViewmethods and thePodNotesViewRegistrationinterface in IPodNotes.ts.MainView.onOpenin index.ts now mounts the SveltePodcastViewunconditionally when Obsidian opens the view, instead of staying dormant on mobile; the single-instance guard viapodcastViewremains.PodNotes.activateViewin main.ts now only finds or creates the right-sidebar leaf and reveals it, leaving mounting to the Obsidian view lifecycle.shouldMountPodcastViewandunregisterPodcastViewfrom theIPodNotesinterface; any out-of-tree code or test doubles still providing these will now fail type checks, and restored mobile views mount immediately on open rather than staying deferred.Macroscope summarized f74d8a5.