Repository navigation
feat: add Watch Together to profile menus - #120
Conversation
📝 WalkthroughWalkthroughChangesAdds a shared Watch Together gateway and routing policy, then exposes Watch Together from authenticated Android phone and TV menus. Phone and TV support hosting empty vote rooms, resuming in-process rooms, joining by code, destination routing, and explicit room leaving while browsing preserves continuity. Watch Together entry flow
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant ProfileMenu
participant EntrySurface
participant EntryViewModel
participant EntryGateway
participant Navigation
ProfileMenu->>EntrySurface: open Watch Together
EntrySurface->>EntryViewModel: host, resume, or join
EntryViewModel->>EntryGateway: createRoom, joinRoom, or setSelection
EntryViewModel->>Navigation: emit resolved destination
EntrySurface->>Navigation: navigate and dismiss
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 PMD (7.26.0)androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/detail/TvItemDetailScreen.ktopenjdk version "17.0.19" 2026-04-21 LTS 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/watchtogether/WatchTogetherMenuEntrySourceTest.kt (1)
8-69: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRemove the source-text UI tests.
These tests couple to implementation strings rather than critical shared behavior and violate the Android test policy.
androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/watchtogether/WatchTogetherMenuEntrySourceTest.kt#L8-L69: remove the profile-menu/source-string assertions.androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/watchtogether/WatchTogetherLobbyContinuitySourceTest.kt#L8-L40: remove the lobby/source-string assertions.As per coding guidelines, “do not add tests for small or UI-only changes unless requested.”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/watchtogether/WatchTogetherMenuEntrySourceTest.kt` around lines 8 - 69, Remove the source-text UI tests entirely: delete all profile-menu/source-string assertions in androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/watchtogether/WatchTogetherMenuEntrySourceTest.kt lines 8-69 and all lobby/source-string assertions in androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/watchtogether/WatchTogetherLobbyContinuitySourceTest.kt lines 8-40; no replacement tests are needed.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/superpowers/plans/2026-07-27-watch-together-user-menu-entry.md`:
- Around line 2104-2105: Correct the profile dropdown smoke-test expectation so
Watch Together appears immediately after Requests when Requests is present,
rather than after History. Preserve the existing Settings ordering and verify
the sequence as Requests → Watch Together → Settings.
---
Nitpick comments:
In
`@androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/watchtogether/WatchTogetherMenuEntrySourceTest.kt`:
- Around line 8-69: Remove the source-text UI tests entirely: delete all
profile-menu/source-string assertions in
androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/watchtogether/WatchTogetherMenuEntrySourceTest.kt
lines 8-69 and all lobby/source-string assertions in
androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/watchtogether/WatchTogetherLobbyContinuitySourceTest.kt
lines 8-40; no replacement tests are needed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 71bd5e49-c6b9-4a95-9c4f-53d2bd9fd80e
📒 Files selected for processing (33)
androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/components/MainAppTopBar.ktandroidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/MainScreen.ktandroidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/home/HomeScreen.ktandroidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/libraries/LibrariesScreen.ktandroidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/watchtogether/WatchTogetherEntrySheet.ktandroidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/watchtogether/WatchTogetherEntryViewModel.ktandroidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/watchtogether/WatchTogetherLobbyScreen.ktandroidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/watchtogether/WatchTogetherMenuEntrySheet.ktandroidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/watchtogether/WatchTogetherEntryViewModelTest.ktandroidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/watchtogether/WatchTogetherLobbyContinuitySourceTest.ktandroidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/watchtogether/WatchTogetherMenuEntrySourceTest.ktandroidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/navigation/TvAppNavigation.ktandroidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/detail/TvItemDetailScreen.ktandroidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/watchtogether/TvWatchTogetherDestination.ktandroidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/watchtogether/TvWatchTogetherLobbyScreen.ktandroidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/watchtogether/TvWatchTogetherMenuEntryDialog.ktandroidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/watchtogether/TvWatchTogetherViewModel.ktandroidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/shell/TvMainShell.ktandroidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/watchtogether/TvWatchTogetherDestinationTest.ktandroidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/watchtogether/TvWatchTogetherLobbyContinuitySourceTest.ktandroidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/watchtogether/TvWatchTogetherMenuEntrySourceTest.ktandroidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/watchtogether/TvWatchTogetherSurfaceSourceTest.ktandroidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/watchtogether/TvWatchTogetherViewModelTest.ktandroidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/shell/TvShellFocusStateTest.ktdocs/superpowers/plans/2026-07-27-watch-together-user-menu-entry.mddocs/superpowers/specs/2026-07-27-watch-together-user-menu-entry-design.mdshared/src/commonMain/kotlin/org/siloserver/silo/di/RepositoryModule.ktshared/src/commonMain/kotlin/org/siloserver/silo/repository/WatchTogetherRepository.ktshared/src/commonMain/kotlin/org/siloserver/silo/watchtogether/WatchTogetherEntryGateway.ktshared/src/commonMain/kotlin/org/siloserver/silo/watchtogether/WatchTogetherEntryPolicy.ktshared/src/commonTest/kotlin/org/siloserver/silo/repository/WatchTogetherRepositoryTest.ktshared/src/commonTest/kotlin/org/siloserver/silo/watchtogether/RoomSessionTest.ktshared/src/commonTest/kotlin/org/siloserver/silo/watchtogether/WatchTogetherEntryPolicyTest.kt
| 1. Open the profile dropdown; verify Watch Together follows History and | ||
| precedes Requests/Settings. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Correct the TV smoke-test ordering.
This says Watch Together follows History and precedes Requests, contradicting the required Requests → Watch Together order. As per coding guidelines, “Add Watch Together … immediately after Requests when Requests is present.”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/superpowers/plans/2026-07-27-watch-together-user-menu-entry.md` around
lines 2104 - 2105, Correct the profile dropdown smoke-test expectation so Watch
Together appears immediately after Requests when Requests is present, rather
than after History. Preserve the existing Settings ordering and verify the
sequence as Requests → Watch Together → Settings.
Source: Coding guidelines
Summary
Verification completed
Pending before ready for merge
Known baseline limitation
The repository-wide Gradle
testgate reaches 968 release tests and fails only the existing Room migration test because release-unit-test assets do not include the committed schema fixture. Focused debug migration coverage passes; direct isolatedorigin/mainevidence and source-set parity classify this separately from the feature. No baseline asset workaround is included here.Scope
Android phone and Android TV only. No automatic host transfer, ownership election, cross-process room restoration, server endpoint, protocol, production proxy, or physical-device deployment changes.
Summary by CodeRabbit
New Features
Tests
Documentation