Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Graceful provider switch when theme unavailable (litmus-5www)

StatusDone · archived
TypeFeature
Prioritynormal
Blocked byProvider-scoped URL routing with fixture anchors (litmus-3svg)

When viewing a theme detail page and switching to a provider that doesn’t have the theme, currently loads a blank “Theme not found” page. Instead, stay on the current page and show an inline alert.

Requirements

  • When provider switch is requested but theme is unavailable for target provider, stay on current page
  • Show an alert/banner on the current page: “{theme} is not available for {provider}”
  • Add provider availability metadata to the detail page (which providers have this theme) so the UI can check before navigating
  • Provider selector in sidebar should indicate which providers have the current theme (e.g. dim/disable unavailable ones, or show a badge)
  • Dismiss alert on user action or after timeout

Design Notes

Key insight: the user is already on the page viewing the theme. Don’t navigate away and fail — prevent the bad navigation and inform inline.

Summary of Changes

Implemented graceful provider switching:

  • Provider buttons dim when theme is unavailable for that provider
  • Clicking an unavailable provider shows a dismissible alert banner instead of navigating
  • Alert auto-dismisses after 3s or on manual dismiss (x button)
  • Added theme_available_for_provider() helper, AlertMessage state, and AlertBanner component

Key files: sidebar.rs (availability check + button logic), shell.rs (AlertBanner), state.rs (AlertMessage), themes.rs (helper), style.css (styles)