Skip to content

Display speaker's talks in the speaker detail screen#417

Open
Copilot wants to merge 3 commits intomainfrom
copilot/display-speaker-talks
Open

Display speaker's talks in the speaker detail screen#417
Copilot wants to merge 3 commits intomainfrom
copilot/display-speaker-talks

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 8, 2026

Summary

Displays the talks associated with a speaker in the speaker detail screen. When a user taps a talk card, they are navigated to the session detail screen.

Changes

  • SpeakerDetailViewModel: Now injects SessionsRepository and combines the speaker flow with a filtered sessions flow (sessions where the speaker's ID is in session.speakers).
  • SpeakerDetailsUiState: Added sessions: List<Session> field.
  • SpeakerDetailsScreen: Added onSessionClick callback and a SpeakerTalksSection composable that renders clickable ElevatedCards for each of the speaker's sessions. Added @Preview composables (SpeakerDetailsScreenPreview with talks, SpeakerDetailsScreenNoTalksPreview without talks).
  • ViewModelModule: Updated DI to pass SessionsRepository to SpeakerDetailsViewModel.
  • AVALayout: Wires onSessionClick to navigator.navigateToSessionDetail(sessionId).
  • strings.xml: Adds talks string resource for the section header.

@benju69 benju69 marked this pull request as ready for review April 8, 2026 19:41
Copilot AI review requested due to automatic review settings April 8, 2026 19:41
Copilot AI requested a review from benju69 April 8, 2026 19:42
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a “Talks” section to the speaker detail screen by deriving a speaker-specific session list from the sessions repository, and wires navigation from a talk card to the session detail screen.

Changes:

  • Extend SpeakerDetailsViewModel / SpeakerDetailsUiState to include the speaker’s associated sessions.
  • Render a “Talks” section in SpeakerDetailsScreen with clickable session cards.
  • Wire DI + navigation callback plumbing and add a talks string resource.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
shared/ui/src/commonMain/kotlin/com/androidmakers/ui/speakers/SpeakerDetailViewModel.kt Combines speaker + sessions flows and exposes sessions in UI state.
shared/ui/src/commonMain/kotlin/com/androidmakers/ui/speakers/SpeakerDetailsScreen.kt Displays speaker talks as clickable cards and adds onSessionClick callback.
shared/ui/src/commonMain/kotlin/com/androidmakers/ui/common/navigation/AVALayout.kt Connects speaker talk clicks to navigateToSessionDetail.
shared/ui/src/commonMain/kotlin/com/androidmakers/di/ViewModelModule.kt Updates Koin wiring to inject SessionsRepository into the speaker details VM.
shared/ui/src/commonMain/composeResources/values/strings.xml Adds the “Talks” section header string.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +28 to +34
speakerResult.map { speaker ->
SpeakerDetailsUiState(
speaker = speaker,
sessions = sessionsResult.getOrDefault(emptyList())
.filter { session -> speakerId in session.speakers }
)
}.toLce()
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

sessionsResult.getOrDefault(emptyList()) swallows session-loading failures and makes them indistinguishable from a real “speaker has no talks” case (the talks section will simply be hidden). Consider propagating the failure into the Lce (or representing sessions as their own Lce in SpeakerDetailsUiState) so the UI can differentiate between “no talks” vs “failed to load talks” and potentially offer retry.

Suggested change
speakerResult.map { speaker ->
SpeakerDetailsUiState(
speaker = speaker,
sessions = sessionsResult.getOrDefault(emptyList())
.filter { session -> speakerId in session.speakers }
)
}.toLce()
speakerResult.fold(
onSuccess = { speaker ->
sessionsResult.map { sessions ->
SpeakerDetailsUiState(
speaker = speaker,
sessions = sessions.filter { session -> speakerId in session.speakers }
)
}
},
onFailure = { throwable -> Result.failure(throwable) }
).toLce()

Copilot uses AI. Check for mistakes.
@benju69
Copy link
Copy Markdown
Member

benju69 commented Apr 8, 2026

@copilot do we have a preview of the SpeakerDetailsScreen ? If no add it. And if you can add a screenshot to the pr

Copy link
Copy Markdown
Author

Copilot AI commented Apr 8, 2026

@copilot do we have a preview of the SpeakerDetailsScreen ? If no add it. And if you can add a screenshot to the pr

There was no preview for SpeakerDetailsScreen — added two in commit 2971f57:

  • SpeakerDetailsScreenPreview — shows the full screen with speaker info (name, bio, socials) and two talk cards in the "Talks" section.
  • SpeakerDetailsScreenNoTalksPreview — shows the same speaker with no associated sessions (talks section is hidden).

The screen renders the speaker's name, bio, social links, and then a "Talks" section with a card per session. Tapping a card navigates to the session detail screen.

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.

3 participants