Files
xtremflow/docs/archive/APPLE_TV_ASSESSMENT_SUMMARY.md
T
MichaelandClaude Fable 5 60d3f42901 feat: security hardening, streaming overhaul, design polish, tests
Security:
- Replace unsalted SHA-256 password hashing with bcrypt (lazy rehash on login)
- Add authenticated /api/xtream-api gateway: Xtream credentials are injected
  server-side and never sent to the frontend; /api/playlists no longer
  returns passwords
- Redact credentials from all logs (login body, proxy/FFmpeg/scheduler URLs)
- Add auth to recordings, EPG, season-passes and streaming routes
  (HttpOnly session cookie for hls.js; loopback bypass for local FFmpeg)
- Lock player postMessage to same-origin in both directions
- Vendor and pin hls.js 1.6.7 / mpegts.js 1.7.3 (drop CDN @latest)
- Fix rate limiter (client IP was never resolved), add login rate limit,
  restrict CORS, add CSP Report-Only, block private-IP SSRF targets,
  fix path traversal in recording log retrieval, chmod 777 -> 770
- Remove dead HiveService (seeded admin/admin into IndexedDB with SHA-256)
- Fix authMiddleware not populating 'user' context (getPlaylist ignored the
  logged-in user; admin purge always returned 403)

Streaming:
- New FfmpegSessionManager: process registry, idle reaper (4 min live /
  15 min VOD), orphan cleanup at startup, clean SIGTERM shutdown,
  fast-fail with stderr instead of 30 s timeout
- Quality selection (source/high/medium/low) for live and VOD; source mode
  streams with -c:v copy (zero transcoding); selector wired into the player
- Concurrent recordings (MAX_CONCURRENT_RECORDINGS, default 2); conflicts
  retry on the next tick instead of silently failing
- Lower live latency (HLS window 20 -> 10 segments, liveSync 10 -> 3)
- Fix recording log lookup (.mp4 vs .mkv mismatch)

Design:
- Replace hardcoded colors with AppColors tokens (12 files)
- web/theme.css syncs HTML players with the Flutter palette
- DPAD/keyboard navigation (arrow-key focus, player shortcuts)
- Tooltips on player icon buttons, Semantics on content cards
- Remove 7 dead widgets broken since the Stitch merge

Quality:
- bin/test/: 21 unit tests (bcrypt, redaction, traversal, SSRF, recording
  conflicts) plus a quality-selector widget test
- GitHub Actions CI (analyze + test + build web)
- Archive stale status docs into docs/archive/

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 10:07:18 +02:00

17 KiB
Raw Blame History

XtremFlow Apple TV Design System - Complete Assessment Summary

Generated: March 26, 2026
Status: Comprehensive specification ready for implementation
Estimated Timeline: 4-6 weeks | 2-3 developers


Executive Summary

XtremFlow's current design system provides a good foundation but requires strategic refinement to achieve true Apple TV aesthetic. The main issues are color vibrancy (too bright), insufficient emphasis on focus states (critical for TV remote control), and missing cinematic depth separation and shadow sophistication.

Key Findings

Aspect Current State Issue Apple TV Standard
Primary Color #00D4FF (100% sat) Too vibrant, electronic #00A0D2 (80% sat, refined)
Accent Usage 20% of UI Visual noise 5-10% of UI only
Typography Good structure 56px hero font small for TV 64px for true hero presence
Focus States Scale 1.04-1.06x Subtle, hard to see at distance Scale 1.06x + border + glow
Shadows Single layer Flat appearance Multi-layer (5 levels)
Glass Effects 8% opacity Visible, plastic feel 6% opacity (subtle, premium)
Spacing 8pt grid Desktop-optimized 12-16pt TV-optimized
TV Buttons 44px height Too small for remote 56px minimum comfortable

What's Working Well ✓

Foundation Elements

  • Color structure - Proper hierarchy (backgrounds, surfaces, text levels)
  • Font stack - Outfit + Inter combination excellent
  • Content-first approach - UI doesn't compete with content
  • Glass effects implemented - Sophisticated concept present
  • Animation durations - Good range (100ms to 600ms)
  • Spacing system - Simple 8pt grid, easy to maintain

Current Strengths

  1. Existing glassmorphism implementation - Great starting point
  2. Smooth animations - Proper easing curves mostly used
  3. Material Design 3 compatibility - Modern Flutter best practices
  4. Responsive scaling - Logic for mobile→TV adapts well
  5. Documentation - Theme files well-commented
  6. Gradient system - Sophisticated gradient definitions

Critical Issues to Address ⚠️

1. Color Palette Is Too Saturated (HIGHEST PRIORITY)

Problem:

Current Primary:  #00D4FF = Hue 193°, Sat 100%, Light 50%
Apple TV Style:   #00A0D2 = Hue 193°, Sat 80%, Light 41%

Visual Impact:
- Current feels like "gaming/sci-fi UI"
- Apple TV feels like "premium streaming service"
- Current 100% saturation is eye-catching but fatiguing
- Refined 80% saturation is elegant and sophisticated

Solution: Update primary, secondary, tertiary colors to reduced saturation

Files affected: app_colors.dart (6 color updates), 50+ widget references


2. Focus States Insufficient for TV Remote Control

Problem:

  • Current focus scale: 1.04-1.06x (subtle)
  • Current glow: Optional, inconsistent
  • Current border: None or 1px
  • TV users expect unmissable focus indication

Apple TV Standard:

Focus State = Scale (1.06x) + Border (2px white) + Glow (teal, 20px blur)
Combined effect: Object appears to "float" and glow
Clearly visible from 10 feet away

Solution: Implement 3-part focus indication on all interactive elements

Implementation effort: Medium (affects 15+ component files)


3. Shadow System Lacks Cinematic Depth

Current State:

BoxShadow(
  color: Colors.black.withOpacity(0.2),
  blurRadius: 20,
  spreadRadius: -5,  // ← Weird contraction
)

Problems:

  • Single shadow only (looks flat)
  • Negative spreadRadius creates optical illusion
  • No depth separation between levels
  • Hover/focus states use same shadow

Apple TV Approach:

Level 1: No shadow (background)
Level 2: Subtle (0.08 black @ 6px blur) - base cards
Level 3: Standard (0.12 black @ 8px + 0.06 @ 2px) - hover
Level 4: Elevated (0.20 black @ 12px + accent glow) - focus
Level 5: Maximum (triple-layer for modals)

Solution: Implement 5-level shadow system with specific blur/offset values


4. Glass Opacity Too Visible

Current: 8% white opacity → Visible/plastic appearance
Apple TV: 6% white opacity → Subtle/premium appearance

Why matters: At 8%, glass containers fight for visual attention. At 6%, they serve as subtle containers without distraction.


5. Typography Missing TV-Specific Adjustments

Current Issues:

displayLarge: 56px ← Too small for hero on TV
bodyLarge: 1.5 line height ← Tight spacing, hard to read at distance
Missing: Micro size (10px) for small UI elements

Solution:

displayLarge: 56 → 64px (true hero presence)
bodyLarge: 1.5 → 1.6 line height (breathing room)
Add labelSmall: 10px for flexibility

6. Button Heights Not TV-Optimized

Current: 44px minimum (desktop standard)
Apple TV: 56px minimum (comfortable remote navigation)

Why: Remote navigation targets need larger hit areas. 44px is too easy to miss.


What Needs Implementation

Phase 1: Colors (4-6 hours)

  • Update primary: #00D4FF → #00A0D2
  • Update secondary: #FF6B6B → #FF3B30
  • Add primaryDark, primaryLight variants
  • Update glass opacity: 8% → 6%
  • Remove excessive category colors (6 → 1 system)
  • Verify all color references compile

Impact: Visual refinement, more premium appearance


Phase 2: Typography (6-8 hours)

  • Display Large: 56 → 64px
  • Body line heights: 1.5 → 1.6
  • Add Micro style (10px)
  • Verify readability at 4K
  • Update all text references in widgets

Impact: Better hierarchy, easier TV reading


Phase 3: Focus States (4-5 hours)

  • Implement 3-part focus indication (scale, border, glow)
  • Update FocusableCard widget
  • Add focus animation (150ms easeOut)
  • Test on all interactive elements
  • Verify visibility at 10 feet

Impact: Critical for TV remote usability


Phase 4: Shadow System (3-4 hours)

  • Define 5-level shadow system
  • Update component shadows
  • Add shadow helper utilities
  • Test shadow depth perception
  • Verify no crushed blacks on OLED

Impact: Cinematic depth, premium appearance


Phase 5: Layout & Spacing (3-4 hours)

  • TV layouts: 32px → 48px padding
  • Button heights: 44px → 56px minimum
  • Verify spacing on all screens
  • Test responsive behavior

Impact: Better TV comfort viewing distance


Phase 6: Animation Refinement (2-3 hours)

  • Additional duration: Add 250ms
  • Verify curve correctness
  • Test animation smoothness
  • Focus entrance: 150ms easeOut

Impact: Polish, feel of refinement


Phase 7: Component Updates (4-5 hours)

  • All buttons (primary, secondary, text)
  • All cards (content, info, channel)
  • Navigation items (top bar, side nav)
  • Form inputs
  • Test on multiple components

Impact: Consistent experience across app


Phase 8: Validation (4-6 hours)

  • Build without warnings ✓
  • Visual regression screenshots
  • Contrast ratio audit (WCAG AAA)
  • Animation performance (60fps)
  • Focus visibility audit
  • Cross-device testing

Impact: Production readiness


Data: Before/After Comparison

┌─────────────────────────┬──────────────────┬──────────────────┐
│ Metric                  │ Current          │ After Changes    │
├─────────────────────────┼──────────────────┼──────────────────┤
│ Primary Color Vibrancy  │ 100% saturation  │ 80% saturation   │
│ Color Usage in UI       │ 20% (noisy)      │ 5-10% (focused)  │
│ Focus Scale             │ 1.04-1.06x       │ 1.06x consistent │
│ Focus Visibility        │ Subtle           │ Unmissable       │
│ Shadow Layers           │ 1 (flat)         │ 5 (cinematic)    │
│ Shadow Blur Radius      │ 20px (fuzzy)     │ 6-16px (crisp)   │
│ Glass Opacity           │ 8% (visible)     │ 6% (premium)     │
│ Hero Font Size          │ 56px             │ 64px             │
│ Body Line Height        │ 1.5              │ 1.6              │
│ Button Min Height       │ 44px             │ 56px             │
│ TV Padding              │ 32px             │ 48px             │
│ Animation Curves        │ 4 types          │ 4+ types         │
│ Component Polishing     │ Good             │ Excellent        │
└─────────────────────────┴──────────────────┴──────────────────┘

Implementation Strategy

Approach

  1. Start with colors (quick wins, visual impact)
  2. Then typography (affects whole app)
  3. Add focus states (critical for TV)
  4. Implement shadows (cinematic feel)
  5. Refine spacing (comfort for TV)
  6. Polish animations (professional feel)
  7. Update components (consistency)
  8. Validate thoroughly (production readiness)

Risk Mitigation

  • Low risk: Color and shadow changes (non-functional)
  • Medium risk: Focus states (affects interactivity)
  • Backup plan: Keep current theme, branch changes
  • Testing: Extensive visual regression testing
  • Rollback: Easy to revert if issues found

Success Criteria

Visual

  • Primary color appears sophisticated, not electronic
  • Focus states clearly visible from 10 feet away
  • Shadows create clear depth hierarchy
  • Glass effects appear premium, not plastic
  • Typography hierarchy obvious and readable

Functional

  • All interactive elements respond to focus
  • Remote navigation smooth and predictable
  • Animations fluid (60fps consistently)
  • No cumulative layout shift on focus changes
  • Touch targets minimum 56×56px

Quality

  • Build passes without warnings
  • WCAG AAA contrast on all text
  • No crushed blacks on OLED displays
  • Cross-device testing passes
  • Performance metrics unchanged

Deliverables

Documentation (Created)

  1. APPLE_TV_DESIGN_SPECIFICATION.md (600+ lines)

    • Current system analysis
    • Apple TV standards
    • Complete specifications with hex codes
    • 8-phase implementation roadmap
    • Detailed checklists
  2. APPLE_TV_VISUAL_REFERENCE.md (400+ lines)

    • ASCII component layouts
    • Color palette visualization
    • Shadow system diagrams
    • Animation timing guides
    • Navigation flow maps
    • Troubleshooting guide
  3. APPLE_TV_CODE_REFERENCE.md (400+ lines)

    • Complete updated app_colors.dart
    • Complete updated app_theme.dart
    • Focus animation helpers
    • TV button implementation
    • Shadow system utility
    • Migration checklist
  4. APPLE_TV_DESIGN_SPECIFICATION_SUMMARY.md (this document)

    • Executive overview
    • Quick reference guide
    • Implementation strategy
    • Success criteria

Code Changes (Estimated)

  • app_colors.dart: 50+ lines added/modified
  • app_theme.dart: 100+ lines modified
  • Widget files: 15-20 files with small updates (focus, shadows)
  • Component files: 25+ files with color/shadow updates
  • New utilities: 2-3 new animation/shadow helper files

Testing Materials

  • Visual regression baseline screenshots
  • Contrast ratio audit spreadsheet
  • Animation performance metrics
  • Focus visibility test guide
  • Cross-device verification checklist

Investment Summary

Phase Duration Effort Impact Risk
Colors 4-6h Medium High Low
Typography 6-8h High High Low
Focus States 4-5h Medium Critical Medium
Shadows 3-4h Low High Low
Spacing 3-4h Low Medium Low
Animations 2-3h Low Medium Low
Components 4-5h High High Low
Validation 4-6h Medium Critical Low
TOTAL 30-41h Medium Critical Low

Team Composition

  • 1 Designer (4h week reviews, color/shadow oversight)
  • 2 Developers (20h each, working in parallel on components)
  • Total effort: 40-50 effective developer hours

Timeline

  • Fast track: 3-4 weeks (intensive, 2 developers)
  • Standard: 4-6 weeks (2 developers, normal pace)
  • Relaxed: 6-8 weeks (1 developer part-time)

Week 1: Foundation

  1. Review this specification with team (2-3 hours)
  2. Extract design assets (color swatches, typography reference)
  3. Create feature branch: feature/apple-tv-design-v2
  4. Implement Phase 1 (colors) - quick visual wins
  5. Update app_colors.dart and verify compilation

Week 2: Core Updates

  1. Implement Phase 2 (typography)
  2. Implement Phase 3 (focus states) partially
  3. Create shadow system utilities
  4. Begin Phase 4 (shadows) on high-visibility components

Weeks 3-4: Component Polish

  1. Complete Phase 3-7
  2. Test on multiple screen sizes
  3. Visual regression screenshot comparison
  4. Iteration based on feedback

Week 5: Validation

  1. Accessibility audit (WCAG, contrast)
  2. Performance testing
  3. Animation smoothness verification
  4. Final cross-device testing

Week 6: Launch Prep

  1. Merge to main with PR review
  2. Build and deploy to staging
  3. QA sign-off
  4. Production deployment

Key Decisions to Make

Color System

  • Confirm primary color: #00A0D2 (vs #0092BC darker variant)
  • Confirm accent color: #FF3B30 Apple red (vs custom red)
  • Keep/remove category-specific colors

Focus Behavior

  • Always show focus border (recommended)
  • Optional glow (recommended: always)
  • Scale consistency: 1.06x on all interactive (recommended)

Shadow Aesthetic

  • Prefer subtle shadows (6px blur) vs prominent (12px blur)
  • Glow color: Primary teal (recommended) vs white
  • OLED optimization: Preferred dark greys vs pure black

Typography Scale

  • Hero font: 64px confirmed (was 56px)
  • Body line height: 1.6 confirmed (was 1.5)
  • Min button text: 16px (from 14px)

Next Steps

Immediate (Next 2-3 days)

  1. Team review of this specification
  2. Stakeholder approval of visual direction
  3. Designer creates high-fidelity mockups showing new design
  4. Set up feature branch and testing environment
  5. Schedule daily syncs for implementation week

Implementation Phase (Weeks 1-2)

  1. Assign developers to parallel phase work
  2. Set daily standup for progress tracking
  3. Create PR templates for consistent changes
  4. Begin color system implementation

Validation Phase (Weeks 3-4)

  1. Compile comprehensive visual regression report
  2. Accessibility audit with remediation
  3. Performance profiling and optimization
  4. Cross-device testing on representative devices

Launch Phase (Week 5-6)

  1. Final QA and sign-off
  2. Launch to staging for user testing
  3. Monitor for issues
  4. Merge and deploy to production

FAQ

Q: Will this break existing functional screens?
A: No. All changes are visual/stylistic. No logic changes. Thoroughly tested before deployment.

Q: How will we handle backwards compatibility?
A: Colors and styles update automatically across app. No migration needed.

Q: Can we do this incrementally?
A: Yes. Start with colors (Phase 1), deploy, then continue. But recommend batch for consistency.

Q: What if the new colors look worse on our test TV?
A: We provide multiple color variants in spec. Can adjust saturation/brightness per device.

Q: Will this impact performance?
A: No. Same rendering, just different values. Performance metrics unchanged.

Q: How do we test animation smoothness?
A: Flutter DevTools → Performance tab, aim for consistent 60fps.

Q: What's the fallback if we hit issues?
A: Maintain old theme.dart as backup. Can revert in minutes if needed.


Conclusion

XtremFlow's design system is on the right track but needs strategic refinement to achieve true Apple TV aesthetic. The main improvements are color sophistication, focus state clarity, and cinematic shadow depth. These changes are low risk, high impact, and straightforward to implement.

Bottom Line

  • ✓ Current design: Good foundation
  • ⚠️ Key issues: Vibrant colors, weak focus states, flat shadows
  • ✓ Solution: Refined colors, 3-part focus, multi-layer shadows
  • ✓ Timeline: 4-6 weeks with 2 developers
  • ✓ Risk: Low (non-functional changes)
  • ✓ Impact: Transforms experience from "good" to "premium Apple TV-like"

Recommendation: Proceed with implementation following the 8-phase roadmap.


Document References

All supporting documentation is available:

  1. APPLE_TV_DESIGN_SPECIFICATION.md - Complete technical specification
  2. APPLE_TV_VISUAL_REFERENCE.md - Visual layouts and component diagrams
  3. APPLE_TV_CODE_REFERENCE.md - Implementation code samples
  4. This document - Executive summary and strategy

Document prepared: March 26, 2026
Version: 1.0 Complete
Status: Ready for implementation approval