Skip to content

fix(import): polish library import UI and widen cross-promo detection#883

Merged
ashwkun merged 2 commits into
masterfrom
fix/minor-import-and-cross-promo
Jul 17, 2026
Merged

fix(import): polish library import UI and widen cross-promo detection#883
ashwkun merged 2 commits into
masterfrom
fix/minor-import-and-cross-promo

Conversation

@ashwkun

@ashwkun ashwkun commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Rebuild the OPML/JSON import flow with a shared loader hero that morphs into the success checkmark, plus clearer selector/progress/success screens
  • Widen cross-promotion detection with more title patterns, description “subscribe to / check out” cues, and better search match scoring
  • Extract import UI out of MainActivity into ui/libraryimport

Test plan

  • Open Import Library (onboarding or Settings) and restore a .json backup — confirm loader fills into the checkmark, then Continue
  • Import an .opml file — confirm progress UI, optional mark-played step, and success morph
  • Open a promo/trailer episode with “subscribe to …” (or similar) in the description and confirm the cross-promo card appears when a show resolves
  • Confirm normal non-promo episodes still do not show the card

Make the OPML/JSON import success checkmark continue from the wavy loader, and catch more promo episodes via description cues and stronger podcast matching.
@ashwkun ashwkun added the user-impact-low Minor user-facing polish — CHANGELOG yes; README optional label Jul 17, 2026
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4aa4667e-3bc7-4703-8848-87e79a715e5d

📥 Commits

Reviewing files that changed from the base of the PR and between 59d42bf and 74a4327.

📒 Files selected for processing (6)
  • app/src/main/java/cx/aswin/boxcast/MainActivity.kt
  • app/src/main/java/cx/aswin/boxcast/ui/libraryimport/OpmlImportDialog.kt
  • core/data/src/main/java/cx/aswin/boxcast/core/data/crosspromo/CrossPromotionDetector.kt
  • core/data/src/main/java/cx/aswin/boxcast/core/data/crosspromo/CrossPromotionResolver.kt
  • core/data/src/test/java/cx/aswin/boxcast/core/data/crosspromo/CrossPromotionDetectorTest.kt
  • core/model/src/main/java/cx/aswin/boxcast/core/model/CrossPromotion.kt

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added a dedicated library import dialog supporting JSON backups and OPML files.
    • Import flow now includes progress updates, item selection, completion summaries, retry handling, and notification prompts.
  • Improvements

    • Improved cross-promotion detection using episode descriptions, additional promotional patterns, and stronger title filtering.
    • Improved podcast matching by scoring multiple search results and ignoring weak or generic matches.
  • Tests

    • Added coverage for description-based promotions, guest-feed patterns, and invalid show-name matches.

Walkthrough

The OPML import state model and Compose dialog move into a dedicated library-import file. Cross-promotion detection adds description-based heuristics, stricter name filtering, improved podcast result scoring, a new indicator, and expanded tests.

Changes

Library import UI

Layer / File(s) Summary
Import state and dialog wiring
app/src/main/java/cx/aswin/boxcast/MainActivity.kt, app/src/main/java/cx/aswin/boxcast/ui/libraryimport/OpmlImportDialog.kt
The import state model and dialog entry point move out of MainActivity into the library-import package, with dismissal rules and document picker setup.
Import progress and selection flow
app/src/main/java/cx/aswin/boxcast/ui/libraryimport/OpmlImportDialog.kt
The dialog renders animated progress states, JSON and OPML choices, and podcast selection controls for completion handling.
Import completion and error states
app/src/main/java/cx/aswin/boxcast/ui/libraryimport/OpmlImportDialog.kt
Success summaries, notification permission handling, summary rows, and error dismissal content are implemented in the extracted dialog.

Cross-promotion detection

Layer / File(s) Summary
Detection indicators and heuristics
core/model/src/main/java/cx/aswin/boxcast/core/model/CrossPromotion.kt, core/data/src/main/java/cx/aswin/boxcast/core/data/crosspromo/CrossPromotionDetector.kt, core/data/src/test/java/cx/aswin/boxcast/core/data/crosspromo/CrossPromotionDetectorTest.kt
Detection adds DESCRIPTION_PROMO_LANGUAGE, description-based show extraction, expanded promo patterns, extracted-name filtering, updated confidence paths, and corresponding tests.
Resolved podcast matching
core/data/src/main/java/cx/aswin/boxcast/core/data/crosspromo/CrossPromotionResolver.kt
Resolution handles blank queries and ranks multiple search results using normalized title similarity and token overlap.

Estimated code review effort: 4 (Complex) | ~60 minutes

Suggested labels: user-impact-medium, backend-change

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
  • 🛠️ update changelog

Comment @coderabbitai help to get the list of available commands.

@ashwkun
ashwkun merged commit cfe7699 into master Jul 17, 2026
1 of 2 checks passed
@ashwkun
ashwkun deleted the fix/minor-import-and-cross-promo branch July 17, 2026 10:58
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

user-impact-low Minor user-facing polish — CHANGELOG yes; README optional

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant