Skip to content

[Episode Chat] Jump to a quote and keep playing - #6149

Merged
sztomek merged 10 commits into
mainfrom
feat/episode-chat-timestamp-keeps-playing
Oct 15, 2026
Merged

sztomek merged 10 commits into
mainfrom
feat/episode-chat-timestamp-keeps-playing

Conversation

@sztomek

@sztomek sztomek commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

Tapping a quote in Ask about this episode now jumps to the start of the quote and keeps playing, as product decided. It no longer stops at the end of the quote or returns to where you were. This PR is based on #6148.

Behaviour

  • Tapping a quote seeks to its start and plays. If another episode is playing, the chat's episode starts first.
  • The whole quote is tappable now, not only the timestamp. TalkBack reads it as one button with a "Play quote" action.
  • There is no "playing" state any more, so the timestamp is no longer underlined and there is no "Stop quote" action.
  • A quote can play when it starts before the end of the episode. It no longer needs to end before it.
  • Tapping play/pause in the header while a quote is still starting cancels the quote, so it can't restart playback after a pause.
  • The quote keeps starting if the chat is closed while the episode loads.

Removed

  • The snapshot and restore of the previous playback, and the wait for the end of the quote.
  • isPlaying on ChatMessage.Quote.
  • episode_chat_quote_stop_tapped is no longer sent. Automattic/EventHorizonSchemas#140 removes it, together with the unused quote_card quote source.
  • The chat_stop_quote string and its translations.

Also in this PR (moved from the closed #6148): the header and top spacing match the design, and the close button has no circular background.

Testing Instructions

Use a debug build with "Episode Chat" on in Beta features. "Episode Chat: Playable Quotes" is on by default in debug builds.

  1. Play an episode with a transcript (Radiolab › Math Vs Machine), pause it at about 10:00, open the full-screen player, then ⋯ › Ask about this episode.
  2. Ask "Give me the exact quote with its timestamp". ✅ A quote appears with a blue timestamp (around 00:15:37). A grey timestamp means the server sent a time past the end of the episode, so that quote can't be tapped.
  3. Tap anywhere on the quote. ✅ Playback jumps to the quote's start time and keeps playing past the end of the quote. Logcat shows episode_chat_quote_play_tapped with quote_source=inline_timestamp.
  4. Tap the quote again. ✅ It jumps back to the quote's start and keeps playing.
  5. Tap a quote, then tap pause in the chat header straight away. ✅ Playback stays paused.
  6. With TalkBack, focus the quote. ✅ It's read as one item with a "Play quote" action.

Screenshots or Screencast

quote_keeps_playing.mp4

Checklist

  • If this is a user-facing change, I have added an entry in CHANGELOG.md
  • Ensure the linter passes (./gradlew spotlessApply to automatically apply formatting/linting)
  • I have considered whether it makes sense to add tests for my changes
  • All strings that need to be localized are in modules/services/localization/src/main/res/values/strings.xml
  • Any jetpack compose components I added or changed are covered by compose previews
  • I have updated (or requested that someone edit) the Event Horizon schema to reflect any new or changed analytics.

I have tested any UI changes...

  • with different themes
  • with a landscape orientation
  • with the device set to have a large display and font size
  • for accessibility with TalkBack

@claude

claude Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @sztomek's task in 1m 23s —— View job


Removing the playback snapshot and restore makes the quote flow much simpler, and I didn't find any blocking issues. The isWithinEpisode change, the whole-bubble clickable with Role.Button and the "Play quote" label, and starting the job on applicationScope so it keeps going after the chat closes all match the description. One small concurrency regression is worth fixing.

Non-blocking

  • modules/features/chat/src/main/kotlin/au/com/shiftyjelly/pocketcasts/chat/ChatViewModel.kt:223: Tapping a quote twice, or tapping a quote and then the header play/pause, while the episode is still switching over can run two playNowSuspend calls at once and restart or blip playback. Keep the join() on the cancelled job, both here and in onPlayPauseClick (the base branch had both). [Episode Chat] Jump to a quote and keep playing #6149 (comment)

@sztomek
sztomek force-pushed the feat/episode-chat-remove-clear-chat branch from ecc57c0 to 8906fd8 Compare October 9, 2026 16:36
@sztomek
sztomek force-pushed the feat/episode-chat-timestamp-keeps-playing branch from e8072c8 to bd9acec Compare October 9, 2026 16:36
@sztomek sztomek added [Type] Enhancement Improve an existing feature. [Project] Episode Chat labels Oct 9, 2026
@sztomek sztomek added this to the 8.23 milestone Oct 9, 2026
@sztomek
sztomek marked this pull request as ready for review October 9, 2026 16:50
@sztomek
sztomek requested a review from a team as a code owner October 9, 2026 16:50
@sztomek
sztomek requested review from geekygecko and removed request for a team October 9, 2026 16:50
@claude

claude Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @sztomek's task in 19s —— View job


There's nothing new since my last review. The three commits were rebased but their code is unchanged, and the earlier finding is still open.

Non-blocking

  • modules/features/chat/src/main/kotlin/au/com/shiftyjelly/pocketcasts/chat/ChatViewModel.kt:223: Two quick quote taps, or a quote tap and then play/pause, can still make playback restart or blip because two playNowSuspend calls can overlap; fix it by calling join() on the cancelled job here and in onPlayPauseClick (line 158). [Episode Chat] Jump to a quote and keep playing #6149 (comment)

@wpmobilebot wpmobilebot modified the milestones: 8.23, 8.24 Oct 12, 2026
@wpmobilebot

Copy link
Copy Markdown
Collaborator

Version 8.23 has now entered code-freeze, so the milestone of this PR has been updated to 8.24.

@sztomek
sztomek force-pushed the feat/episode-chat-remove-clear-chat branch from 8906fd8 to 37aafbf Compare October 12, 2026 10:06
@sztomek
sztomek force-pushed the feat/episode-chat-timestamp-keeps-playing branch from bd9acec to 1e364e8 Compare October 12, 2026 10:06
@claude

claude Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @sztomek's task in 19s —— View job


Nothing has changed since my last review. The three commits are the same as before, and the earlier finding is still open.

Non-blocking

  • modules/features/chat/src/main/kotlin/au/com/shiftyjelly/pocketcasts/chat/ChatViewModel.kt:223: Two quick quote taps, or a quote tap followed by play/pause, can still restart playback or make it blip. Call join() on the cancelled job here and in onPlayPauseClick (line 158). [Episode Chat] Jump to a quote and keep playing #6149 (comment)

@sztomek
sztomek force-pushed the feat/episode-chat-timestamp-keeps-playing branch from 1e364e8 to 2ef0e80 Compare October 12, 2026 15:58
@sztomek
sztomek force-pushed the feat/episode-chat-remove-clear-chat branch from 37aafbf to 1aa707a Compare October 12, 2026 15:58
@claude

claude Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @sztomek's task in 21s —— View job


This push only rebased the three commits again. The code is the same as last time, and the earlier finding is still open.

Non-blocking

  • modules/features/chat/src/main/kotlin/au/com/shiftyjelly/pocketcasts/chat/ChatViewModel.kt:223: Tapping a quote twice quickly, or tapping a quote and then play/pause, can still restart playback or make it blip. Call join() on the cancelled job here and in onPlayPauseClick (line 158). [Episode Chat] Jump to a quote and keep playing #6149 (comment)

@sztomek
sztomek force-pushed the feat/episode-chat-remove-clear-chat branch from 1aa707a to ee4eb9a Compare October 13, 2026 08:42
@sztomek
sztomek force-pushed the feat/episode-chat-timestamp-keeps-playing branch from 2ef0e80 to 36f498e Compare October 13, 2026 08:42
@claude

claude Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @sztomek's task in 17s —— View job


This push rebased the same three commits again and the code hasn't changed. The earlier finding is still open.

Non-blocking

  • modules/features/chat/src/main/kotlin/au/com/shiftyjelly/pocketcasts/chat/ChatViewModel.kt:223: Tapping a quote twice quickly, or tapping a quote and then play/pause, can still restart playback or make it blip. Fix it by calling join() on the cancelled job here and in onPlayPauseClick (line 158). [Episode Chat] Jump to a quote and keep playing #6149 (comment)

@claude

claude Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @sztomek's task in 15s —— View job


The new commit (ba7b58c) fixes the open finding: both onQuoteClick and onPlayPauseClick now join() the cancelled quote job before they read playbackStateFlow, so two playNowSuspend calls can no longer overlap. I found nothing new to raise, and nothing is still open.

@sztomek
sztomek force-pushed the feat/episode-chat-timestamp-keeps-playing branch from ba7b58c to b20a50a Compare October 13, 2026 13:32
@sztomek
sztomek force-pushed the feat/episode-chat-remove-clear-chat branch from ee4eb9a to cfaf3c5 Compare October 13, 2026 13:32
@claude

claude Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @sztomek's task in 32s —— View job


This push only rebased the four commits again. The newest one, b20a50a, still makes onQuoteClick and onPlayPauseClick join() the cancelled quote job before they read playbackStateFlow. There's nothing new to raise and no findings are still open.

@sztomek
sztomek force-pushed the feat/episode-chat-remove-clear-chat branch from cfaf3c5 to 7a23ac3 Compare October 13, 2026 14:50
@dangermattic

Copy link
Copy Markdown
Collaborator
1 Warning
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

@sztomek
sztomek changed the base branch from feat/episode-chat-remove-clear-chat to feat/episode-chat-remove-episode-details-entry October 14, 2026 10:11

@geekygecko geekygecko left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't figure out how to get a tappable quote.

Screen_recording_20261014_204146.mp4

@sztomek sztomek mentioned this pull request Oct 14, 2026
5 of 10 tasks
@sztomek
sztomek force-pushed the feat/episode-chat-remove-episode-details-entry branch from b4c43c1 to 78e7be4 Compare October 14, 2026 11:50
@sztomek
sztomek force-pushed the feat/episode-chat-timestamp-keeps-playing branch from 2b5d1cd to 9b4cb45 Compare October 14, 2026 11:54
@sztomek

sztomek commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author

@geekygecko thanks for trying it. In your screenshot the server sent the quote as 23:03:00 – 23:10:00. We read that as hours:minutes:seconds, so 23 hours in, past the end of the episode. The app then greys the timestamp and leaves the quote untappable instead of seeking past the end. (Before that check, a time like this marked the episode as played and archived it.) The server most likely meant 23:03, which is a backend format issue rather than something in this PR.

To see a tappable quote, use an episode with a transcript, e.g. Radiolab › Math Vs Machine, and ask "Give me the exact quote with its timestamp". It returns a quote at about 00:15:37 with a blue timestamp. I've updated the testing steps. The old Grass Apes example had no transcript.

@claude

claude Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @sztomek's task in 29s —— View job


This push only rebased the nine commits. The quote-playback code and the bubble layout are the same as when I last reviewed def4adc, and no earlier findings are still open.

@sztomek
sztomek force-pushed the feat/episode-chat-remove-episode-details-entry branch from 78e7be4 to 20971f3 Compare October 14, 2026 12:01
@sztomek
sztomek force-pushed the feat/episode-chat-timestamp-keeps-playing branch from 9b4cb45 to 842d2b4 Compare October 14, 2026 12:01
@claude

claude Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @sztomek's task in 16s —— View job


This push only rebased the same nine commits onto the updated base branch, which now includes #6122. The author dates and the diff are unchanged (+141/−380 across 23 files). There's nothing new to review and no earlier findings are still open.

Base automatically changed from feat/episode-chat-remove-episode-details-entry to main October 14, 2026 12:11
@sztomek
sztomek requested a review from geekygecko October 14, 2026 14:11
@sztomek
sztomek force-pushed the feat/episode-chat-timestamp-keeps-playing branch from 93b72aa to 4d79f67 Compare October 14, 2026 14:18
@claude

claude Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @sztomek's task in 59s —— View job


This push changes the base to main. Two header commits from #6148 (d783712, e220950) are now part of this diff, along with the squashed #6157 commit (4d79f67). I read both header commits and #6157 and found no correctness problems. The quote-playback code hasn't changed since fbd8994, and none of the earlier findings are still open.

Non-blocking

  • modules/features/player/src/main/java/au/com/shiftyjelly/pocketcasts/player/viewmodel/ShelfSharedViewModel.kt: The description doesn't mention 4d79f67 ([Episode Chat] Handle no-transcript and signed-out taps #6157). It adds a lot that users will see and that doesn't belong under "jump to a quote": a sign-in sheet for signed-out users when the free beta is on (until now they got the paywall), a resumed chat after sign-in, new transcript snackbar text in the overflow sheet, a restyled beta sheet and tooltip, and a bump to the eventhorizon artifact. Testers and release notes will miss these unless the description lists them.

@wpmobilebot

Copy link
Copy Markdown
Collaborator

Project dependencies changes

list
! Upgraded Dependencies
com.automattic:eventhorizon:pocket-casts-2026-10-14_08-38-51, (changed from pocket-casts-2026-10-02_16-48-21)
tree
 +--- project ':modules:features:account'
 |    \--- project ':modules:features:search'
 |         \--- project ':modules:services:analytics'
-|              +--- com.automattic:eventhorizon:pocket-casts-2026-10-02_16-48-21
+|              +--- com.automattic:eventhorizon:pocket-casts-2026-10-14_08-38-51
 |              +--- project ':modules:services:model'
-|              |    +--- com.automattic:eventhorizon:pocket-casts-2026-10-02_16-48-21 (*)
+|              |    +--- com.automattic:eventhorizon:pocket-casts-2026-10-14_08-38-51 (*)
 |              |    \--- project ':modules:services:utils'
 |              |         \--- project ':modules:services:payment'
-|              |              \--- com.automattic:eventhorizon:pocket-casts-2026-10-02_16-48-21 (*)
+|              |              \--- com.automattic:eventhorizon:pocket-casts-2026-10-14_08-38-51 (*)
 |              \--- project ':modules:services:preferences'
-|                   \--- com.automattic:eventhorizon:pocket-casts-2026-10-02_16-48-21 (*)
+|                   \--- com.automattic:eventhorizon:pocket-casts-2026-10-14_08-38-51 (*)
 \--- project ':modules:features:discover'
      \--- project ':modules:features:podcasts'
           \--- project ':modules:features:player'
                \--- project ':modules:features:transcripts'
                     \--- project ':modules:services:sharing'
-                         \--- com.automattic:eventhorizon:pocket-casts-2026-10-02_16-48-21 (*)
+                         \--- com.automattic:eventhorizon:pocket-casts-2026-10-14_08-38-51 (*)

@sztomek

sztomek commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

sorry @geekygecko , i'm gonna self-approve and merge it to reduce the piled up PRs

@sztomek
sztomek merged commit f406ccd into main Oct 15, 2026
22 checks passed
@sztomek
sztomek deleted the feat/episode-chat-timestamp-keeps-playing branch October 15, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants