[RSM] Smart Bookmarks list UI#5284
Conversation
Generated by 🚫 Danger |
There was a problem hiding this comment.
Pull request overview
This PR completes the Android-side wiring for Smart Bookmarks by triggering an enrichment request after creating a bookmark (when the feature flag is enabled) and surfacing AI-generated titles/summaries in the bookmarks list UI.
Changes:
- Trigger bookmark enrichment after new bookmark creation when
Feature.SMART_BOOKMARKSis enabled. - Add
Bookmark.displayTitleto choose between user title and AI title for display. - Update the bookmark row UI to show
displayTitleand an optional AI summary line.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| modules/services/repositories/src/main/java/au/com/shiftyjelly/pocketcasts/repositories/bookmark/BookmarkHelper.kt | Triggers enrichment when adding a new bookmark via the helper (e.g., headphones/notification path). |
| modules/services/model/src/main/java/au/com/shiftyjelly/pocketcasts/models/entity/Bookmark.kt | Introduces displayTitle computed property to select user vs AI title. |
| modules/services/compose/src/main/java/au/com/shiftyjelly/pocketcasts/compose/bookmark/BookmarkRow.kt | Uses displayTitle and renders aiSummary as a secondary line when present. |
| modules/features/player/src/main/java/au/com/shiftyjelly/pocketcasts/player/view/bookmark/BookmarkViewModel.kt | Triggers enrichment after saving a newly created bookmark from the player bookmark flow. |
8958989 to
55703ec
Compare
55703ec to
68a455d
Compare
3f769c9 to
9e9da4a
Compare
68a455d to
b906b00
Compare
677d5fc to
20c7315
Compare
b906b00 to
02b8852
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
modules/services/compose/src/main/java/au/com/shiftyjelly/pocketcasts/compose/bookmark/BookmarkRow.kt:165
- PR description says that when an AI summary is available it should appear as a secondary line beneath the title in the bookmark row, but this component currently only shows the title + created-at timestamp. If the summary line is intended for the list UI, it needs to be rendered here (or the PR description should be updated to match actual behavior).
TextH40(
text = displayTitle,
color = colors.bookmarkRow.primaryText,
maxLines = 1,
lineHeight = 18.sp,
)
TextH70(
text = createdAtText,
color = colors.bookmarkRow.secondaryText,
maxLines = 1,
modifier = Modifier.padding(top = 4.dp),
)
496e9bb to
dcf9924
Compare
- Limit episode title and bookmark title to 1 line with ellipsis - Remove AI summary from rows (displayed in detail bottom sheet instead)
9dbfd21 to
7e2c6a3
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
modules/services/compose/src/main/java/au/com/shiftyjelly/pocketcasts/compose/bookmark/BookmarkRow.kt:166
- PR description says the bookmarks list should show
aiSummaryas a secondary line beneath the title when available, butBookmarkRowcurrently only renders the title and created-at timestamp. If this PR is meant to surface summaries in the list, add a conditional secondary text line forbookmark.aiSummary(and ensure layout/spacing accounts for it).
val displayTitle = bookmark.displayTitle
TextH40(
text = displayTitle,
color = colors.bookmarkRow.primaryText,
maxLines = 1,
lineHeight = 18.sp,
)
TextH70(
text = createdAtText,
color = colors.bookmarkRow.secondaryText,
maxLines = 1,
modifier = Modifier.padding(top = 4.dp),
)
| launch { | ||
| try { | ||
| val snippet = transcriptWindowExtractor.extractWindow( | ||
| episodeUuid = bookmark.episodeUuid, | ||
| timeSecs = bookmark.timeSecs, | ||
| ) ?: return@launch | ||
|
|
||
| val response = syncManager.enrichBookmark(transcriptSnippet = snippet) | ||
| if (response.error != null) { | ||
| Timber.w("Smart bookmark enrichment returned error for ${bookmark.uuid}: ${response.error}") | ||
| val response = syncManager.enrichBookmark(transcriptSnippet = snippet) | ||
| if (response.error != null) { |
| if (title != null && summary != null) { | ||
| val now = System.currentTimeMillis() | ||
| bookmarkDao.updateAiData( | ||
| bookmarkUuid = bookmark.uuid, | ||
| aiTitle = title, | ||
| aiSummary = summary, | ||
| aiTitleModified = now, | ||
| aiSummaryModified = now, |

Description
This is the last PR on the android-side of changes, where we hook up the enrichment flow and surface the results in the UI, on the bookmarks list. When a new bookmark is created, the app now fires off a background enrichment call if the Smart Bookmarks feature flag is enabled. The enrichment runs after the bookmark is saved, so the user sees no delay.
On the display side, the bookmark row now shows the AI-generated title when the user hasn't manually edited it, with a
displayTitleproperty that picks the right one based on timestamp priority. If an AI summary is available, it appears as a secondary line beneath the title.An upcoming PR will let us open the enhanced bookmarks to see its details.
Testing Instructions
Since the backend changes are not yet deployed, the best way to test the new ui in action is to manually inject data into the database via Android Studio's Database inspector tool.
Select
pocketcastsdatabase then run these queries:1-
SELECT uuid, podcast_id FROM podcast_episodes ORDER BY published_date DESC LIMIT 1-- remember these Ids!2-
don't forget to overwrite the placeholders <PODCAST_UUID> and <EPISODE_UUID> with actual values from the previous query!
Then just navigate to the bookmarks list to see the results
design decision: p1778625860157799/1778602895.425639-slack-C05RR9P9RAT
Screenshots or Screencast
Checklist
./gradlew spotlessApplyto automatically apply formatting/linting)modules/services/localization/src/main/res/values/strings.xml