Repository navigation
Make @/lib/routes the single entry point for routes - #25
Merged
haroldadmin merged 1 commit intoOct 28, 2026
Merged
Conversation
Routes are now read, validated, and written only through `@/lib/routes` (server) and `@/lib/routes/shared` (client-safe), following the reviews and profiles modules. - Reads are `load*` functions with a `labelled` filter and an AbortSignal. `loadRoutes` takes activity and author filters, replacing `fetchRoutesPage`, `fetchRecentRoutes`, and `fetchRoutesByAuthor`. - Route types narrow to RouteHeadline, RouteSummary, and Route. - `fetchRouteGpx` returns typed failure reasons like `fetchAvatar`. - `createRoute`, `saveRoute`, and `deleteRoute` own the record writes, including the ownership check. - Route input is validated with a Zod schema. Reading the form moves next to the route forms. - Folds in `labels.ts`, `route-search.ts`, and `route-form.ts`. The lexicon vocabulary stays server-side so it isn't bundled for the browser. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M9KZ6SDuRW4inA7dgB2nYh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #24. Applies the same data access cleanup to routes: everything goes through
@/lib/routes(and@/lib/routes/sharedfor client components).load*functions with alabelledfilter and anAbortSignal. A singleloadRouteswithactivityandauthorfilters replaces three list functions.RouteHeadline,RouteSummaryandRoute.fetchRouteGpxreturns typed failure reasons.createRoute,saveRouteanddeleteRouteown record writes, including the ownership check.labels.ts,route-search.tsandroute-form.tsare folded into the module.Generated by Claude Code