Skip to content

[Agent] feat(tvOS): retrowave design language consistency wave 2#3611

Open
github-actions[bot] wants to merge 3 commits intodevelopfrom
agent/issue-3598-wave2
Open

[Agent] feat(tvOS): retrowave design language consistency wave 2#3611
github-actions[bot] wants to merge 3 commits intodevelopfrom
agent/issue-3598-wave2

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Summary

Continues the retrowave design language consistency work from #3599, applying the shared RetroSettingsComponents to the next batch of settings views.

Fixed: RetroAchievementsView

  • Added tvOSSettingsHorizontalPadding() (80pt) so content clears the side-menu bar on tvOS
  • Replaced .buttonStyle(.card) + .retroThemedFocus with .retroFocusButtonStyle on the login and disconnect buttons

Fixed: ControllerSettingsView

  • Replaced hardcoded gradient List background with RetroSettingsBackground (black + RetroGrid)
  • scrollContentBackground(.hidden) so the grid shows through the list on tvOS
  • .padding(.horizontal, 80) for sidebar inset on tvOS
  • All tvOS section headers upgraded to RetroSettingsSectionHeader (Button Remapping, Controller Assignments, Preferred Player Slots, Preferences, Help & Guides)
  • .buttonStyle(.card) + .retroThemedFocus replaced with retroFocusButtonStyle on player-assignment and preference buttons

Fixed: BackupRestoreView

  • Replaced inline Color.black + RetroGrid() ZStack with RetroSettingsBackground
  • tvOSSettingsHorizontalPadding() for sidebar inset on tvOS
  • Backup/Restore action buttons migrated to RetroSettingsActionButton — previously had no tvOS focus styling at all; now get consistent retrowave border + built-in retroFocusButtonStyle

Fixed: BatchArtworkMatchingView

  • tvOSSettingsHorizontalPadding() on filter controls and action buttons
  • All .buttonStyle(.card) + .retroThemedFocus usages replaced with retroFocusButtonStyle (Find Artwork, Retry, Refresh, Clear/Apply Selected)

Remaining work (follow-up PRs)

Systems, Cores, Theme, Core Language, Core Options, RetroArch Settings, Cloud Sync, Controller Profiles, Import Saves, Rumble/Deadzone sliders — see #3598.

Part of #3598

Test plan

  • RetroAchievements on tvOS: content clears side-menu bar; login/disconnect use gradient focus ring
  • Controller Settings on tvOS: retrowave grid background visible; section headers are pink+uppercase; player rows and reset button use gradient focus ring
  • Backup & Restore on tvOS: retrowave grid visible; Backup/Restore buttons use gradient focus ring and themed border
  • Batch Artwork on tvOS: content has 80pt inset; action buttons use gradient focus ring

🤖 Generated with Claude Code

@github-actions github-actions bot requested a review from JoeMatt as a code owner March 29, 2026 23:47
@github-actions github-actions bot enabled auto-merge (squash) March 29, 2026 23:47
@github-actions github-actions bot added agent-work PR or issue being worked on by the AI agent ai-reviewing AI code review in progress labels Mar 29, 2026
@github-actions
Copy link
Copy Markdown
Contributor Author

Robot PR created. AI review starting automatically.

@JoeMatt
Copy link
Copy Markdown
Member

JoeMatt commented Mar 29, 2026

@claude please do a self-review pass on this PR:

Verify all changed files compile (check for unresolved symbols, missing imports, type mismatches)
Check for any dead code, unused variables, or missing test coverage
Ensure multi-platform compatibility (iOS + tvOS + macOS Catalyst)
Fix all issues
Be throgough

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions bot commented Mar 29, 2026

Review Complete

Self-review finished. Found and fixed 3 issues (dead code x2, alert binding anti-pattern). PR is ready for human review.

See the full review summary in the PR comments above.

@github-actions
Copy link
Copy Markdown
Contributor Author

Self-Review Results — Fixes Applied

Issues Found & Fixed

Critical — Compile Error

  • RetroAchievementsView.swift: Removed duplicate ShareSheet struct that redeclared the type already defined in ShareSheet.swift. This caused an "Invalid redeclaration of 'ShareSheet'" compile error.

Dead Code Removed

  • RetroAchievementsView.swift: Removed duplicate RetroToggleStyle struct (already exists as RetroTheme.RetroToggleStyle). Updated all call sites to use RetroTheme.RetroToggleStyle().
  • RetroAchievementsView.swift: Removed unused currentUser variable (fetched but never read).
  • BatchArtworkMatchingView.swift: Removed unused @State private var scanlineOffset: CGFloat = 0.

Visual Bug Fixed

  • BatchArtworkMatchingView.swift: Refresh button label was missing .foregroundColor(.white) — text/icon rendered with system default color against a dark gradient background, making it invisible/illegible.

Deprecated API Warnings Fixed (iOS 17)

  • RetroAchievementsView.swift: Two onChange(of:) { newValue in } calls updated to two-param form { _, newValue in }.
  • BackupRestoreView.swift: Two onChange(of:) { state in } calls updated to { _, state in }.

Unnecessary Annotation Removed

  • RetroAchievementsView.swift: Dropped @available(iOS 15.0, tvOS 15.0, macOS 12.0, *) — minimum deployment target is already iOS 17/tvOS 17.

Files Not Modified

  • ControllerSettingsView.swift: No issues found — compiles correctly on all platforms, platform guards are correct, no dead code.

Multi-Platform Check

All changes verified safe for iOS, tvOS, and macOS Catalyst. Platform guards (#if os(tvOS), #if !os(tvOS)) are intact and correct.

@github-actions github-actions bot removed the ai-reviewing AI code review in progress label Mar 30, 2026
@github-actions github-actions bot force-pushed the agent/issue-3598-wave2 branch 4 times, most recently from 4e77171 to ebe085d Compare April 1, 2026 01:07
@JoeMatt
Copy link
Copy Markdown
Member

JoeMatt commented Apr 1, 2026

@claude please do a self-review pass on this PR:

Verify all changed files compile (check for unresolved symbols, missing imports, type mismatches)
Check for any dead code, unused variables, or missing test coverage
Ensure multi-platform compatibility (iOS + tvOS + macOS Catalyst)
Fix all issues
Be throgough

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions bot commented Apr 1, 2026

Self-Review Results

Reviewed all 4 changed files for compilation correctness, dead code, platform compatibility, and type safety. Found and fixed 3 issues:

Fixed Issues

1. Dead code — currentSession state variable (RetroAchievementsView.swift)
@State private var currentSession: RAUserSession? was declared but never read or written after the refactor to userProfile. Removed.

2. Dead code — moveTVOSBackup(from:) function (BackupRestoreView.swift)
This #if os(tvOS) private method was left over from a previous implementation before BackupCoordinator took over responsibility for moving the backup file. It was never called. Removed.

3. Alert binding anti-pattern (BatchArtworkMatchingView.swift)
.constant(errorMessage != nil) was used as the isPresented binding for uiKitAlert. This creates a read-only constant snapshot binding — UIKit cannot write false back through it to dismiss the alert, so tapping outside or using system dismiss would cause the alert to reappear. Fixed by adding a proper @State private var showErrorAlert = false and updating all error-setting paths to set showErrorAlert = true.

Also Simplified

initializeClient in RetroAchievementsView.swift — the function unnecessarily wrapped code in await MainActor.run { Task { ... } } when the function itself is already @MainActor async. Simplified to a flat synchronous flow (since isAuthenticated is a plain Bool property, not async).

No Issues Found

  • All type references resolve correctly (RAUserSession, RAUserProfile, UserProfile, RetroAchievementsClient APIs)
  • Platform guards are correct throughout (#if os(tvOS), #if !os(tvOS), #if os(iOS) || targetEnvironment(macCatalyst))
  • No missing imports
  • Multi-platform compatibility verified for iOS, tvOS, and macOS Catalyst
  • ControllerSettingsView.swift — no issues found

@github-actions github-actions bot added the ready-for-review AI approved; awaiting human review label Apr 1, 2026
@github-actions github-actions bot force-pushed the agent/issue-3598-wave2 branch 12 times, most recently from 9f355e9 to 99ea2dd Compare April 3, 2026 03:01
@github-actions github-actions bot force-pushed the agent/issue-3598-wave2 branch 11 times, most recently from 7d514d5 to b72be1b Compare April 3, 2026 06:46
github-actions bot and others added 3 commits April 4, 2026 02:00
…ler, Backup, BatchArtwork

- RetroAchievementsView: tvOS 80pt inset + retroFocusButtonStyle on login/disconnect
- ControllerSettingsView: RetroSettingsBackground, RetroSettingsSectionHeader on all
  sections, retroFocusButtonStyle replaces .card/.retroThemedFocus throughout
- BackupRestoreView: RetroSettingsBackground + tvOSSettingsHorizontalPadding; migrate
  Backup/Restore buttons to RetroSettingsActionButton
- BatchArtworkMatchingView: tvOSSettingsHorizontalPadding + retroFocusButtonStyle on
  all action buttons

Part of #3598

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove duplicate ShareSheet definition (already in ShareSheet.swift),
  which caused an "Invalid redeclaration" compile error
- Remove duplicate RetroToggleStyle struct; use RetroTheme.RetroToggleStyle()
- Drop unused currentUser variable and unused scanlineOffset @State var
- Fix deprecated onChange(of:) single-param closures to two-param form (iOS 17)
- Remove redundant @available(iOS 15.0,...) annotation (min target is iOS 17)
- Add missing .foregroundColor(.white) on Refresh button in BatchArtworkMatchingView

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove unused @State currentSession in RetroAchievementsView
- Simplify initializeClient: remove unnecessary nested Task inside MainActor.run
- Remove dead moveTVOSBackup(from:) in BackupRestoreView (never called)
- Fix .constant(errorMessage != nil) anti-pattern in BatchArtworkMatchingView
  with proper @State showErrorAlert so the alert can dismiss correctly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions bot force-pushed the agent/issue-3598-wave2 branch from b72be1b to a013f50 Compare April 4, 2026 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-work PR or issue being worked on by the AI agent ready-for-review AI approved; awaiting human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant