Skip to content

watchlist routes: convert 8 routes to TanStack route loaders + error component convention #513

@electather

Description

@electather

Part of epic #491. Owner direction repeated on 8 route files:

use route loader for the content of the page.
use tanstack router convention for error boundary.

Routes (8)

  • apps/client/src/routes/_authenticated/_app/watchlist.tsx
  • apps/client/src/routes/_authenticated/_app/watchlist.index.tsx
  • apps/client/src/routes/_authenticated/_app/watchlist.ready.tsx
  • apps/client/src/routes/_authenticated/_app/watchlist.in-progress.tsx
  • apps/client/src/routes/_authenticated/_app/watchlist.awaiting.tsx
  • apps/client/src/routes/_authenticated/_app/watchlist.upcoming.tsx
  • apps/client/src/routes/_authenticated/_app/watchlist.unavailable.tsx
  • apps/client/src/routes/_authenticated/_app/watchlist.moods.$moodId.tsx

Goal

  • Move data fetching out of component into route loader (or loaderDeps + loader).
  • Use TanStack errorComponent route option instead of in-component <ErrorBoundary> wrapper.
  • Page components consume loader data via Route.useLoaderData() / suspense queries.

Bonus item

watchlist.moods.$moodId.tsx:16 — review comment "is this needed?". Verify the line in question and remove if dead.

Acceptance criteria

  • All 8 routes use route loaders.
  • All 8 routes use errorComponent route option (no <ErrorBoundary> wrappers in components).
  • V.WL1–V.WL11 invariants still pinned.
  • Typecheck passes.
  • Verify in browser: cold load, navigation between buckets, mood detail all render correctly; error states route to errorComponent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: client@ent-mcp/client packagetype: refactorInternal cleanup without behaviour change

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions