Skip to content

fix: prevent Library page crash on TV shows tab#98

Merged
Gitsack merged 2 commits intomainfrom
ham-116-fix-library-tvshows-tab
Apr 11, 2026
Merged

fix: prevent Library page crash on TV shows tab#98
Gitsack merged 2 commits intomainfrom
ham-116-fix-library-tvshows-tab

Conversation

@Gitsack
Copy link
Copy Markdown
Owner

@Gitsack Gitsack commented Apr 5, 2026

Summary

  • Fix dashboard TV Shows link using ?tab=tvshows instead of the correct ?tab=tv, which caused MEDIA_TYPE_CONFIG lookup to return undefined
  • Add validation for the tab URL parameter in the Library page so invalid values fall back to movies instead of crashing

Fixes HAM-116.

Test plan

  • Navigate to dashboard and click the TV Shows stat card — should open Library on TV shows tab without error
  • Manually visit /library?tab=invalid — should fall back to movies tab
  • All existing frontend tests pass (298 tests verified)

🤖 Generated with Claude Code

Gitsack and others added 2 commits April 5, 2026 15:50
…board

The dashboard TV Shows stat card linked to /library?tab=tvshows, but the
valid MediaType key is 'tv'. The invalid tab value caused a crash when
accessing MEDIA_TYPE_CONFIG with an unknown key. Fixed the link and added
validation so unrecognized tab params fall back to 'movies'.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@Gitsack Gitsack merged commit 616f884 into main Apr 11, 2026
@Gitsack Gitsack deleted the ham-116-fix-library-tvshows-tab branch April 11, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant