Skip to content

fix: handle no args across all bottom sheet dialogs - #1148

Merged
eddyizm merged 1 commit into
developmentfrom
no-args-crash
Oct 4, 2026
Merged

eddyizm merged 1 commit into
developmentfrom
no-args-crash

Conversation

@eddyizm

@eddyizm eddyizm commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

resolves #1145

When SongBottomSheetDialog (or any of the bottom sheet dialogs) is launched or recreated without arguments (or
with a null track object), it now calls:

dismissAllowingStateLoss();
return view;

This immediately dismisses the bottom sheet fragment and returns the user back to the underlying screen
("kicking" them out of the invalid dialog) rather than throwing an IllegalStateException and crashing the
application.

Summary by CodeRabbit

  • Bug Fixes
    • Bottom sheets for albums, artists, downloads, playlists, podcasts, sharing, and songs now close safely when their required content is unavailable, instead of failing during setup.
    • Media playback connections are now initialized and released only when the associated content and connection are available, reducing errors when opening or closing these sheets.
    • Song details and download controls now handle missing song information safely.

Repository owner deleted a comment from coderabbitai Bot Oct 3, 2026
Repository owner deleted a comment from coderabbitai Bot Oct 3, 2026
@eddyizm

eddyizm commented Oct 3, 2026

Copy link
Copy Markdown
Owner Author

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 475425ef-6e60-4500-a167-cc4b582ca957
📥 Commits

Reviewing files that changed from the base of the PR and between 63ddf60 and 27c5780.

📒 Files selected for processing (10)
  • CONTRIBUTING.md
  • app/src/main/java/com/eddyizm/tempus/ui/fragment/bottomsheetdialog/AlbumBottomSheetDialog.java
  • app/src/main/java/com/eddyizm/tempus/ui/fragment/bottomsheetdialog/ArtistBottomSheetDialog.java
  • app/src/main/java/com/eddyizm/tempus/ui/fragment/bottomsheetdialog/DownloadedBottomSheetDialog.java
  • app/src/main/java/com/eddyizm/tempus/ui/fragment/bottomsheetdialog/PlaylistBottomSheetDialog.java
  • app/src/main/java/com/eddyizm/tempus/ui/fragment/bottomsheetdialog/PlaylistRowBottomSheetDialog.java
  • app/src/main/java/com/eddyizm/tempus/ui/fragment/bottomsheetdialog/PodcastChannelBottomSheetDialog.java
  • app/src/main/java/com/eddyizm/tempus/ui/fragment/bottomsheetdialog/PodcastEpisodeBottomSheetDialog.java
  • app/src/main/java/com/eddyizm/tempus/ui/fragment/bottomsheetdialog/ShareBottomSheetDialog.java
  • app/src/main/java/com/eddyizm/tempus/ui/fragment/bottomsheetdialog/SongBottomSheetDialog.java

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The bottom-sheet dialogs now handle missing arguments and guard selected media-browser operations. The contributor guide adds an alternate Retrace path and closes the PR checkout example’s code fence.

Changes

Bottom-sheet dialog guards

Layer / File(s) Summary
Handle missing dialog arguments
app/src/main/java/com/eddyizm/tempus/ui/fragment/bottomsheetdialog/*BottomSheetDialog.java
Dialogs dismiss when required arguments or parcelable values are absent. SongBottomSheetDialog also uses defaults for playlist values when arguments are absent.
Guard media-browser operations
app/src/main/java/com/eddyizm/tempus/ui/fragment/bottomsheetdialog/AlbumBottomSheetDialog.java, ArtistBottomSheetDialog.java, DownloadedBottomSheetDialog.java, PlaylistBottomSheetDialog.java, PodcastChannelBottomSheetDialog.java, PodcastEpisodeBottomSheetDialog.java, SongBottomSheetDialog.java
Media observation and initialization run only when the relevant data exists. Browser release runs only when its future exists. SongBottomSheetDialog also returns from download-button updates when the song is absent.

Contributor instructions

Layer / File(s) Summary
Update contributor instructions
CONTRIBUTING.md
The Retrace instructions include an alternate executable path. The PR checkout example has a closing code fence.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 27c57

The changed dialogs dismiss when required data is missing. No actionable regression was established in the affected lifecycle or song actions; the PR is mergeable after normal checks.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The CONTRIBUTING.md change documents alternate locations for the retrace executable and adjusts the PR checkout example. These documentation edits do not support the missing-arguments crash fix in… Remove the unrelated CONTRIBUTING.md edits, or limit this PR to changes that support the bottom-sheet crash fix.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 28 functions across 9 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 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 change: handling missing arguments across the bottom-sheet dialogs.
Linked Issues check ✅ Passed Issue #1145 reports a crash when SongBottomSheetDialog has no arguments. The change summary says SongBottomSheetDialog now handles absent arguments and a null track by dismissing safely and return…
Full details: Out of Scope Changes check

Explanation

The CONTRIBUTING.md change documents alternate locations for the retrace executable and adjusts the PR checkout example. These documentation edits do not support the missing-arguments crash fix in #1145 or the bottom-sheet handling changes.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 28 functions across 9 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@eddyizm
eddyizm merged commit b64e5c3 into development Oct 4, 2026
2 checks passed
@eddyizm
eddyizm deleted the no-args-crash branch October 19, 2026 23:44
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