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

Provider-scoped URL routing with fixture anchors (litmus-3svg)

StatusDone ยท archived
TypeFeature
Prioritynormal

Restructure URL routing to include the provider and support fixture-level deep links.

Current: /theme/ayu-light Target: /kitty/theme/ayu-light#python-repl

Requirements

  • Change route from /theme/:slug to /:provider/theme/:slug
  • Derive ActiveProvider from URL parameter instead of global signal
  • Apply same pattern to other routes: /:provider/compare/:slugs, /:provider/scene/:scene_id
  • Browse page: /:provider/ (or keep / and redirect based on provider)
  • Add anchor IDs to fixture sections in detail page (scene-{fixture.id} may already exist)
  • Update URL hash on scroll using existing IntersectionObserver logic
  • Navigating to a URL with #fixture-id scrolls to that fixture
  • Update all internal links (browse page cards, sidebar, minimap) to include provider prefix

Notes

Provider switching in sidebar should navigate to the new provider-scoped URL rather than toggling a global signal.

Summary of Changes

Implemented provider-scoped URL routing:

  • Route enum uses #[nest("/:provider")] to prefix all routes with the provider
  • Root / redirects to /{default_provider}/
  • Shell syncs URL provider โ†’ ActiveProvider signal
  • Provider selector navigates via Link instead of toggling state
  • All internal links include provider parameter
  • Fixture deep-links: #fixture-id scrolls on load, URL hash updates on scroll via IntersectionObserver

Key files: main.rs (Route enum + helpers), shell.rs (sync), sidebar.rs (navigation), all page components