Skip to content

Comments

Add observable call preview thumbnail in Video sdk#1619

Open
rahul-lohra wants to merge 1 commit intodevelopfrom
feature/rahullohra/thumbnail
Open

Add observable call preview thumbnail in Video sdk#1619
rahul-lohra wants to merge 1 commit intodevelopfrom
feature/rahullohra/thumbnail

Conversation

@rahul-lohra
Copy link
Contributor

@rahul-lohra rahul-lohra commented Feb 18, 2026

Goal

Add observable call preview thumbnail

Implementation

val thumbnail: StateFlow<String?> = MutableStateFlow(null)

🎨 UI Changes

None

Testing

None

Summary by CodeRabbit

  • New Features
    • Added access to call thumbnail data through a new observable property. Thumbnails are automatically synchronized with server updates.

@rahul-lohra rahul-lohra self-assigned this Feb 18, 2026
@rahul-lohra rahul-lohra added the pr:new-feature Adds new functionality label Feb 18, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 18, 2026

PR checklist ✅

All required conditions are satisfied:

  • Title length is OK (or ignored by label).
  • At least one pr: label exists.
  • Sections ### Goal, ### Implementation, and ### Testing are filled.

🎉 Great job! This PR is ready for review.

@rahul-lohra rahul-lohra changed the title [AND-1062] Add observable call preview thumbnail Add observable call preview thumbnail in Video sdk Feb 18, 2026
@github-actions
Copy link
Contributor

SDK Size Comparison 📏

SDK Before After Difference Status
stream-video-android-core 12.00 MB 12.00 MB 0.00 MB 🟢
stream-video-android-ui-xml 5.68 MB 5.68 MB 0.00 MB 🟢
stream-video-android-ui-compose 6.28 MB 6.28 MB 0.00 MB 🟢

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
D Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@rahul-lohra rahul-lohra marked this pull request as ready for review February 20, 2026 09:05
@rahul-lohra rahul-lohra requested a review from a team as a code owner February 20, 2026 09:05
@coderabbitai
Copy link

coderabbitai bot commented Feb 20, 2026

Walkthrough

A new getThumbnail() method returning StateFlow<String?> was added to the CallState class. The internal thumbnail state is populated from server response data during call updates, providing external consumers access to observable thumbnail information.

Changes

Cohort / File(s) Summary
New Thumbnail Property
stream-video-android-core/api/stream-video-android-core.api, stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/CallState.kt
Added public getThumbnail() method and thumbnail StateFlow property to expose thumbnail state. Internal mutable state (_thumbnail) wired to populate from server response thumbnails.imageUrl in call update paths.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A thumbnail springs to life today,
From API calls so far away,
StateFlow ripples, smooth and bright,
Hopping updates, pure delight!
Frame by frame, the bunny cheers,
A picture's worth, through the years!

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description is minimal and vague. While it includes required sections (Goal, Implementation, UI Changes, Testing), they lack sufficient detail and context to understand the full scope of changes. Expand the description with more details: explain the purpose and use case for the thumbnail, provide implementation context, clarify testing approach, and complete the contributor checklist items (CLA, assignment, changelog updates, test coverage).
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add observable call preview thumbnail in Video sdk' clearly and specifically describes the main change: introducing an observable thumbnail property to the Video SDK.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/rahullohra/thumbnail

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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/CallState.kt (1)

669-671: Add KDoc and explicit type annotation to the new public thumbnail property.

Two nits on this new public API surface:

  1. KDoc is missing. Per the coding guidelines, public APIs require /** ... */ documentation.
  2. No explicit type annotation. Every other comparable public StateFlow property in this file carries an explicit : StateFlow<T> declaration (e.g., egress, recording, settings, …). Omitting it here is inconsistent.
✏️ Proposed fix
-    internal val _thumbnail = MutableStateFlow<String?>(null)
-    public val thumbnail = _thumbnail.asStateFlow()
+    internal val _thumbnail = MutableStateFlow<String?>(null)
+
+    /**
+     * A URL pointing to the call preview thumbnail image, or `null` if no thumbnail is available.
+     * Updated whenever new call state is received from the server.
+     */
+    public val thumbnail: StateFlow<String?> = _thumbnail.asStateFlow()

As per coding guidelines: "Use KDoc (/** ... */) for public APIs and complex subsystems."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/CallState.kt`
around lines 669 - 671, Add a KDoc block and an explicit public type annotation
to the new thumbnail property: document the property with /** ... */ describing
what the thumbnail represents and change the declaration to include the explicit
type StateFlow<String?> (matching the pattern used for other public StateFlow
properties). Ensure you still back it with the internal MutableStateFlow
_thumbnail and expose it via .asStateFlow() so the symbol names _thumbnail and
thumbnail remain unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/CallState.kt`:
- Around line 669-671: Add a KDoc block and an explicit public type annotation
to the new thumbnail property: document the property with /** ... */ describing
what the thumbnail represents and change the declaration to include the explicit
type StateFlow<String?> (matching the pattern used for other public StateFlow
properties). Ensure you still back it with the internal MutableStateFlow
_thumbnail and expose it via .asStateFlow() so the symbol names _thumbnail and
thumbnail remain unchanged.

MutableStateFlow<Map<String, Boolean?>>(emptyMap())
val participantVideoEnabledOverrides = _participantVideoEnabledOverrides.asStateFlow()

internal val _thumbnail = MutableStateFlow<String?>(null)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be private like every other mutable backing field in this class (_settings, _transcribing, _team, etc.). internal exposes the MutableStateFlow to the entire module.

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

Labels

pr:new-feature Adds new functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants