feat(medium): Fix: Spotify 'Connect' button persists after successful connection#9549
feat(medium): Fix: Spotify 'Connect' button persists after successful connection#9549
Conversation
- Show playback controls when an active device is detected, even if no track is playing. - Force device list refresh when the window regains focus. - Improve 'Connect' button UX with initialization state and spinner. - Add reproduction test case. Co-authored-by: arii <342438+arii@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
👋 Welcome to HRM!Thanks for your contribution. This repository uses Gemini AI for automated triage, code review, and generation. 🤖 Gemini Manual Trigger Quick Reference
For more details and GitHub CLI examples, see the Manual Trigger Guide. |
ℹ️ Gemini Review DisabledAutomatic review is currently disabled via Via Comment: Via GitHub Actions:
Via GitHub CLI: gh workflow run reusable-gemini-review.yml -f pr_number=9549🤖 Manual Trigger Quick Reference
Full reference: Manual Trigger Guide To re-enable: Set repository variable |
🤖 Gemini Review SkippedReview was skipped for the following reason: 🤖 Manual Trigger Quick Reference
|
- Show playback controls when an active device is detected, even if no track is playing. - Force device list refresh when the window regains focus. - Improve 'Connect' button UX with initialization state and spinner. - Add reproduction test case and fix linting/formatting issues. Co-authored-by: arii <342438+arii@users.noreply.github.com>
🤖 Gemini Review SkippedReview was skipped for the following reason: 🤖 Manual Trigger Quick Reference
|
- Show playback controls when an active device is detected, even if no track is playing. - Force device list refresh when the window regains focus. - Improve 'Connect' button UX with initialization state and spinner. - Add reproduction test case. - Fix linting (unused import) and Prettier formatting issues. - Update VRT snapshots for intentional UI changes. - Make VRT button selection robust using test IDs. Co-authored-by: arii <342438+arii@users.noreply.github.com>
🤖 Gemini Review SkippedReview was skipped for the following reason: 🤖 Manual Trigger Quick Reference
|
1 similar comment
This PR effectively addresses the reported bug where the Spotify 'Connect' button persisted after a successful connection, and also introduces valuable UX improvements. Key Improvements:
The changes are well-implemented, follow project guidelines, and are thoroughly tested. Great work!
🤖 Gemini Manual Trigger Quick Reference
|
Thank you for the review and the detailed summary of the improvements. Acknowledged. |
- Confirmed robust UI state logic for Spotify controls. - Verified fix for 'Connect' button persistence. - Acknowledged PR review feedback. Co-authored-by: arii <342438+arii@users.noreply.github.com>
🤖 Gemini Review SkippedReview was skipped for the following reason: 🤖 Manual Trigger Quick Reference
|
🤖 AI Technical AuditCode Review: Spotify 'Connect' button persistence fixOverall, the core logic changes address the UX issue perfectly. Transitioning the display logic from 🚨 ANTI-AI-SLOP DIRECTIVES
📂 File-by-File Analysis
|
Implemented the debounced focus listener to prevent API spam, removed redundant aria-disabled attributes, and cleaned up verbose comments in the test file as requested. Thanks for the thorough audit! |
…bility - Debounce window focus listener to prevent Spotify API rate-limiting. - Remove redundant aria-disabled attribute on native button. - Remove verbose narrative comments from reproduction test. Co-authored-by: arii <342438+arii@users.noreply.github.com>
🤖 Gemini Review SkippedReview was skipped for the following reason: 🤖 Manual Trigger Quick Reference
|
🤖 Gemini Review SkippedReview was skipped for the following reason: 🤖 Gemini Manual Trigger Guide |
🤖 AI Technical AuditPR Review: Spotify Control Logic Refinement (#9549)Architectural ImpactThis PR shifts the source of truth for the Spotify UI from a purely metadata-driven approach to a device-availability approach. This is more robust as it accounts for the 'idle' state of the Spotify Connect ecosystem. However, introducing a global Anti-AI-Slop Directives
File-by-File Analysis
|
…re (#9566) Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: arii <342438+arii@users.noreply.github.com>
🤖 Gemini Review SkippedReview was skipped for the following reason: 🤖 Gemini Manual Trigger Guide |
🤖 AI Technical AuditPR Review: Fix Spotify 'Connect' Button PersistenceSummaryThis PR addresses an issue where the 'Connect' CTA incorrectly persisted when a Spotify device was active but no track was playing. It also introduces a focus-based device refresh mechanism and enhances the button's loading state. Architectural Impact
Anti-AI-Slop Directives
File-by-File Analysis
|
…9583) Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: arii <342438+arii@users.noreply.github.com>
🤖 Gemini Review SkippedReview was skipped for the following reason: 🤖 Gemini Manual Trigger Guide |
Description
The Spotify control section on the /client/control page incorrectly showed the 'Connect' CTA instead of playback controls when a device was active but no track was playing. This occurred because the UI state relied on track metadata rather than device availability. This PR updates the UI logic to correctly display playback controls when a Spotify device is active, even if no track is currently playing, and improves device refreshing.
Fixes #9305
Change Type: 🐛 Bug fix (non-breaking change fixing an issue)
Changes Made
SpotifyControls.tsxto prioritize thespotifyServiceInitializedflag and the presence of any active devices. Controls are now shown if the service is ready AND (track data exists OR an active device exists).GET_DEVICEScommand when the tab regains focus, resolving stale device lists.Testing
Verified with unit tests (including a new reproduction test) and visual verification via Playwright.
Related Issues
Closes #9305
Original PR Body
The Spotify control section on the /client/control page incorrectly showed the 'Connect' CTA instead of playback controls when a device was active but no track was playing. This occurred because the UI state relied on track metadata rather than device availability.
This PR implements the following fixes:
SpotifyControls.tsxto prioritize thespotifyServiceInitializedflag and the presence of any active devices. Controls are now shown if the service is ready AND (track data exists OR an active device exists).GET_DEVICEScommand when the tab regains focus, resolving stale device lists.Verified with unit tests (including a new reproduction test) and visual verification via Playwright.
Fixes #9305
PR created automatically by Jules for task 5529974195545826471 started by @arii