Written from code on feat/trips-feature-module, 2026-11-12; Trips Next phases 3 to 6 added from code on 2026-11-27;
brought up to the 2026-11-29 design fixes (the boards home, cards, Where to?, the board, Plan together, On the day and
the phase screens) from code the same day. Mobile paths are relative to mobile/, backend paths to backend/, web
paths to trips-web/. This one doc replaces three: the shipped Trips (formerly trips-v2.md), trip boards (formerly
this file), and what was still live of the legacy path (formerly trips-and-driving.md). How the code
is laid out is in the module's README. The web road trip planner at scout-patches.com/trips has its own
doc, road-trip-planner; boards' web pages are described here
because they share boards' data and API.
Design sources: specs/2026-10-06-unified-trips-design.md, specs/2026-10-06-trip-calendar-design.md, specs/2026-11-04-trips-next-design.md (Trips Next: boards and planning §6.1 to 6.4, then social §6.3, checked facts §6.6, notification buttons §6.7 and the recap §6.8). Plans: plans/2026-10-06-unified-trips.md, plans/2026-11-04-trips-boards-phase-1.md, plans/2026-11-05-trips-planner-phase-2.md, plans/2026-11-12-trips-feature-module.md.
Summary
Trips is one screen with one question: "What kind of trip?". There are always the same three answers, and each opens a map:
- Plan my day. The planner picks the nearest patches you still need that fit a 3-hour, half-day or full-day budget, orders them nearest-next and gives every stop an arrival time, plus totals for miles, travel time and when you are done.
- Just drive. No plan. Choosing it starts the drive at once. Scout follows the road you are on (your heading) and shows the patches within a detour you choose: 5, 15, 30 or 45 minutes there and back. Add puts one in your route in Google Maps or Apple Maps, or just saves it to the drive. With Scout in the background, a notification says when a patch comes up.
- Collect nearby. Up to 8 of the patches you still need in the nearest City Challenge, routed, with an arrival time for each stop. With no Challenge to work on, the nearest patch you still need.
Starting any of them makes it the live trip, and Trips then opens on it: On the day for a planned trip, or the drive itself. Every live screen has Route in Maps, which hands the remaining stops, in order, to your maps app as one route. A planned trip sends a leave-by reminder 10 minutes before it is time to leave each stop. The Trip Calendar plans any upcoming day at a time you choose, with the same planner.
Trip boards are built and hidden behind trips_boards (default off). A board is a trip you plan with friends: a
title, a cover and an ordered set of pins (patches, places of your own and notes), shared by invite link, which can be
turned into a multi-day route on Scout's road router, edited day by day, and started one day at a time as a live trip.
No user can reach any of it today.
On top of boards, the later Trips Next phases are built, each behind its own flag and trips_boards, all off:
- Trips social (
trips_social, phase 3): people search and invite by @handle, public trips listed on Discover, likes, saves, copies, trip comments (on the community engine), the Crew tab, "Finished" counts, Report trip, and six trip notification types in the inbox and push. - Checked facts (
trips_facts, phase 4): the arrival check (is a stop open when the day reaches it, with fixes) and Before you go with its Book ahead checklist. - The trip recap (
trips_recap, phase 6): what a trip earned, with a share card carrying your invite code. - Notification buttons and live unlock toasts (phase 5's JS-only part, behind
trips_boardsitself): Add to today's route, Not today and Open in Maps on the trip notifications, and "unlocked along the way" on the live trip.
None of this is reachable by any user today.
Navigate in Scout (a turn-by-turn drive to one patch, from the patch's ⋯ sheet) shares Trips' routing backend but is not a trip and is not in this module; it is described here because no other doc states it.
Status
Shipped, no flag. Trips is the drawer's single Trips row (src/components/navigation/drawerSections.ts:317).
/trips shows the question, or the live trip when one is live (src/features/trips/screens/home/TripsRoute.tsx:60-72).
The trips_v2 flag that used to choose between this and the legacy path was deleted from both registries on
2026-11-12.
- The legacy Day Trip and Road Trip screens are deleted (the swipe-deck planner, the road planner, its stop list
and map, My Trips, the trip preview and the legacy trip map; the routes
/road-trip,/trip-mapand/trip-preview; the Library's Trips family; the curated trips query). Four old paths stay as redirects because achievement and mission content in the database, old shares and old pushes link them (src/features/trips/screens/redirects/oldTripLinks.tsx:7-24):/trip-plannergoes to/trip-plan, and/road-planner,/trip-stopsand/my-tripsgo to/trips. - Road trips can no longer be made or started. A road trip already saved on a device stays in the store, still
records visits (
src/features/trips/logic/store/tripsSlice.ts:529), archives when the active one is finished (tripsSlice.ts:626-657) and syncs (src/features/trips/logic/domain/tripSync.ts:91), but no screen shows it. - Trip boards: built, behind
trips_boards, default OFF in both registries (src/config/feature-flags.ts:99,backend/src/admin/feature-flag-definitions.ts:112). With it off, a user sees none of it. Details under "Trip boards" below. With it on, "What kind of trip?" has no door in the app (since 2026-11-29):/tripsbecomes the board grid, whose one way in to planning is the Where to? pill, and Where to? offers Plan my day and Just drive under "Or, no destination". The question itself, and so Collect nearby and the question's Calendar pill, open only by the question's address,/trips-question(see "The app's board screens"). - Trips Next phases 3, 4 and 6: built 2026-11-27, each behind its own flag AND
trips_boards, all default OFF in both registries:trips_social(src/config/feature-flags.ts:104,feature-flag-definitions.ts:119),trips_facts(:110,:127) andtrips_recap(:116,:135). With any of them off its screens redirect to/trips, its web pages 404, its routes answer like routes that don't exist, and it writes nothing. Phase 5's buttons and unlock toast ridetrips_boards. The iOS Live Activity and Android ongoing notification (the rest of phase 5) are not built. Details under "What the flag gates". - From the web (road trips saved on the web planner, opened as a Just drive) is in store builds since v1.1.111 but
behind
web_saved_trips, default off in both registries (src/config/feature-flags.ts:110,backend/src/admin/feature-flag-definitions.ts:192), so it renders nothing for anyone. The web planner is deployed atscout-patches.com/tripssince 2026-10-29 but not launched: nothing links to it. - Native build required: the iOS Google Maps check needs
LSApplicationQueriesSchemes: ["comgooglemaps"](app.json:33). OTA cannot deliver it. - Backend first: per-leg times need the backend that returns
legsfromPOST /api/trips/routeand theroutes.legscolumn (migration20261006120000_route_legs). An older backend still works: the app falls back to estimates and says so.
User-facing surfaces
| Surface | Route / deep link | File |
|---|---|---|
| The question | /trips (scout://trips) with nothing live; /trips-question too. With trips_boards on (it ships off), only /trips-question, which nothing in the app links to |
src/features/trips/screens/home/TripsHome.tsx:304 |
| Plan my day | /trip-plan (scout://trip-plan) |
src/features/trips/screens/plan-my-day/TripPlanScreen.tsx:546 |
| Just drive | /trip-drive; also /trips while a drive is live |
src/features/trips/screens/drive/TripDriveScreen.tsx:422 |
| Collect nearby | /trip-collect |
src/features/trips/screens/collect/TripCollectScreen.tsx:241 |
| On the day | /trips while a planned or Collect nearby trip is live |
src/features/trips/screens/home/TripLive.tsx:419 |
| Trip Calendar | /trip-calendar, from the Calendar pill on the question (Calendar · N, N upcoming planned days) |
src/features/trips/screens/calendar/TripCalendarScreen.tsx:387, pill at TripsHome.tsx:264 |
| A day's sheet ("Sunday, what kind of day?") | /trip-day?date=YYYY-MM-DD, a sheet over the calendar |
src/features/trips/screens/day/TripDayScreen.tsx:547 |
| Plan my day, date mode | /trip-plan?date=…&leave=… (+ From, kind, tripId): Save to <Day>; Delete and Re-plan on a saved day |
TripPlanScreen.tsx |
| From the web | A section above "What kind of trip?", only with web_saved_trips on (off), signed in, with a saved road trip |
src/features/trips/components/v2/FromTheWebSection.tsx:14 |
| Trip reminders switch | Settings → Notifications → On this device | app/notification-settings.tsx:557 |
| Notification taps | A tap on a leave-by or patch-ahead opens the trip. With trips_boards on (off), buttons: the patch-ahead's Add to today's route, Not today, Open in Maps; the leave-by's Open in Maps (see "Notification buttons" below) |
src/features/trips/logic/services/notificationActions.ts:39, notificationCategories.ts |
| Unlock toast (flag on) | On the live Just drive and On the day screens: "South Dakota unlocked at the state line", "City Museum unlocked along the way" | src/features/trips/components/v2/TripUnlockToast.tsx:27 |
| Old links | /trip-planner → /trip-plan; /road-planner, /trip-stops, /my-trips → /trips |
src/features/trips/screens/redirects/oldTripLinks.tsx |
| Navigate in Scout (shared, not Trips) | /navigate/<patchId>, from a patch's ⋯ sheet |
app/navigate/[id].tsx |
Trip boards add their own screens (all unreachable with the flag off); they are listed under "The app's board screens":
the board and its tabs (Board · Route · Map · Crew), the boards home with Mine · Discover · Shared with you
(your saved trips in Mine, your invitations in Shared with you), Plan together (who is on a trip, and what they
changed), and the three phase screens /trip-details/[id] (trips_social),
/trip-before-you-go/[id] (trips_facts) and /trip-recap/[id] (trips_recap).
Every Trips screen is a map with a panel under it (TripScreen, src/features/trips/components/v2/parts.tsx:395).
The panel is not a bottom sheet: it is as tall as what it holds, up to half the screen, and scrolls past that; it
cannot be dragged or dismissed; on Plan my day, On the day and Collect nearby a Stops button folds it down to its
buttons and back. The map always frames above the panel. Patches use the compass screen's pin (PatchPinMedallion,
parts.tsx:91) with the stop number or a collected tick on its corner. Each stop's unlock area is drawn under the
route as a brass fill with a dashed edge, fetched per stop (useStopGeofences, src/hooks/useStopGeofences.ts:49), on
Plan my day, On the day, Collect nearby and the saved and upcoming patches of Just drive. A stop with no boundary has
none drawn.
Every older "plan a day trip" entry point (the Home card, the Build a day trip mission at scout://trip-planner)
now lands on Plan my day through the redirect, and /trip-plan records the same opened_trip_planner feature event the
old deck did (src/features/trips/screens/routes.tsx:28-31).
How it works
What /trips shows
TripsRoute (src/features/trips/screens/home/TripsRoute.tsx:25) picks, in order:
- a day trip live from before Trips v2 (no
v2block): a skeleton while it is adopted (:62-63, see Edge cases); - a live drive: Just drive (
:64-65); - any other live trip: On the day (
:66-67); - with
trips_boardson: the board grid (:68-69); - otherwise the question (
:70-71).
It also promotes today's planned day (promoteTodaysPlan) on open and on every return to the foreground (:45-51),
and with boards on reads the board calendar when it takes focus (:56-59).
One plan object
Every screen reads a TripPlan built by schedule() (src/features/trips/logic/domain/plan.ts:120): ordered stops,
the leg into each (walk or drive), minutes at each stop, and an arrival and leave time for each from a start time.
Totals are the sums of the legs as shown (displayMiles, plan.ts:81), leave-by reminders come from it
(leaveByTriggers, src/features/trips/logic/services/reminders.ts:42), and Route in Maps reads its remaining stops
(routePoints, src/features/trips/logic/domain/trip.ts:145).
Plan my day
planPool(src/features/trips/logic/domain/trip.ts) takes the patches you have not collected within the length's radius (5, 10 or 25 mi,PLAN_LENGTHS,plan.ts:20), nearest first (openPatchesNear). The radius is a preference, not a wall (2026-11-22, for Home's "A day out"): when everything the length's budget could reach plans more stops than the radius does (nothing you need inside it, or only a stop or two with the day's room left over), the pool is everything the length's budget could reach (a tie keeps the radius, so a day in town plans as before; it also keeps a full day from planning fewer stops than a half day, which the E2E found past Wall Drug) (reachMi,src/utils/tripRoute.ts: the fastest leg's straight-line miles in that time, a bound, never a promise) andselectStopsdecides what fits. Before this, anywhere 25 mi from the nearest patch every length planned nothing. City, state and region containers and airports are skipped (isSuggestable,src/domain/patch-type-guards.ts:421). One pool for Plan my day, the day screen, the question and Home's "A day out" (planStops,trip.ts, exported to Home bysrc/features/trips/index.ts).selectStops(plan.ts:158) picks nearest-next until the next stop would overrun the budget (180, 300 or 480 minutes of travel plus time at stops), up to 8 stops (MAX_PLAN_STOPS,plan.ts:44).- A plan never runs past 9 PM (
DAY_END_HOUR,plan.ts:31;lengthOptions,plan.ts:246). The time dial offers only the lengths that fit: mid-afternoon Full day is gone; with under 3 hours left there is one option, "Until 9:00 PM"; with under an hour left Plan my day says "Too late to start today" and offers Plan for tomorrow (TripPlanScreen.tsx:454), and the question shows the same. - Time at a stop comes from its type (
dwellFor,plan.ts:70): a zoo is 2 hr, a roadside attraction 15 min, anything else 30 min. - Plan my day leaves out patches another upcoming planned day holds (
planStops,trip.ts). - It opens on a length and a day when it's told to:
/trip-plan?length=3h|half|full(anything else is a full day;lengthParam,TripPlanScreen.tsx) and&start=tomorrow(tomorrow at 9 AM). Home's "A day out" opens it this way, so Plan my day plans the stops Home showed (new-home-screen).
Legs
- A hop of up to 1 mile of path is walked (
legInto,plan.ts:90, reusinglegForfromsrc/utils/tripRoute.ts). - Otherwise the router's measured leg is used, plus 5 minutes to park and walk in. It comes from
POST /api/trips/route→legs[i], asked with{ legs: true }so a cached row from before the column existed is healed once (backend/src/trips/trips.service.ts:89-100,backend/src/routing/routing.service.ts:70-118). The router is described under "Routing" below. - Until the route answers, or if it fails, legs are straight-line estimates, and the panel says "Measuring the roads"
or "Times are estimates" (
ROUTE_NOTE,TripPlanScreen.tsx:365).
Starting a trip
startV2Trip(src/features/trips/logic/services/start.ts:16) saves the trip throughseedDayTrip, makes it live, remembers the kind for the question (setLastTripKind), and asks for notification permission once (the OS shows its prompt only the first time,:34).seedDayTriprecords theday_trip_startedfeature event for every kind (tripsSlice.ts:491). Starting Just drive also recordsroad_trip_started(start.ts:31), which is what earns Road Warrior ("Start a road trip") now that the Road Trip planner is gone.- A trip is an ordinary
ActiveTripwith av2block (TripV2,src/domain/types.ts): kind, start time, per-stop time overrides, detour, dismissed or notified patch ids, and for planned daysscheduled,wentLive,collectionIdandboardRef.patchIdsis the fixed stop order: nothing reshuffles it.
On the day
liveState(trip.ts:121) finds the first stop not yet collected on this trip. Within 0.25 mi of it you are at it; otherwise you are heading to it.- The screen (
src/features/trips/screens/home/TripLive.tsx, matched to the trips-next-lab design 2026-11-29): a capsule at the top says where you stand: "Leaves at 12:05 PM · 8 stops" before the trip leaves, "Driving to City Museum · 2 stops left" (or "Walking to …"), "At City Museum · 2 stops left", "Every stop collected" (liveStatusLine,TripLive.tsx:157). The ⋯ beside it ends the trip, and asks first. The panel has the trip's name and "Done by 4:50 PM", then Next: only the stops still ahead, with the one time to act on beside the heading: "Leave at" before the trip leaves, "Leave by" at a stop, "Get there by" between stops, followed by "On time" or "Running late" (nextDue,:167). The stops already collected fold into one "N collected" line that opens them. Under the panel, Stay longer (only at a stop) and Route in Maps. - The map splits the route at the last stop behind you: travelled part dim (darker brass, 65%), the rest bright
gold. Each stop is projected only onto the line after the previous one, so a route that doubles back splits at the
right pass (
splitRouteAtStop,trip.ts:169). - Stay longer adds 15 minutes at the current stop (
STAY_LONGER_MIN,plan.ts:195) and every later time moves. - The screen re-syncs reminders whenever the plan changes or the app returns to the foreground
(
TripLive.tsx:220-225). - A planned or Collect nearby trip archives when its last stop is collected on it (
archiveIfComplete,tripsSlice.ts:559). - With
trips_boardson a live planned day also gets the patch-ahead alert, with buttons, and saying what stopping costs (see "Notification buttons" below). Its unlocks are recorded on it like a drive's (TripV2.unlocks), and On the day shows the same unlock toast as Just drive (TripLive.tsxmountsTripUnlockToast;trip-live-unlock-toast.test.tsx). The panel then opens with unlock cards, newest first: up to three ("City Museum unlocked", "Utah unlocked at the state line", each with "Day 1 · 2:07 PM"), then "N more unlocked earlier on this trip". With the flag off there are no cards, as there is no toast (unlocksOn,TripLive.tsx:190), though the unlocks are still recorded.
Just drive
- Heading comes from two fixes at least 0.05 mi apart (
headingFrom,src/features/trips/logic/domain/ahead.ts:50). aheadOf(ahead.ts:63) keeps patches within ±75° of the heading (AHEAD_CONE_DEG,:21) and up to 60 mi up the road (LOOKAHEAD_MI,:23). Each must be close enough to the road that getting off and back on (22 mph, ×1.25 for real roads,offRoadMin,:34) fits the detour. Parked, with no heading yet, it keeps what you could reach and get back from within the detour.- Add asks once (
askAddChoice,src/features/trips/logic/services/mapsApp.ts:56): Save and add a stop in Google Maps or in Apple Maps saves the patch and re-opens directions as you → your saved stops (addAsStopInMaps,src/features/trips/logic/services/drive.ts:55); Save to my drive only just saves it. - A saved stop goes where it adds the least travel from the drive's start (
saveToDrive,drive.ts:22, usinginsertStop,plan.ts:176), so stops saved out of order are still visited in road order. - In the background, the location tracker hands every fix to Just drive's patch-ahead check. The handler is set
from the root layout (
setDrivePassHandler(runDrivePass),app/_layout.tsx:81;src/services/location/tracker.ts:85, called at:150), so the shared tracker does not import Trips.runDrivePass(src/features/trips/logic/services/drivePass.ts:41) notifies about the first patch ahead you have not already been told about, saved, or dismissed with Not today (nextToNotify,reminders.ts), once per patch. A patch dismissed with Not today is gone from this screen's Next and Stops too (buildTripDriveScreenData). - Unlocks while driving (
trips_boardson): whatever you unlock while a drive (or any Trips v2 trip) is live is recorded on that trip,TripV2.unlocks, once per patch: its stops newly reached, and any other patch unlocked by location ("unlocked along the way"; not one unlocked by hand, nor one you already held). The collect funnel passes{ unlocked, byLocation }(src/domain/store.ts:1717) torecordTripVisits(tripsSlice.ts:508,:544;withLiveUnlocks,logic/domain/liveUnlocks.ts:27). It is recorded with or without the flag, background unlocks included (the location task collects with Google Maps in front). The drive screen's toast (TripUnlockToast, mounted beside the pure layout atTripDriveScreen.tsx:434) hears the oldest unannounced one throughsubscribeTripUnlocks(logic/services/unlockToasts.ts:23), so one that landed in the background shows when the screen comes forward. Copy by type (unlockToastText,liveUnlocks.ts:68): a state, "Utah unlocked at the state line"; a stop, "Saint Louis Zoo unlocked"; any other patch, "… unlocked along the way"; a stop you already held, "Reached The Hill". Only while the screen has focus (an unlock made in front also pops the celebration over it), and it is marked shown (announced) only after its full 4 s, so one cut short comes back. Whiletrips_boardsis known off (the server's answer, not the defaults before it), each unlock is marked shown as it lands on a mounted live screen (silenceTripUnlocks,logic/services/unlockToasts.ts), so turning the flag on mid-trip plays no backlog. An unlock recorded off while no live screen was mounted (the app in the background) still plays once.
Notification buttons (behind trips_boards, off)
Trips Next §6.7, approved 2026-11-04. It supersedes the 2026-10-06 call that trip notifications carry no buttons.
- Registered by the one notification watcher once the flags are known, and again only when the flag changes
(
useTripNotificationActions.ts:62-72→syncTripNotificationCategories,notificationCategories.ts:62): flag on, two categories; flag off, both deleted. Idempotent; nothing on web. - Patch ahead (
scout_trip_ahead): Add to today's route and Not today run without opening the app (opensAppToForeground: false), so the driver keeps their maps app in front; Open in Maps opens the app to hand off. Leave-by (scout_trip_leave): Open in Maps, to the stop it sends you to (each reminder now carriesnextId; the head-out's is the first stop). - Scheduled with the category only while the flag is on, read outside React (
tripCategoryFor,notificationCategories.ts:46, throughisFlagOnNow,src/services/flagSnapshot.ts). Off, no category: the plain tap that shipped. - What each does (
handleTripNotificationResponse,notificationActions.ts:39): Add puts the patch on the trip the alert was about, only while that trip is still the live one (addToLiveTrip,drive.ts:29: on a drive anywhere from its start, as Save does; on a planned day only among the stops still ahead,insertAhead,plan.ts:198); Not today adds it toTripV2.dismissedIdsonce (dismissOnTrip,drive.ts:58); on a trip that has ended both do nothing. Open in Maps opens directions from where you are in the remembered maps app, never asking (openDirectionsTo,mapsApp.ts:75); if the OS refuses it (and Google's web page), the trip opens in Scout instead. A leave-by scheduled beforenextIdexisted opens the trip. With the flag off any action id is a plain tap, as are an older build's. - Routing: through the same listener, after a remote push, On This Day and nearby patches, with its dedupe
(
identifier:actionIdentifier); a button press that cold-starts the app waits for the flags like a cold-start tap. - On a live planned day (flag on) the patch-ahead check runs too (
drivePass.ts:45; Collect nearby, on foot, is left out), and the alert says what stopping costs instead of "Tap to see it": "Adds about 25 min: you'd reach Zion at 4:10 PM" (aheadImpact,reminders.ts:112). From the plan's own times: the route the live screen drew where the road does not change (read from the cached route,cachedTripRouteLegs,src/query/queries/tripRoute.ts), estimates for the two legs the stop adds. It does not check the next stop's hours (no facts offline), so it states the time and never says the stop will be closed. A patch that would come after every stop left says nothing extra. - Not verified on a device. Jest proves the logic and the routing; whether iOS and Android deliver each action
(especially a background one) is unverified. Known platform limits: an
opensAppToForeground: falseaction is not delivered to the listener if the app was killed, not just backgrounded (Expo's documented limit), so an Add or Not today pressed then may be lost (the next cold start's last-response replay may still carry it); a headless background relaunch mounts no React tree, so before the flags are cached the alert is scheduled without buttons; and categories are registered from the mounted watcher only. - A drive is never archived on its own. Collecting every stop saved so far does not end it; only End drive
does (
tripsSlice.ts:582).
Collect nearby
collectTarget(src/features/trips/logic/domain/home.ts:51) takes the missing patches of the nearest City Challenge within 50 mi (nearestChallenge,src/components/home-v3/selectors.ts:45) and runs them throughselectStopswith no time budget: nearest-next, no containers or airports, at most 8. The progress line and the question's "N to go" still count the whole Challenge (home.ts:203).- With no Challenge to work on, it takes the single nearest patch you need within 150 mi (
NEAREST_MI,home.ts:30).
The question
buildTripsHomeData(home.ts:93) runs the planner on estimated legs and never calls the router, so "6 patches from now, done by 4:05 PM" is an estimate. Plan my day then re-times the same stops with measured legs, so the two can differ by a few minutes.- Which answer leads: Collect nearby when you hold at least 70% of the nearest Challenge (
FINISH_LEAD_SHARE,home.ts:26: "Finish St. Louis"); otherwise your last trip kind; otherwise Plan my day, or Just drive when nothing is close enough for a day. - Plan my day's figures use the same pool as Plan my day (
planStops), so past the radius they still count what a day reaches: "1 patch from now" (Carhenge, 128 mi from Valentine, NE). With nothing a day reaches it says "Nothing close enough for a day"; when only what's left of today is short ("Until 9:00 PM") and fits nothing, "Nothing fits the rest of today" and "Plan a day for tomorrow morning instead." (never a claim about the day). The map's pins are the same pool, at most 40.
Route in Maps and the maps app
chooseMapsApp(mapsApp.ts:28): Android always uses Google Maps. iOS uses your remembered choice (preferredMapsApp); if none, Apple Maps when Google Maps is not installed; otherwise it asks once.- URLs come from
buildRouteUrl(src/utils/maps.ts:124): Google's documentedmaps/dir/?api=1link withwaypoints; Apple'smaps://with onedaddrper stop. Both are capped at 9 stops after you (MAX_HANDOFF_STOPS,maps.ts:63).
Trip Calendar
Plans any upcoming day at a time you choose, with the same planner. No flag of its own.
- Entry: the Calendar pill (
TripsHome.tsx:264, count fromupcomingPlans,src/features/trips/logic/domain/calendar.ts:77) andscout://trip-calendar. No drawer row. - The month (
buildTripCalendarScreenData,TripCalendarScreen.tsx:116): Sunday first; today ringed; the selected day filled brass; past days dimmed and not selectable; a planned day carries its first stop's patch art. Under the month, the selected day's plans ("9:00 AM to 4:50 PM · 6 patches · 5.9 mi"), then Coming up. An empty upcoming day says "Nothing planned for Sunday" with Plan Sunday. It opens on the next planned day, else today. A plan row opens that day in Plan my day's date mode (planParams,:166). - The day sheet (
buildTripDayScreenData,TripDayScreen.tsx:109):- Leave at: quick starts 8, 9, 10 AM, Noon, 2 and 5 PM (
QUICK_STARTS,calendar.ts:40), each labelled with the longest day it allows before 9 PM ("up to full day", "up to 3 hr", "too late";allowsLabel,TripDayScreen.tsx:98), plus Another time… (the system time wheel, rounded to 5 minutes). - From: where you are, or a City Challenge city (searchable, nearest first). Nothing else. A city's day starts
at its patch nearest the middle of its patches (
cityStart,calendar.ts:145). - Plan my day and Collect nearby, with real numbers for that day, time and place. Just drive is not offered.
- Leave at: quick starts 8, 9, 10 AM, Noon, 2 and 5 PM (
- Saving (date mode): Save to <Day> replaces Start (
saveScheduledTrip,start.ts:99). Opened on a saved day it shows that day's stops with Delete (deleteScheduledTrip,start.ts:70) and Re-plan. A stop collected since the day was saved stays on it, ticked; nothing is swapped without Re-plan. - No patch on two days. Planning a day, today included, leaves out every patch another upcoming planned day holds
(
reservedFor,calendar.ts:93) and says so in one line ("Not on this plan: 4 for Sat Oct 17 and 2 for Sun Oct 18, already planned.",heldNote,:109). Re-planning keeps a day's own patches, deleting frees them, and a past day holds nothing. - On its day a planned day becomes the trip Trips opens on, unless another trip is live (
promoteTodaysPlan,start.ts:43). It goes live once: ending it does not bring it back (wentLive). - One reminder per planned day: the 10-minute head-out, scheduled when it is saved (
syncTripReminders(…, { headOutOnly: true }),start.ts:130). iOS keeps at most 64 pending local notifications, so per-stop leave-bys are scheduled only when the day goes live. Reminders are keyed by trip and run one at a time per trip (oneAtATime,reminders.ts:109), so saving, moving or deleting one day never touches another's (cancelTripReminders,:124).
From the web (saved road trips, flag off)
Road trips a member saved on the web planner, opened in the app as a Just drive. Behind web_saved_trips (off).
- The section sits above "What kind of trip?": "From the web", "N saved", then one row per saved trip with a brass
route glyph, its name and "3 stops · saved on the web" (
fromTheWebRows,src/features/trips/logic/services/fromTheWeb.ts:29). A stop the catalog no longer has is not counted; a trip left with none is not listed. - Hidden with the flag off, signed out, for a guest, or with nothing saved; there is no empty card
(
showFromTheWeb,fromTheWeb.ts:26;TripsHome.tsx:179). - Without a location the section still shows and a tap opens the location-permission screen.
- A tap starts a live Just drive from where you are (
startSavedRouteDrive,fromTheWeb.ts:44): named after the saved trip, its detour dial set to the saveddetourMin, and its stops added one by one throughsaveToDrive. - Markers saved on the web are ignored. Only patch stops come across.
- Fetching:
savedRoutesQuery(src/features/trips/logic/queries/savedRoutes.ts) callsGET /api/me/saved-routesonly for a signed-in member with the flag on, refetches on sign-in and is otherwise fresh for 5 minutes (:27-28), because the list sits behind the planner's shared per-IP limit.
Navigate in Scout (shared, not Trips)
scout://navigate/<patchId> (app/navigate/[id].tsx), from a patch's ⋯ sheet: a throwaway drive to one patch with
turn-by-turn, rerouting and the arrival unlock, on the shared drive map (src/components/drive-map/DestinationMap.tsx,
TripMap.tsx, ManeuverBanner.tsx). It routes from your first fix, frozen. It saves nothing: no dayTrips entry, no
sync, no share card, no trip achievement, and it ends when closed. The destination is always a patch with coordinates.
It opens on its Start card ("Scout will route you to …", Start driving) and becomes the driving console when you tap Start, collect the patch, or move more than a quarter mile from where the route starts: the route begins at your own fix, so being on its road is no sign you have set off (isPreDrive startsAtYou, src/components/drive-map/preDrive.ts; until 2026-11-27 it opened mid-drive). Once you have moved off the start it stays the console for the session, even back within the quarter mile (a loop, or GPS jitter at the line): TripMap latches it into started. The Capture Studio drives it with ?sim=1&speed=. Rerouting is gated (src/utils/rerouteGate.ts:13-17): off-route
past 0.15 mi, held for 20 s, at most one reroute per 60 s.
The trip maps' camera (TripMap, and the question's TripScreen in src/features/trips/components/v2/parts.tsx) is
FieldGuideMap, whose re-frames (applySignal: the panel measuring itself, a recenter, a mode switch) wait for the map's
onDidFinishLoadingMap and are caught if native refuses them (src/components/map/cameraCommands.ts). The trip-plan and
trip-drive screens were where Sentry SCOUT-K ("Invalid reactTag N, could not find MLRNCamera") came from: the panel's first
layout changed the camera in the same pass the map was created. See
discovery-surfaces.
Hand-off to the platform maps app (openTurnByTurn, src/utils/maps.ts; the trip map's Directions and every other
single-destination "Directions"): maps:?daddr= on iOS, a geo: intent on Android. Refused by the OS (Apple Maps deleted,
restrictions, no app for geo:), it opens the maps page on the web instead; if that is refused too it says "Couldn't open
Maps" with the coordinates (Sentry SCOUT-D, 2026-11-12). Multi-stop routes (openRouteIn, openRouteInMaps) are separate
and unchanged. Covered by src/components/map/__tests__/cameraCommands.test.ts,
screen-tests/components/field-guide-map-camera.test.tsx and src/utils/__tests__/openTurnByTurn.test.ts (native-only
paths: the RN web E2E suite reaches neither).
Routing (shared by Trips, boards, Navigate and the web planner)
- Routes come from Scout's own road router when the backend has one (
VALHALLA_URL), and from OpenRouteService when it is unset, unavailable or can't route the request (backend/src/routing/fallback.provider.ts). Interactive requests wait up to 4 s on Scout's router (ValhallaProvider.INTERACTIVE_TIMEOUT_MS,backend/src/routing/valhalla.provider.ts:79); a router that stops answering is skipped for 60 s (FallbackRouteProvider.BREAKER_MS,fallback.provider.ts:36). Every location asksminimum_reachability100 (valhalla.provider.ts:92), so a pin on an island of park service roads snaps to a road that reaches the network. - With neither router able to answer, routing endpoints throw
RouteProviderError→ 502, soORS_API_KEYstays required. The ORS call times out after 15 s (OrsProvider.DEFAULT_TIMEOUT_MS,backend/src/routing/ors.provider.ts:45). - Refusals are remembered: a pair every configured router refused is answered from
route_refusalsfor 7 days (RoutingService.throwIfRefused). A refusal by one router, a router that is down, or a spent budget is never remembered. Each refusal records the routers that refused (route_refusals.provider,RouteProvider.routers:valhalla+openrouteservice, oropenrouteservicewithout aVALHALLA_URL), and answers only while no router has been added since. So one written while ORS was the only router is ignored once Valhalla is configured: on prod, Zion's Navigate kept answering 502 for that reason afterVALHALLA_URLwent in (2026-11-21), until the rows were deleted.RoutingService.peek()(routing.service.ts:184) reads the cache without calling a router; the web planner meters its ORS budget with it. - Each route is cached in
routeswith the router that answered (routes.provider) and itslegs. - Corridor SQL (
backend/src/trips/corridor-sql.ts) is shared with the web planner and boards: crossed states, patches near a route, nearest-state assignment, progress along it. Stop-finding uses theus_statestable, so a route outside the U.S. computes but finds no stops. It measures each patch in true metres against 64-vertex pieces of the road that an indexed degree check puts near it, not the whole road, and works out the crossed states once (MATERIALIZED): the same answer (src/trips/__tests__/corridor-sql.db.spec.tscompares it with the plain query) in a fraction of the time. Measuring the whole road took 11.6 s for Chicago → Key West on prod and timed the page out (2026-11-13). The legacy corridor endpoint's radius (default 25, max 150 mi,trips.service.ts:26-28) is still served, but the app no longer calls it.
Trip sync
Trips sync for every signed-in account over the same POST /api/sync/push / GET /api/sync/user-data channel patches
use, flat into trips / trip_patches (tripSync.ts; collectTripsForSync, tripsSlice.ts). Caps, mirrored client
and server (tripSync.ts:121-123, backend/src/sync/dto/sync.dto.ts:87, :100): 250 trips per push, 500 stops per
trip, 5,000 stops per push. The v2 block is local only and never sent. A planned day you made is pushed as soon as it
is saved; a board-day mirror only once it has gone live (isUnstartedMirror, tripSync.ts:86).
Trip boards (built, behind trips_boards, off)
Everything in this section is unreachable while trips_boards is off, which it is. It is described so the code and its
limits are on record.
What the flag gates
- App screens.
/tripsshows the board grid only with the flag on and nothing live (TripsRoute.tsx:68); the question then moves to/trips-question, which is not gated and which nothing in the app links to (it opens only by its address, or as Back from a plan, collect, drive or calendar screen with nothing behind it). The nine board routes (/trip-board/[id],/trip-board-new,/trip-board-members/[id],/trip-board-place/[id],/trip-invite/[token],/trip-where-to,/trip-plan/[id],/trip-day-along/[id],/trip-day-route/[id]) sit behindTripBoardsGate(src/features/trips/components/boards/TripBoardsGate.tsx:15-19, used inscreens/routes.tsx): off, a deep link or stale push redirects to/trips; while the first flag read is out, the boards skeleton. Save to a trip needs the flag and a signed-in account (src/features/trips/logic/hooks/useCanSaveToTrip.ts:8-11); its route closes itself otherwise, but only after the first flag fetch and session restore finish (src/features/trips/screens/save-to-trip/SaveToTripRoute.tsx:16-21), because deciding earlier shut the sheet on everyone who opened it by link. - The later phases, each needing
trips_boardstoo (backendTripsPhaseFlagGuardsubclasses,backend/src/trip-boards/trips-phase-flag.guards.ts:22-54: either flag off, the phase's routes answer Nest's unknown-route 404 before auth and throttling; appTripBoardsGate social|facts|recap,src/features/trips/components/boards/TripBoardsGate.tsx:16-19, redirects to/trips; websocialOn/factsOn,trips-web/lib/flags.ts:12-14):trips_socialgates people search (GET /api/people/search), invite by @handle and invitations,publicvisibility (refused 400not_yetwhile off), Discover, trip details, likes, saves, copies, trip comments, the Crew tab, Report trip (targettrip_board), and the six trip notification types (written only with both flags on, and their Settings rows shown only then,app/notification-settings.tsx:229). Off in the app: the boards home has no Discover tab, saved trips or invitations; the Crew tab is there but disabled (a screen reader hears "Crew, coming soon"); Public and Invite by @handle are "Coming soon" rows;/trip-details/[id]redirects. On the web: no tabs, Saved or Invitations on/mine,/discoveris a 404,/t/<id>keeps the old link view, and the social BFF is a 404.trips_factsgates the arrival check and its fixes, Before you go and its checklist ticks. Off: the Route tab shows the plain hours chip and the Park entry count line,/trip-before-you-go/[id]redirects, and the web plan page has no arrival checks or Before you go panel.trips_recapgates the recap read, the Recap screen, "See the recap" on the board and the "recap is ready" card. "Make it public" on it also needstrips_social. The web has no recap at all.
- The trip notifications' buttons, the patch-ahead alert on a live planned day, and the live trip's unlock toast
(Trips Next phase 5, the JS-only part; the spec's own
trips_live_activityflag is not added because the Live Activity is not built). Off, notifications are scheduled with no category and the categories are deleted, a planned day gets no patch-ahead alert, and no toast shows; unlocks are still recorded on the live trip (TripV2.unlocks), invisibly. See "Notification buttons" and "Just drive". - The Trip Calendar tie-in reads only with the flag on (
src/features/trips/logic/hooks/useTripCalendar.ts:32). Turning it off removes the mirrored days still waiting, with their reminders (below). - The backend's board API.
TripsBoardsFlagGuard(backend/src/trip-boards/trips-boards-flag.guard.ts:19) runs first on all board controllers, the plan controller included (trip-plan.controller.ts:21,trip-boards-public.controller.ts:13): off, every/api/me/trip-boards/*,/api/me/trip-board-invites/*,GET /api/trip-boards/:id/publicandGET /api/trip-board-invites/:tokenanswers exactly like a route that does not exist (Nest's own 404 body), signed in or not, before authentication or throttling. The flag is read as the clients read it (isFlagOnForClients,backend/src/admin/feature-flag-state.ts:45): no userId, so a partial rollout followsenabled. A missing row is off; a failed read is a 500 and the route stays closed. - The web pages and BFFs.
/mine,/b/<id>,/b/<id>/plan,/b/newand/i/<token>404 with the flag off (lib/board-pages.ts:11-12,app/i/[token]/page.tsx:19); so doPOST /api/planandPOST /api/boards, before reading the body (withBoardsGate,lib/bff-core.ts:18)./t/<id>falls back to a board's link view only with the flag on (app/t/[id]/page.tsx:54). The web's MapLibre map is gated too; off, route pages draw the SVG map only. - A flip is not instant everywhere. The backend reads the flag per request; trips-web caches flags 60 s per process; the app keeps its last fetch (on open, on foreground, at most 5 min stale). In that window screens and API can disagree.
- Queued app edits survive the flag going off. The outbox does not drain while the flag is known off
(
src/providers/SyncProvider.tsx:178-184), and a drain that meets an "absent" 404 keeps that op with no strike and holds only its trip for that drain, so the other trips still send (isRouteAbsent,src/api/ApiError.ts:37;outboxRunner.ts). The absent route can be one op's alone (a checklist tick or a stop edit queued whiletrips_factswas on, that flag since off); with all oftrips_boardsoff every trip gets one try and waits. - A device override does not reach the server. The DEV Feature flags screen can turn the flag on for one phone, but against a backend where it is off every board call 404s.
- Not gated, by design: the saved-routes API (
GET/POST /api/me/saved-routes,PATCH/DELETE /api/me/saved-routes/:id,POST /api/me/saved-routes/copy,GET /api/saved-trips/:id,backend/src/road-trips/saved-routes.controller.ts), which shipped app builds and the web planner use; and thesaved_routesmigration, which made every saved web trip a board whatever the flag says.
Boards, pins, members
A board is a title, a cover and an ordered set of pins: a patch from the catalog, a place of your own (a name and a point dropped on the map), or a note (up to 500 characters). You make one from the grid or straight from a patch with Save to a trip. You share it by invite link as an editor (can add and edit) or a viewer (can look). The owner chooses Only us (members) or Anyone with the link.
Backend, backend/src/trip-boards/:
- Access (
trip-board-access.ts:9-13): a caller who is not a joined member gets 404, so a board's existence never leaks; a joined member below the needed role gets 403{ error: 'role' }. Roles rank viewer < editor < owner. Reads need viewer, pin writes editor, board edits, invites and roles owner. - Create (
trip-boards.service.ts:166): title 1 to 120, description up to 1000, both through the moderation word filter (blocked_term). At most 100 owned trips (MAX_OWNED_TRIPS,:14; 409limit), serialised by an advisory lock shared with the saved-routes API (lockOwnerCreates,:30), so saved web trips count toward the 100. - Pins (
addPin,:289): at most 200 per board (MAX_PINS,:15; 409trip_full_pins). A patch pin needs a visible patch (404patch_not_found) and a patch is pinned once per board (409already_pinned, a partial unique index). Notes 1 to 500, place names 1 to 120, coordinates range-checked. Order is a fractionalposition(pin-position.ts) that rebalances to 1024, 2048, … when a gap gets too small. Every pin writer on a board takeslockPins(:35). An add carryingclientOpIdis idempotent: a repeat returns the pin it already made. - Visibility:
private,linkorpublic.publicis refused with 400not_yetwhiletrips_socialis off (read per request,trip-boards.service.tsupdate); on, the owner can publish, andpublished_atis stamped each time the trip becomes public (kept while it is private, not bumped by a repeat). A moderator-removed trip (removed_at) answers 409removedtopublic;privateandlinkstill work for its members. The public read (getPublic) leaves out a removed trip whatever its visibility. - Retired patches: pins whose patch the app can no longer reach drop off every board and count, by the same
predicate as
/api/sync/content(VISIBLE_PIN_WHERE). - Activity: every change writes a
trip_board_activityrow, readable 30 at a time fromGET :id/activity(?cursor=must be a uuid, else 400bad_cursor). The app's Plan together screen shows the first page in words (see "The app's board screens"), and the app also reads it to name who changed a day in a stale-order notice. - Invites (
trip-board-members.service.ts): owner-only; a 22-character url-safe token, a role (editor or viewer), revocable, and multi-use until revoked (no use count or expiry). The URL ishttps://scout-patches.com/trips/i/<token>(INVITE_URL_BASE,:14). Accepting is a no-op for someone already joined. At most 20 joined members (MAX_MEMBERS,:13; 409trip_full). A pair with a block between them sees the sameinvite_goneas a revoked link. The preview is public. - One lock per trip's membership (
lockMembers,:32): accept, revoke, role changes, removal, leaving and a block's pruning take it, and accept re-reads the invite, block, removal bar and member row under it, so a removal, block or revoke racing an accept is never undone. - Invite by @handle (behind
trips_socialtoo,trip-board-social-members.controller.ts; the routes don't exist while it is off): the owner picks someone from people search (GET /api/people/search, seedocs/features/user-handles.md) andPOST :id/members { userId, role }writes aninvitedmember row (inviteUser). It grants nothing: every read and write is still 404 until the invitee accepts. Refusals: yourself 400cannot_invite_self; a joined member 409already_member; an unknown user, a guest, a suspended user and a pair with a block between them all get the same 404user_gone, so a block is never revealed. Inviting someone already invited sets the new role and doesn't notify again. Pending invites hold a seat: joined plus invited can't pass the 20 (409trip_full), while a link accept still counts joined members only, so a pending invitee's accept can meet 409trip_full(the invitation stays). Someone the owner removed can be invited again (the owner's fresh choice: the removal bar only stops links made before it). A fresh invite callsTripNotificationsService.invitedafter the commit; a failed notification is logged and the invite stands. The invitee lists theirs withGET /api/me/trip-board-invitations, andPOST :id/invitation/accept(joined, under the members lock, re-checking the row and the block; already joined is a no-op) or…/decline(the row goes). The owner cancels with the existingDELETE :id/members/:userId: on an invited row that records no removal (they were never in) and logsinvite_cancelled. - Leaving and removal: the owner removes anyone else; any member removes themselves; the owner can't leave (400
owner_cannot_leave). An owner's removal writes atrip_board_removalsrow, and any invite created at or before it is theninvite_gone; an invite made after works. The owner's invite list marks older live linkspredatesRemoval: true. Leaving writes no row, so a member who left can rejoin through a live link; the Leave confirm says so on app and web. - Blocking (
onBlock,:213, called frombackend/src/moderation/moderation.service.ts:116): a block removes the blocked person from every trip the blocker owns, and the blocker from every trip the blocked person owns, in one transaction with the block. Third parties' trips are untouched. A pending @handle invite between the pair goes the same way. - Moderation (
backend/src/moderation/moderation.service.ts): a trip is reportable astrip_board(the owner is its author), but only one the reporter can see: a joined member's, or alinkorpublicone not already removed; any other id is 404, so a report is never an existence oracle. The queue shows its title and description. "Remove content" setsremoved_at: the trip is never deleted, its members keep it, it drops off its public page and can't be made public again. Trip comments arepost_commentreports on the trip's hidden anchor post; their queue snippet starts "On trip: <title>", and removing one deletes that comment (and its replies), never the anchor post, and recountstrip_boards.comment_count(the same recount as a comment's own delete,trip-social/trip-comment-count.ts). - Rate limits: 300 writes per member per hour across every write route (
trip-board-write-throttler.guard.ts);POST :id/planandPOST where-toshare 30 per member per hour (PLANS_PER_HOUR,trip-plan-throttler.guard.ts:6), answering the planner's{ error: 'rate_limited', retryAfterSec };GET days/:dayId/alternative120 per hour (:10);GET days/:dayId/alongandGET places60 per minute each (:8,place-search.service.ts); the two public reads 60/min per IP.
Trips social on the server (trips_social, off; backend/src/trip-social/)
Spec §6.3 and §6.4. Every route is behind TripsSocialFlagGuard first (trips_social AND trips_boards), so with either
off none of this exists. The app's and the web's screens are described under "The app's board screens" and "Boards on the
web".
-
Guests are refused the writes (spec §6.1, "likes, saves and comments need an account"): people search and every like, save, copy and comment write (and their undo, delete and comment likes) answer a guest (an anonymous profile) 403
{ error: 'account_required' }and write nothing (backend/src/auth/account.guard.ts, afterJwtAuthGuard, which lets guests through;JwtStrategyputsisAnonymouson the request). The reads (Discover, details, comments, saved trips, Crew) are unchanged. -
One read rule for every social surface (details, comments, like, save, copy, the inbox's trip comment rows):
readAccess(trip-read-rule.ts:35-41). The owner always reads their own trip; a block between viewer and owner (either way) closes it; a moderator-removed trip is the owner's alone; a joined member reads it whatever its visibility; otherwiselinkandpublicare open to anyone holding the id, signed out included, unless the owner is suspended, andprivateis closed. Unreadable is a bare 404 that never says why (TripReadService.require,trip-readable.ts:36-40). -
Discover (
GET /api/trip-boards/discover?filter=&lat=&lng=&cursor=,trip-discover.service.ts:45): public, not removed, owner not suspended, never a blocked author's and never the viewer's own. Filters are computed per request, not tagged:national_parks,route66,weird,citiesby the patch's type, its campaigns through visible collections or its Explore categories (DISCOVER_TOPICS,:21-30);weekend1 to 3 days;nearwithin 150 miles oflat/lngmeasured to the trip's nearest patch (NEAR_MILES,discover-rank.ts:23);have_somethe viewer holds at least one of its patches (signed out, an empty page). Ranking (rankDiscover,discover-rank.ts:58-66): how well the filter fits (the share of the trip's patches it describes; fornear25-mile bands), then popularity (likes ×1, saves ×2, copies ×3, finished ×3,:29), then the newestpublished_at. Pages of 20 (DISCOVER_PAGE); the cursor is an offset; only the 2,000 newest public trips are ranked (DISCOVER_CANDIDATES,:14). Bad input: 400bad_filter,bad_cursor,bad_coordinates. 60 reads a minute per IP. -
Trip details (
GET /api/trip-boards/:id/details, optional auth,trip-details.service.ts:31-78): the link view's patches and labels plus the author (null when hidden), the five counters, up to 8 finished scouts (blocked ones, suspended scouts and guests left out, and the owner too when the trip hides its author from a non-member; the count keeps them all), the copy credit (linked only while the viewer can read the original), each day's date and patch stops, and for a signed-in viewer like and save state, "you have N of M" and their role. Never an own place, a note, a checklist tick, a member beyond the author, or a start finer than the nearest town. -
Likes and saves (
PUT/DELETE /api/me/trip-boards/:id/like|save,trip-reactions.service.ts): one row per user per trip, idempotent, behind the read rule; the counter is recounted from the rows under the trip's row lock. A save is a bookmark of the original, not a copy.GET /api/me/trip-board-saveslists saves newest first (up to 500) and leaves out a trip the saver can no longer read while keeping the save. -
Copy (
POST /api/me/trip-boards/:id/copy,trip-copy.service.ts:28-73): a new private trip you own with the original's visible patch pins in board order and its days with each day's start time and patch stops (minutes and fixed times kept). Never its own places, notes, description, endpoints, dates, overnights or members; title unchanged; creditcopied_from_*(no handle when the original hides its author). Counts toward the 100-trip cap (409limit). Anyone who can read the original may copy it. The original'scopy_countcounts people, not copies (it weighs ×3 in Discover): the distinct owners, other than the original's owner, of the trips copied from it, recounted on every copy under the original's row lock. The same scout copying three times counts once, the owner copying their own trip counts nothing and tells nobody, and a scout whose copies were all deleted drops out at the next copy. -
Comments (
GET /api/trip-boards/:id/comments,POSTandDELETE /api/me/trip-boards/:id/comments[/:commentId],PUT/DELETE …/comments/:commentId/like,trip-comments.service.ts): the comments of the trip's one hidden anchor post (posts.trip_board_id), made on the first comment with the owner as author, written and read through community's own comment code (word filter, suspension, blocks, one-level replies, mentions by picked user id), so no second comment system exists (community-and-moderation, "Trip comments live on a hidden anchor post"). Text up to 500 characters, up to 20 mentions, an optional stop tag that must be one of the trip's patches (400bad_stop). Each comment carriesisAuthorandfinishedIt. On a trip that hides its author (every migrated link trip), a reader who is not a joined member gets the owner's comments with their words but no identity:userId'',username"Anonymous", no avatar or rank,isAuthorfalse (HIDDEN_AUTHOR); members see the owner as usual. While a trip is private only its joined members' comments show; others are kept and show again if it is shared again. Delete: the author or an admin, replies go with it.comment_countis recounted on each write. -
Crew (
GET /api/me/trip-boards/:id/crew, members only,trip-crew.service.ts:20-43): each joined member's held of total on the trip's visible patch pins, who holds which, and the collections the trip finishes for every joined member once its planned stops are collected (a bought collection counts as complete; at least one member must gain). -
Finished (
trip-finished.service.ts): someone has finished a trip when they hold every patch pinned to it, however collected; a trip with no patch pins has nobody finished.finished_countcaches it: recounted on a details read once 10 minutes old (FINISHED_STALE_MS,:8) and daily at 04:20 America/Chicago for every public trip (trip-finished.scheduler.ts:18), which, like every@Cron, does not run withSCHEDULED_JOBS_DISABLED=true. -
People search (
GET /api/people/search?q=,backend/src/people/people.service.ts:32-52): the start of a handle, 3 to 64 characters of[a-z0-9-](64: a derived handle is an email's whole local part) (a leading@dropped; else 400bad_query), at most 8, shortest handle first; never the caller, a guest, a suspended account or anyone blocked either way. 60 searches a minute per member. Its only caller is invite by @handle (and the trip composer's mention suggestions); community's @-mention picker does not use it. -
Trip notifications (
trip-notifications.service.ts):trip_invite,trip_activity,trip_comment,trip_mention,trip_copiedandtrip_starts, through the existing inbox and push, each with its own inbox and push switch (default on), never to the actor or a blocked pair, written only with both flags on. Every recipient must still read the trip by the read rule, so stop edits and "Your trip starts tomorrow" skip a moderator-removed trip (but its owner) and a member blocked with the owner; a joined member of a suspended owner's trip still hears, as the rule lets them read it. "Your trip starts tomorrow" is a daily job at 17:00 America/Chicago. Copy pushes are capped at one a day per trip. The inbox leaves out a trip row the reader can no longer see, by the same rule for every type (an invite also shows to an invited-not-joined reader). Full detail: messages-and-notifications ("Trip notifications") and push-notifications. -
Counters never touch
updated_at: likes, saves, copies, comments and finished recounts are raw updates, so being liked or copied does not reorder anyone's grid.
Planning: from a board to days (backend/src/trip-boards/plan.service.ts)
POST :id/plan ("Turn into a route") and POST where-to run the same steps. Every router call comes first and none
happens inside the write's transaction, so a failure before the write leaves the board as it was.
- Read the visible patch and place pins. Notes stay ideas; a hidden patch, or one at exactly 0,0, stays off the
plan. Over 100 places is 400
too_many_stops(plan.service.ts:265) before any route is spent. - Order with
drivingCosts(the road matrix up to 20 points, else a highway estimate) andorderStops, fromfromtoto, or wherever is cheapest with noto. The matrix snaps pins to residential-or-better roads, never a track (a backcountry-track snap once ordered Denver + the Utah Mighty 5 backwards). - Walk the trip (
planner/arrival.ts): consecutive pairs are warmed into the route cache at most 3 at once, then routed one leg at a time, each starting where the last arrived, to where the road enters each park (below). - Failures. A router that is down on any pair still to route is 502
route_unavailableand nothing is written, so an existing plan stays as it was. Only a 400 or 404 is a refusal. If every pair is refused, also 502; if some are, see "a place with no road". A plan gives up after 240 s (PLAN_BUDGET_MS,:50) with the same 502; finished routes stay cached, so a retry picks up where it stopped. - Split into days (
planner/split.ts): bydayCount, else about six hours of driving a day (TARGET_DAY_MIN,split.ts:2), at most 30 days. - Overnights: a day ending on a stop has none. A day cut mid-leg goes by time along the leg's stored steps to the
nearest Census place (
"Grand Junction, CO"), or"Stop near mile N"with no town in a 2-degree box. - Compose each day from the pairs just routed (
RoutingService.compose,routing.service.ts:141), with no whole-day router call, so a long day can't time out with every leg in hand. - Fill (
fill: true, the default onwhere-toonly): along each day, up to 3 patch stops per day (FILL_PER_DAY,:35), the patch nearest the road in each third of the day, within the detour, not held by the caller, not pinned, not collected by passing through (NO_STOP_NEEDED_TYPES,planner/stop-types.ts: state, national_forest, forest, street, nps_parkway, river), not a city, never at the day's ends and never past the 200-pin cap. Each goes where it adds least, and every day is routed again. - Write, in one transaction under
lockPins, re-reading pins first.replace: truedeletes the old days (pins stay; a stop'satMin/dwellMingo with its day); without it, existing days are 409plan_exists. Dates arestartDate + indexon the strings.
Routing to where the road enters a park. Crossing a patch's boundary is what unlocks it, and pins sit deep in big
parks (measured: Moab to Canyonlands' pin 521 min, to its boundary 154). So a stop whose patch has a polygon is routed to
the road's first entry into it. The pin is used when the previous point is already inside, when the entry is within
1 mile of the pin (ENTRY_NEAR_PIN_MI, arrival.ts:12), or with no polygon; polygons are repaired with ST_MakeValid
first. If the router refuses the pin, it aims for the polygon's nearest point. The arrival is stored per stop
(trip_board_days.arrivals); a stop's lat / lng stay the pin.
A place with no road (an island): a refused leg counts as a highway estimate, is never cut for an overnight, and
its day has no route, reads stale and carries routeRefused: true until its stops or start change, or POST days/:dayId/route asks again.
Endpoints. from.current: true stores fromIsCurrent and labels the start with the nearest town. to: { patchId }
pins that patch if needed. A board migrated from a saved web route (legacySlug) can only be planned along its own
endpoints: 409 legacy_endpoints { from, to }, which the app's form handles by locking From and To and offering
Start a new trip (src/features/trips/components/plan/PlanForm.tsx:173, :288).
where-to does all of this for a new board, in one transaction with its creation, so a router failure leaves no
board. It counts against the 100-trip cap. The title defaults to <from town> → <to>. No to is 400
nothing_to_plan. A retry is not a second trip: the same owner, from and to within 2 minutes returns the
board already made (WHERE_TO_RETRY_MS, :42).
Rerouting (backend/src/trip-boards/day-route.service.ts)
- A day starts where the one before ended (its overnight, else its last stop's arrival); day 0 at the board's
from; the last day ends at the board'sto(planner/day-points.ts). - Every plan edit reroutes after its commit (add, remove, reorder, move, an overnight, add or delete a day, deleting
a planned pin), asking the router only for changed pairs. The edit waits up to 5 s (
EDIT_REROUTE_WAIT_MS,day-route.service.ts:14); past that it answers with the day stale and the reroute finishes behind it. It reroutes every stale day on the board in order, so an edit also heals a day an outage left behind. - A slow older reroute cannot overwrite a newer edit: the save re-reads under
lockPinsand writes only if the day'sstopsVersion, stop ids, pins, start and end still match. - A router failure keeps the stale flag and old numbers. An empty day with no end is decided (
routeStale: false, null numbers), not stale. - Adding a patch or pin to a day places it where it adds least driving (
insertAt, with a 3 s matrix wait and no matrix above 8 points); an own place always appends. GET places?q=(place-search.service.ts) is the From / To search: towns and patches, at most 8, prefixes first, at most 5 towns while there are patches to show. Under 3 characters is 400bad_query.
Checked facts on each stop, and park entry (backend/src/trip-boards/stop-facts.ts)
- A patch stop with a published Plan tab record (
patch_visit_info, docs/features/plan-tab.md; today the 64 national parks) carriesfacts, worked out by the server on every plan read (loadFactsSources: two queries per read, only publicly visible patches): the grounds' hours on that day's date ("Open 24 h", "View any time", "By reservation", "8 AM–6 PM", "Closed that day"; a dated exception or a whole closure covering the date wins; a place with hours and no date yet says nothing about hours), the per-car price ("$35 car", "Free"), what to book in the research's own words (tickets.note, else "Booking needed" when a ticket is required), and the park's live NPS alert count with its conditions page. Alerts count only for a record marked as the park unit's own, as on the Plan tab, and only inform. - No published record:
facts: null. The web says "Hours not checked yet" for a patch and nothing for your own place. - The plan carries
entry: every paid place's per-car price once, the total, whether the America the Beautiful pass covers all of them, how many patch stops have no checked price, and the oldest check date. A price that isn't a plain dollar amount is not added up. No paid place, no card. The server formats the money (dollarsinstop-facts.ts: "$35", "$35.50", never "$35.5"; the total summed in cents) and sends it asfeeandtotalbesidetotalUsd; each place carries itspatchId, since two can share a name. - The web prints the facts as chips under the stop and the Park entry card under the goal card (
EntryCard.tsx). The app's Route tab prints the same from the same fields (src/features/trips/components/plan/DayCard.tsxStopFacts,EntryCard.tsx, words informat.tsfactChips/alertsLabel/entryLines): hours and car price as smallScout.Chips, "N NPS alert(s)" as a chip that opens the park's conditions page (a plain chip when there is no page), what to book under them, "Hours not checked yet" on a patch withfacts: null, nothing on your own place, and nothing at all from an older backend that sends nofactskey; the Park entry card ("Park entry", the total, "N park(s), per car.", the pass line, each park and its fee, "K other stop(s): fees not checked yet.", "Prices checked <date>.") sits under the goal card, viewers included, and is absent whenentryis null or missing. Withtrips_factson, the arrival check takes the hours chip's place and Before you go joins the plan (next section). entry.unchecked(added 2026-11-27, backward compatible) lists the patch stops with no checked price by name, each once in trip order;uncheckedStopsstays its count. Withtrips_factson, both cards list them as "fee not checked" in place of the count line (EntryCard.tsxnames, web and app); off, the count line as before. Still no card when no place is paid.
The arrival check and Before you go (trips_facts, off; backend/src/trip-boards/facts/)
Spec §6.6, lab part 2. Behind trips_facts AND trips_boards (TripsFactsFlagGuard, first: either off, the routes don't
exist; the app and the web hide everything and /trip-before-you-go/[id] redirects to /trips).
- One rule set, two clients. The arrival check is a pure module on each side:
backend/src/trip-boards/facts/arrival-check.tsday-arrivals.ts(the server's, which the web prints) andmobile/src/domain/visit-info-arrival.ts(built on the Plan tab'svisit-info.ts) +src/features/trips/logic/domain/arrival.ts(the phone's, so a live trip retimes with no signal).facts/arrival.fixture.jsonholds 33 place cases and 9 day cases with the backend's whole answer; both suites read it (arrival-check.spec.ts,__tests__/logic/arrivalParity.test.ts), so either side drifting fails a test.
- What it reads: the stop's published record (grounds' hours: a dated exception first, then the period covering the date,
then the weekday; whole closures; last entry; each venue's own hours) at the stop's
arriveMin. Statuses and their chip:open"Open when you arrive" (detail "Until 5 PM · last entry 4:30 PM"),closing"Closes 20 min after you arrive" (under 30 min, a heads-up, not a conflict),early"Opens at 9 AM" ("You'd arrive at 8:15 AM, 45 min early."),late"Closed when you arrive" (past closing or past the last entry),closed_day"Closed that day" (the closure's words, the exception's label, "Closed on Mondays", "Closed for the season"),all_day"Open 24 h",view_only"View any time",reservation"By reservation",closed"Closed",unknown"Hours vary",no_date"Needs a date to check the hours",no_time"9 AM – 5 PM that day" (no start time),not_checked"Hours not checked yet" (no record). A record older than 183 days is still read and adds "Checked <date>. It may have changed since." - Hours past midnight (22:00–02:00) belong to the night they open: an arrival before last night's close is read against
last night's hours (1 AM Wednesday is Tuesday night's opening, even when Wednesday itself is closed; a whole closure the
day before means last night never opened), and a last entry after midnight sits inside that night (01:00 is late at
1:30 AM, fine at 11 PM the evening before). Venues follow the same rule (
hoursAt,minutesOfin both clients). - A building shut while the grounds are open (Zion's visitor center at 5:25 PM) is listed by name ("Zion Canyon Visitor Center closes at 5 PM", "and N more buildings"), never a grounds conflict, with the reason: "The grounds are open when you arrive, so the patch still unlocks." (unlock is polygon containment, never hours). It never says a patch won't unlock.
- Fixes on a conflict (editors only; a viewer reads the same words): leave the stop before earlier (or later, for an
early arrival) by exactly the minutes it takes, aiming at the last entry, else 30 min before closing
(
CLOSE_MARGIN_MIN): the stop before's own minutes (PATCH …/stops/:stopId { dwellMin }, never under 10 or over 720), or the day's start when there is no stop before or it is too short to cut. Each candidate is re-timed through the day's own schedule (scheduleDay/retimeDay) and kept only if it clears the conflict, so a fixed time in between that soaks up the change offers nothing. Keep it (a building only): a tickkeep:<stopId>on the trip's checklist; kept, the panel folds to "Kept: …" with Undo. Move it to Day N: each other day the grounds (and that building) are open some time on its date, or undated. No fix says "No change to this trip's times or days fits it." - Time zones: a day's
arriveMinis taken on the day's clock, the zone of its first stop with a record, and moved onto each place's own zone before its hours are read (Denver 5:30 PM is Phoenix 4:30 PM in summer, the same in winter). A day whose start is in another zone than its first checked stop is read on that stop's clock (no worse than reading each stop on its own). An unknown zone reads the time unchanged. - Before you go (
GET /api/me/trip-boards/:id/before-you-go, a member;facts/before-you-go.ts): the bulk read of the trip's stops' published records (one query, plus one for the park units' NPS alerts), grouped: Book ahead (a required reservation whose window covers the stop's date, or undated; a reservation-only place), the trip's checklist, each keyedbook:<patchId>; Closures and alerts (closures on the stop's date, undated: not ended by today; the park's NPS alert count with the closures and dangers named first and its conditions page); Good to know (the booking note when nothing has to be booked, the record's notes and know items). Every stop on every day is read, so a booking window or closure that covers only a later visit is still listed; each item (by key) is listed once, at the first day it applies to, naming that stop and day, and a place's booking note is dropped once it has something to book. It ends with the oldest checked date, whether any record is stale, and each source site once (no API endpoints); stops with no record are listed by name. The answer also carriesarrivals(the server's checks, by stop id, for the web),records(by patch id, exactly what the check reads, for the phone) andticks. - Ticks (
PUT/DELETE …/checklist/:itemKey, editors): onlybook:<patchId>for an item on the list now, orkeep:<stopId>for a stop of the trip (else 404item_gone; a malformed key 400bad_item). A repeat tick or untick writes nothing; a real one writeschecklist_ticked/checklist_untickedand touches the board. Ticks are members-only: no public read carries them. - The app: the Route tab reads Before you go once per trip into the persisted query cache (
tripFactsQueryOptions, keytripBoards/<user>/<id>/facts) and works the checks out from it and the cached plan (useTripFacts). Each patch stop's chip row leads with the check (the hours chip goes), then its detail, the stale line and the conflict panel (components/plan/StopArrival.tsx). Fixes are queued edits like any other:updateTripStop(outboxupdateStop),updateTripDay,moveTripStop, andsetTripChecklistTick(outboxtick/untick, which patch the facts cache); a new start time or a stop's minutes re-time the cached day at once (applyOpToPlan+retimeDay), so the check follows offline. Under the Park entry card, Before you go ("N things for this trip") opens/trip-before-you-go/[id](screens/before-you-go/BeforeYouGoScreen.tsx): the groups, a switch on each Book ahead item for an editor (a viewer reads "Ticked by @handle"), Not checked yet, the checked line and sources; skeleton, offline-with-nothing-saved, error and empty states. - The web prints the server's
arrivals(trips-web/components/plan/StopArrival.tsx, the same testIDs) with the fixes as BFF edits (updateStop,updateDay,moveStop,tick/untickinlib/plan-calls.ts), and a Before you go panel under the Park entry card (components/plan/BeforeYouGo.tsx, checkboxes for editors). The page reads it server-side with the plan (app/b/[id]/plan/page.tsx) and again whenever the plan's clock or stops change (use-facts.ts).
When a day reaches each stop (backend/src/trip-boards/day-schedule.ts)
-
A stop's own minutes and fixed time can be set with
PATCH /api/me/trip-boards/:id/days/:dayId/stops/:stopId { dwellMin?, atMin? }(editors,trips_boards;PlanEditService.updateStop; 400bad_dwell_minoutside 1 to 720 whole minutes,bad_at_min; 404stop_gone/day_gone; null clears either; onestop_updatedactivity row; no version bump and no reroute: it moves the clock, not the road). The arrival check's Leave earlier fix is what sends it; there is no general editor for it yet. -
A day with a start time is timed by the server, so the web and the app print the same clock: from
startMin, each stop is reached after its leg (whole minutes, at least 1) plus 5 minutes to park (PARK_MIN), and left after its minutes there: its owndwellMin, else its type's (dwellFor, the app's Plan my day table: a zoo 2 hr, a state park 90 min, a roadside stop 15 min, anything else 30). A stop with a fixedatMinwaits for it before the visit starts. -
Each stop in the plan carries
arriveMin,leaveMin(minutes from midnight of the day's start; past 1,440 on a long day) andvisitMin; the day carriesendMin, when it reaches where it ends (the leg after the last stop). -
No times without a start time, on a stale day, or after a stop with no leg: nothing is guessed. The web says "Add a start time to see when you reach each stop." to an editor (
DayCard.tsx). -
dwell.fixture.jsonpins the backend table to the app's (mobile/.../__tests__/logic/dwellParity.test.ts). -
The web prints the time and the minutes in the timeline's left column, and the end time on the "Overnight in" row. The app's Route tab does the same (
DayCard.tsx,format.tsstopClock): a day with any time gets a clock column; each stop showsatMin ?? arriveMinand, beside a time only,visitMin ?? dwellMin; the overnight row showsendMin; an editor of a day with stops and no start time sees the same hint ("Add a start time to see when you reach each stop."), a viewer never. A long day's minutes past 1,440 wrap to the clock ("1:10 AM"), on both, with no "+1 day" mark.
What a day passes, a better road, what the trip earns
Three reads under /api/me/trip-boards/:id for any joined member. None is on a public route. A day not on the board is
404 day_gone.
GET days/:dayId/along?detourMin=(along.service.ts) answers{ detourMin, onTheWay, worthStopping }for 5, 15, 30 or 45 (else 400bad_detour). A stale or unrouted day is 409route_stale.onTheWay("On the way, no stop needed") is the no-stop-type patches whose polygon the road crosses for at least 250 m in all (ON_THE_WAY_MIN_INSIDE_M,along.service.ts:29), in road order.progress: 0means the road starts inside. Shorter clips are left out: iOS reports about every 250 m, so less might not unlock.worthStoppingis every other type within 7 mi of the road by pin or polygon (CORRIDOR_RADIUS_MI,backend/src/road-trips/detour.ts:15). A detour measures to the patch's edge, there and back, compared bywithinDetour. The day's two ends (first and last 3%) are exempt from the dial for up to 3 patches each (END_EXEMPT_PER_END,:31). Each list stops at 40 (ALONG_GROUP_CAP,:26).
GET days/:dayId/alternative(alternative.service.ts) answers at most one other way to drive a day, ornull, never an error. It uses Scout's router only (primaryOnly), never ORS. Candidates are uncollected, unplanned patches within 20 mi of the fastest road and at least 3 mi off it (:23,:25); at most 3 waypoints, one per third.gainedis the waypoints plus any other uncollected patch the new line really passes (pin within 2 mi, or 250 m inside its polygon), at most 6 (:29-30). The bar: at least 2 gained and at most 20 added minutes each (:32-33), with up to 2 retries dropping the costliest waypoint (:38), all within 20 s of routing (ALT_ROUTE_BUDGET_MS,:35).via(planner/via.ts) names the road the new route uses most that the fastest doesn't. Measured 2026-11-05 on 33 real days: 7 were offered one.GET goal(goal.service.ts) answers{ newPatches, totalPatches, finishes, progress }for the caller: patch stops on the plan's days, which collections the trip finishes, and the top 2 others by gain (GOAL_PROGRESS_LINES,:9), over collections the content sync serves, less any the caller bought (which the app shows complete,src/hooks/contentDerivations.ts:95).- Spatial reads have 8 seconds (
SPATIAL_TIMEOUT_MS,spatial-timeout.ts:6) withSET LOCAL statement_timeout. A timeout drops that part of the answer (no crossings, pin corridor only, or anullalternative), is logged, and is counted for the operator.
Planning limits on routing
- The planner's ORS budget (
planner/ors-budget.ts,PLANNER_ORS_DAILY_CAP400 a day): every plan or reroute pair that would fall back to ORS takes one first. The web planner keeps its own 800, so Navigate and Trips keep the rest of the 2,000/day free tier. Past the cap a leg Scout's router can't answer becomes a highway estimate (its dayrouteRefused), and the plan still saves. - Without
VALHALLA_URLthe matrix is unavailable and ordering falls back to the highway estimate.
The app's board screens (flag on)
| Route | Screen | Notes |
|---|---|---|
/trips |
Board grid (src/features/trips/screens/home/TripBoardsHome.tsx:277, layout :199) |
+ (new trip) in the top bar and one Where to? pill (:151), the grid's only way in to planning: Plan my day and Just drive are on Where to?'s own screen. Then Mine · Shared with you over a two-column masonry of cards, and "On this phone" (planned days you made, not board mirrors; a row opens the Trip Calendar). A card (components/boards/BoardCard.tsx:20) is the cover photo with its credit top right and a status badge over it (boardBadge, logic/domain/boardCard.ts:22): "Ideas · 7 pins" for a trip with no days, "Upcoming · May 13–17", "On now · May 13–17", "Done · 6 earned" (how many of its patches you hold), "No dates yet"; no badge at all from an older backend that sends no days. Up to four patch arts hang off the cover's bottom edge (only patches that have art), then the title and a meta line, "5 days · 7 patches", "4 patches" or "No pins yet" (boardMeta, :36), with the members' avatars on a shared trip (yours reads "You"). Mine ends with a dashed New trip tile (:161); with no trips at all it says "No trips yet. Start one, or save a place to a trip from any patch." with New trip. Signed out: "Sign in to make a trip and plan it with friends." (:216). Signed in while the session is still loading (a cold start) it shows the skeleton, never the sign-in prompt (logic/hooks/useTripsMember.ts). With trips_social on the tabs are Mine · Discover · Shared with you (:225; the flag going off mid-visit puts you back on Mine). Mine is one grid: your trips, then the trips you saved (newest save first, each with a gold Saved badge, opening Trip details), then the New trip tile (mineItems, :194); saved trips that fail to load say "Couldn't load the trips you saved." with Retry. Shared with you opens with your pending invitations (the Invitations row below), and its count includes them ("Shared with you · 3"); with invitations and nothing shared there is no "Trips friends invite you to show up here." line. Discover (src/features/trips/components/social/DiscoverTab.tsx:37): other people's public trips as cards (SocialTripCard.tsx:21: the cover with its credit and a saves badge, the first four patches' art, the title, and one meta line, "@author · 2 days · 5 patches · you have 3", the "you have" part only when you hold some) that open Trip details. Chips Near you (first, only with a fix: the store's last currentLocation, rounded to two decimals; the server keeps trips within 150 miles) · All · National parks · Weekend · Route 66 · Weird stuff · Cities · You have some already (only signed in). It opens on Near you when there is a fix and on All without one; opened on Near you with nothing near, it switches to All by itself (a chip you picked stays picked). Pages by the server's cursor with Show more; the boards skeleton while loading; "No public trips here yet." when empty; "Couldn't load trips." with Retry |
/trips-question |
today's "What kind of trip?" (app/trips-question.tsx → TripsQuestionRoute, src/features/trips/screens/routes.tsx) |
Moved off /trips when the flag is on. Nothing in the app links to it (since 2026-11-29, when the grid's "Plan a day or drive" row was removed and Plan my day and Just drive moved to Where to?): it opens only by its address (scout://trips-question), or as the Back target of a plan, collect, drive or calendar screen with nothing behind it (backToQuestion). So with the flag on, Collect nearby and the question's Calendar pill have no door either; the Trip Calendar is reached only from an "On this phone" row, which shows only once a planned day exists. Leads with Back, not the drawer's Menu: the route is on the root stack, outside the drawer (TripsHome mount="stack"; a Menu there opened nothing until 2026-11-12). Opened by its own link, with nothing behind it, Back goes to /trips. It does not turn into a live trip the way /trips does, so a trip started from it (Plan → Start, Collect nearby → Go, Just drive, a From-the-web drive) goes to /trips to show it (src/features/trips/logic/hooks/useTripsNav.ts showLiveTrip, a dismissTo('/trips'); nothing to do when already on /trips). The same goes for Plan my day and Just drive started from Where to?. Only with the flag on. With it off (prod), Plan my day and Collect nearby are also opened from Home, Near Me, the Calendar and Trip Day, and Start/Go go back to where they were opened from, as before (showLiveTrip's flag-off fallback). The plan, collect, drive and calendar screens' Back, with nothing to go back to (a reload, a deep link), lands on the question's own address under the flag (backToQuestion). Until 2026-11-12 Start returned to /trips-question and the live trip stayed hidden underneath (found by trips.spec under --flag trips_boards=on) |
/trip-board-new |
New trip sheet (src/features/trips/screens/board-new/TripBoardNewRoute.tsx:17) |
Title 1 to 120; a refused name says "That name can't be used", the cap "You've reached 100 trips", else "Couldn't create the trip. Try again." (createErrorCopy, src/features/trips/logic/hooks/useCreateTripBoard.ts:19) |
/trip-board/[id] |
The board (src/features/trips/screens/board/TripBoardScreen.tsx:571) |
The cover photo edge to edge under the status bar, with its credit and the title on it, and an info line, "You and @jess · 7 pins · no dates yet" (or "Starts Thu, May 13"; "Just you" alone; crewLine, :72) beside the crew's avatars, which opens Plan together. Floating glass buttons: Back, + (editors, on the Board tab: add a patch, note or place), Share (a trip anyone with the link, or the public, can read shares its web page; a private one opens Plan together, where its invite link is made) and ⋯. Then Board · Route · Map · Crew. A patch pin (components/boards/PinCard.tsx) is its place photo with the patch art hanging off its edge, the name, and a byline, "You pinned · SD" (who pinned it, and the patch's state); a note is a paper card. An editor of a trip not yet routed gets one gold Turn into a route, with "Scout orders the 4 places into days. Notes stay on the board." under it (turnIntoRouteNote, :469). Crew is a disabled tab (a screen reader hears "Crew, coming soon"; Segments, :326) unless trips_social is on; with it on, Crew (components/boards/CrewTab.tsx:151, GET /api/me/trip-boards/:id/crew) is headed "Your crew on the Mighty 5" and lists the joined members, most patches first: each one's "held of total" on the trip's patches with a bar and, under it, the names of the patches they hold ("none yet"), and Leads on the one member strictly ahead (nobody on a tie; there is no role chip). Then a line per collection the trip finishes for everyone ("After this trip, both of you finish …"; none, no line) that says how many patches the trip covers for each ("The trip covers every patch each of you is missing: 2 for @jess, 4 for you."; with nobody missing any, "Every one of its N patches."), and who holds which patch (faded = still needs it); a skeleton while it loads, Retry on a failure, and a 404 forgets the trip like the outbox does (the board then says so). `?tab=route |
/trip-where-to |
Where to? (src/features/trips/screens/where-to/WhereToScreen.tsx:26, form PlanForm.tsx:81) |
From is your fix, else a required search; To a town or patch (3 letters before the server is asked); then one row of chips for the optional start date, day count and detour, "Pick a date" (or the date), "Auto days" (or "2 days") and "Detour 30 min", each opening its control in a sheet (detour 5/15/30/45, default 30, DEFAULT_PLAN_DETOUR, PlanForm.tsx:41; the chips at :296). The call waits up to 280 s (PLAN_TIMEOUT_MS, src/features/trips/logic/api/tripPlan.ts:29) with a rotating waiting state. One call per destination and options; backing out leaves it running and a toast names the trip when it lands. Under the form, Or, no destination (WhereToScreen.tsx:59): Plan my day (opens Plan my day) and Just drive (starts the drive at once, as the question does; useChooseTrip, screens/home/TripsHome.tsx:95). Signed in while the session is still loading, the form's place is a skeleton |
/trip-plan/[id] |
Turn into a route (src/features/trips/screens/board-plan/TripBoardPlanScreen.tsx:28) |
The places that will be routed, then the same form, with the date, days and detour as a column rather than chips. An existing route asks first ("Replace the route" / "Keep my route", PlanForm.tsx:323-325). Editors only |
/trip-day-along/[id]?day= |
Along the day (src/features/trips/screens/along/AlongScreen.tsx:61) |
The dial over On the way, no stop needed ("The road runs through it. Unlocks as you drive."; a state says "Unlocks at the state line.") and Worth stopping ("+N min there and back"; Add queues the stop; "Added" only while it really is on that day). Viewers read, no Add |
/trip-day-route/[id]?day= |
Two ways to drive it (src/features/trips/screens/day-route/TwoWaysScreen.tsx:60) |
Only for a day that was offered one. The map across the top, under a heading capsule, "Day 4 · Torrey to Bryce" (twoWaysHeading, :71): the day's stops and the patches the other road gains as pins, the other road solid and the fastest dotted (the fastest is still drawn when the other road can't be). In the sheet below, the other road (its name, miles and time, a "+3 patches" chip and a "+25 min" chip, and the gained patches as a stack of art) against Fastest. Take it adds each gained patch not already on a day as a stop; it does not save the road |
/trip-board-place/[id] |
Drop a place (src/features/trips/screens/place/PlacePinScreen.tsx:27) |
A pin held at the map's centre; name it, Save. No place search |
/trip-board-members/[id] |
Plan together (src/features/trips/screens/members/MembersScreen.tsx:501), the trip's title under the heading |
The people in one list: your own row reads "You"; the owner's second line says "Owner", with no chip; everyone else carries a Can edit / Can view chip, which the owner taps to change the role or remove them. Owner: WHO CAN SEE IT (Only us / Anyone with the link) and one invite action, a Can edit / Can view switch over Copy invite link ("Link copied"; there is no share sheet), which reuses the newest live link for that role made after the latest removal and mints one only when there is none (inviteUrlFor, :146); role changes and removal; everyone but the owner can Leave, and reads who can see it as words. ACTIVITY, for every member (ActivitySection, :383): the trip's latest 30 changes in words, "@jess added Goblin Valley State Park to day 3" with "2 h ago" (your own read "You"; logic/domain/activityLine.ts), "Nothing yet. What anyone adds or changes shows up here." when there are none, and "Couldn't load the activity. Tap to try again." on a failure. With trips_social off, Public and Invite by @handle are disabled "Coming soon" rows. With it on (VisibilitySection, :338): Public is the third visibility option, queued like the others, with "Public puts it on Discover, credited to you. Your start point is shown as the nearest town, never your address." under the switch; a trip a moderator removed is refused (409 removed) and the outbox toasts "This trip was removed by a moderator and can't be public." while the refetch puts the old choice back (outboxRunner.ts, REMOVED_NOT_PUBLIC_COPY). Invite by @handle, first on the screen (components/boards/InviteByHandle.tsx:59): a search field (it takes a whole derived handle, up to 64 letters plus the @, HANDLE_QUERY_MAX; under 3 letters a hint and no request; a pause before each search; 429 says "Too many searches, try again in a minute"; someone already on the trip is listed "On this trip" and can't be picked), Editor / Viewer, Invite (a direct POST; user_gone, already_member and trip_full each say why). A pending invite reads "Invited · hasn't opened it yet" with the invited role's chip, and Cancel for the owner (the same DELETE as a removal, cancelInvite, :230). A non-owner reads Public as "Public" |
/trips (boards home, Shared with you) |
Invitations (components/boards/Invitations.tsx:66, trips_social on) |
My pending @handle invitations at the top of Shared with you, counted in its tab ("Shared with you · 1"; the home reads them from Mine too, for that count) (GET /api/me/trip-board-invitations; none, no section): the trip, who asked and as what, Accept (joins, then opens the board) and Decline (gone from the list). A trip that filled up says "This trip is full." and keeps the invitation; one the owner cancelled meanwhile leaves the list (useTripInvitations, logic/hooks/useTripInvitations.ts:29) |
/trip-invite/[token] |
Invite (src/features/trips/screens/invite/InviteScreen.tsx:126) |
"@owner invited you", what you can do, Join trip. Signed out, sign-in comes back here (src/lib/auth-return-to.ts:19) |
/trip-details/[id]?comment= |
Trip details (src/features/trips/screens/details/TripDetailsScreen.tsx:425), trips_social too: with either flag off it redirects to /trips (TripBoardsGate social, src/features/trips/screens/routes.tsx) |
Opened from a Discover or saved card, a trip notification (comment, mention, copy; ?comment=<id> washes that comment, it does not scroll to it) or its link. The hero is the catalog location photo of the first stop that has one (the details read carries no cover), edge to edge under the status bar with its credit and the title on it; Back, Share (the phone's share sheet with the trip's web page, scout-patches.com/trips/t/<id>, its title above the link) and, for anyone but the owner, ⋯ (Report trip, naming its author) float over it. Then @author (or "A Scout trip" when hidden), "N days · M patches · updated Oct 2", "Based on @author's trip" (opens the original while it is readable; "another scout's trip" when the original hides its author), the description, the stats strip (LIKES · SAVES · FINISHED · COMMENTS), the finishers' avatars ("+N more") over one sentence, "3 scouts collected every patch on this trip. You have 2 of 5." (the second part signed in only), Like, Save (both move at once and go back with "Couldn't save that. Try again." when refused), Copy (opens the new trip, /trip-board/<newId>; at the cap "You've reached 100 trips", else "Couldn't copy the trip. Try again.", copyErrorCopy, src/features/trips/logic/hooks/useTripSocial.ts:19), Open the board for a member, the days ("Day 1 · Tue, Nov 17" and their stops, each with its state and "you have it" on a patch you hold; a trip with no route lists its patches) and Comments · N, most liked first ("Top"), the first four then "See all N comments" (a ?comment= past the fourth opens them all). Comments are community's cards and composer (src/features/trips/components/social/TripComments.tsx:95, :201): one-level replies, likes, report / block / own delete on each comment's ⋯ (reported as post_comment), "At <stop>" over a tagged comment, Author and Finished it badges, stop chips over the composer (tap one to tag the comment, again to untag), and @-mentions from the thread plus people search (3+ letters of a handle). A 404 (private, removed, a blocked author either way) reads "This trip isn't available."; anything else "Couldn't load this trip." with Retry, including the route answering as absent (the server's trips_social off, isRouteAbsent), as on the Crew tab. Signed out (a guest; with no user at all the app sends every screen to the tutorial, and the link comes back here after sign-in, src/lib/auth-return-to.ts:25) it reads the same, without "You have"; Like, Save, Copy, a comment (its draft kept), a comment like and Report open sign-in that returns here |
/trip-before-you-go/[id] |
Before you go (src/features/trips/screens/before-you-go/BeforeYouGoScreen.tsx) |
Behind trips_facts too (the gate's facts). The trip's list grouped Book ahead (switches for editors), Closures and alerts, Good to know, Not checked yet; each item names its stop and day (a park's NPS alerts, live for the whole trip, read "Zion · NPS alert"), with an icon for what it is about (tickets, parking, getting there, weather, rules, access, pets, food, what to bring, safety; itemIcon); the checked date and sources |
/trip-recap/[id] |
Recap (src/features/trips/screens/recap/TripRecapScreen.tsx) |
Behind trips_recap too (the gate's recap, screens/routes.tsx:138-143). The route map, "Trip complete · May 13–17" or "So far", three numbers (patches, miles, states), collections completed, patches earned, Share the trip (the card) and, for the owner with trips_social on, Make it public. Opened from "See the recap" on an ended board or the one-time "Your trip's recap is ready" card on Trips (see "The trip recap") |
/save-to-trip/[patchId] |
Save to a trip (src/features/trips/screens/save-to-trip/SaveToTripSheet.tsx:235) |
Your editable trips in one list, best fit first, each row its cover, its title and a second line: on the best fit "Suggested: 12 mi from Moab, already on it" (its Save chip gold), on the others the trip's status and company, "Upcoming · May 13–17 · with @jess", "Done · Oct 18", "Ideas · 3 pins" (tripStatusLine, screens/save-to-trip/tripStatusLine.ts:24; nothing from an older backend with nobody else on it). "New trip with <patch>" creates and pins in one step |
Entry points into Save to a trip: the patch page's photo header (src/components/patch-detail-v3/PhotoHeader.tsx:202-203),
the patch ⋯ menu (src/components/patches-v2/PatchActionSheet.tsx:113) and a long-press on a Near Me tile
(app/(drawer)/near-me.tsx:217, :278). Save to a trip's order (src/features/trips/logic/domain/suggest.ts): editable
boards only; first the board whose nearest pin is closest, within 150 straight-line miles (BEST_FIT_MAX_MI, :6);
then by last updated; boards already holding the patch last, marked Saved. The best fit's line says why ("Suggested: 12
mi from Moab, already on it", suggest.ts:56). It makes one request (the trips list), whose cards carry each trip's
days and dates for the status lines.
The Route tab (src/features/trips/components/plan/RouteTab.tsx:75, DayCard.tsx:71, GoalCard.tsx:12):
- The goal card ("3 new patches", "finishes <collection> (held → after)", "n of N <collection>"; no card for a trip
that earns nothing), the Park entry card (
EntryCard.tsx; no card whenentryis null), then each day on the page (no card): "Day n", the date, "412 mi · 6 hr 12 min", and its stops. Each stop is its patch art (a pin glyph for your own place; no stop number), its name and what it is ("national park", "Your own stop"), its checked facts (open hours in green, NPS alerts in red), and its arrival time and minutes there in a clock column when the day has times. The leg that reaches each stop sits above it as a dotted link, the first stop's too (the drive from where the day starts). A stop whose arrival check has an unkept conflict is tinted red. The day ends with "Overnight in <town>" and the time the day gets there, and Start day N. Per-stop legs and times are null while a day is stale and print nothing. Under the days, a plan with a patch stop says "Miles and times run to where the road enters a park, not to the pin on the map." (PARK_ENTRY_NOTE), as the web does. - A stale day keeps its totals and says "Updating the route" (
STALE_COPY,DayCard.tsx:40); the plan is re-read every 5 s for up to 2 minutes per trip while focused (POLL_EVERY_MS,POLL_CAP_MS,src/features/trips/logic/services/planClocks.ts:5-6), then Try again appears. A refused day says "We couldn't find a road between these stops just now. That can be a hiccup on our side." (DayCard.tsx:37), labels its numbers estimates and offers Try again (routeTripDay); viewers get the words without the button. - Day entries. Every day with a road has What's worth a detour on this day (Along). A day has the road entry
("<via> · +N patches · +M min") only after its own
alternativeread answered with an offer; no offer draws nothing. Offers are paced (useAlternatives,src/features/trips/components/plan/useAlternatives.ts:48): only the first day on screen and the next 3 routed days (ALTERNATIVE_AHEAD,:27), one at a time, never a stale or refused day or one being removed (tripDaysRemoving,:58), and nothing while a server 429 runs (src/features/trips/logic/services/alternativeLimit.ts). An answer is keyed by the day's road and kept an hour. - Editing (editors only;
src/features/trips/components/plan/DaySheets.tsx): a stop's ⋯ (Move up / down, to the day before or after, Remove); a day's ⋯ (date, start time, where it ends, Remove day); Add a stop (unused pins or a search); Add a day. Stop edits and day fields are queued outbox ops that edit the cached plan at once;addTripDayandremoveTripDayare online only. A day's date can't be set before the day before it or before today. A stop's own time and minutes have no menu; withtrips_factson, the arrival check's Leave earlier fix sets the stop before's minutes (updateTripStop). - Reordering or moving a stop records
trip_stops_reordered(tripsSlice.ts:777,:785), which earns Detour ("Reorder the stops on a trip"). So Detour is earnable only wheretrips_boardsis on.
The Map tab (src/features/trips/components/plan/MapTab.tsx:54, MapSheet.tsx, TripMapView,
components/v2/parts.tsx:129): the map across the top of the screen, with the trip's name in a heading capsule over it
("Denver → Zion · 5 days", mapHeading, TripBoardScreen.tsx:466), and a sheet over its foot holding the board's tabs,
a chip per day ("Day 4 · Sun" on the day shown) and that day as the Route tab draws it, read-only, with Start day N
(useDayStart.ts, the Route tab's own rule). One day at a time; the line is the day's route and each pin sits at the
stop's own point (they differ for parks). Boards draw pinStyle="bare" pins; Trips' own screens keep the medallion. A
day with no line says "No route line for this day yet." (MapTab.tsx:25).
Look. Board screens wear the app's shared parts: Scout.TopBar with glass icon buttons 16 below the safe area, flat
brass AccentButton primaries, Scout.Card, Scout.Tabs, Scout.Toggle, Scout.Chip, Scout.Sheet, on the house
black with no grid (src/features/trips/components/boards/parts.tsx). Since 2026-11-29 the board, Trip details, the
Map tab, Two ways and the recap open edge to edge instead: a photo (TripPhotoHero) or a map from the top of the screen,
under the status bar, with the glass buttons floating over it (TripPhotoTopBar), and on the map screens a black sheet
over the map's foot (MapSheet). The boards home, Where to?, Along, Two ways, Before you go and the recap wait while a
signed-in session is still loading (a cold start) rather than asking the member to sign in (useTripsMember,
logic/hooks/useTripsMember.ts).
Offline edits through an outbox
Every board edit (pin add, edit, move or removal, rename, visibility, and stop and day-field edits) is an op in a
persisted outbox (src/features/trips/logic/domain/tripBoardOutbox.ts), a pure reducer in the trips slice. Enqueueing
edits the cached board or plan at once.
- A double-tap queues one add (
DUPLICATE_ADD_MS1.5 s,findDuplicateAdd,tripBoardOutbox.ts:55,:62). - A re-sent add is one pin. An add is marked uncertain before it is sent and carries its op id as
clientOpId, so a reload with it in the air gets the same pin back; an own place added to a day works the same way. - Draining (
src/providers/SyncProvider.tsx:176-184): on sign-in, foreground and reconnect; one drain at a time; oldest first, one trip at a time. Sign-out clears the queue (ops carry no owner). - Offline ids are
local-<opId>and are rewritten to server ids when the add lands. - Failures (
src/features/trips/logic/services/outboxRunner.ts:42-60,runOutbox,:137): a bare 404 means you were removed ("You're no longer on <trip>", the board is forgotten); a 403 that you are now a viewer ("You can only view <trip> now"); a coded 404 drops the op;blocked_termrolls back with "That note can't be posted" or "That name can't be used"; a 409 on a pin add says "This trip is full (200 pins)" or "Already on this trip"; other 4xx drop and refetch; 5xx, 408 and 429 count a strike (5 drops it, "Couldn't save a change. It's been undone."); no network or a 401 keeps everything and stops. stale_order(409 on a reorder) writes the server's day into the cache and toasts "<handle> changed day n" (dayChangedCopy,:58; "Someone" if the feed is slow).- The arrival check's fixes and the checklist (trips_facts):
updateStop(a stop's minutes, a plan op answered with the day) andtick/untick(edit the Before you go cache; only the newest of a tick and untick of one item is kept); a coded 404item_gonedrops a tick quietly. A new start time or a stop's minutes re-time the cached day at once. - Never queued: invites, roles, removal, leaving, creating and deleting a board,
planTrip,whereToTrip,addTripDay,removeTripDay,routeTripDay. Plan calls return{ status, plan?, error? }; after a transport failure, a timeout or an uncoded 502/503/504 the plan is re-read once and counts asalready_plannedonly if it now holds new days (couldHaveCommitted,src/features/trips/logic/services/planCalls.ts:36). - Toasts show anywhere, from one host (
src/features/trips/components/boards/TripBoardToastHost.tsx:14, mounted inapp/_layout.tsx).
Board days on the Trip Calendar, and Start day N
The server (backend/src/trip-boards/trip-calendar.service.ts, GET /api/me/trip-boards/calendar?from=) answers
the dated days, from the phone's local date on, of trips the caller has joined: { tripId, tripTitle, dayId, index, date, startMin, patchIds, origin, fromIsCurrent }. Hidden patches are left out; a day with no visible stop is not listed.
Bounded to 120 days ahead, 40 days (CALENDAR_MAX_DAYS, :10) and 25 trips (:12). An unreal from is 400
bad_date (:44).
The phone (src/features/trips/logic/services/calendarMirror.ts) keeps each as a planned day in dayTrips, id
board-day-<dayId> (mirrorId, calendar.ts:56), named "<trip> · Day N", leaving at the day's start or 9 AM
(DEFAULT_LEAVE_MIN, calendar.ts:43). The existing calendar code then lists it, holds its patches, schedules its
head-out reminder and promotes it on its date.
- The server is the truth: re-mirroring never duplicates, a changed day moves its mirror and reminder, and a day the
server stops listing is removed. Only a successful answer removes anything (
mirrorBoardDays,:122). - A live mirror is never touched, and one that went live and ended stays on the phone (
wentLive); it goes live again only if the server moves it to another date. A finished one does not come back. - Only within 14 days (
BOARD_AHEAD_DAYS,calendar.ts:63): a mirror further out gets no reminder and holds no patch, though it is on the calendar. - When it reads: the root watcher (
TripCalendarWatcher,app/_layout.tsx:499) on open, foreground and catalog arrival, and/tripson focus; at most once a minute (CALENDAR_MIN_GAP_MS,calendarMirror.ts:34), checking the account after the answer. - Flag known off:
clearBoardMirrors(:151) removes every mirror not live and not gone live, with its reminders. Sign-out emptiesdayTrips, and the orphan sweep cancels leftoverboard-day-…reminders (cancelOrphanMirrorReminders,reminders.ts:146). A nulluserIdalone (an optimistic session restore) is not a sign-out. - A current-location day goes live from this phone's fix (
start.ts:48-53). - Opened from the calendar, a mirror offers Open the trip instead of Delete, Re-plan and Save.
Start day N (startBoardDay, start.ts:153): a gold button under each day with a stop, for any role (nothing
is written to the board). It starts the day now through startV2Trip with the day's patch stops in order, from the
day's start (dayOriginOf, src/features/trips/logic/domain/dayOrigin.ts:27), saved under the mirror id so a day
already on the calendar becomes that trip, and cancels its head-out reminder. Own places unlock nothing and are left
out; a day with only own places does not start. The day already live offers Open the live trip; with another trip
live it says "Another trip is on. End it to start this day." and refuses (busy, :165).
The trip recap (trips_recap, off; backend/src/trip-boards/recap/)
Spec §6.8 ("Recap when the last day ends or a live trip goes quiet for 24 h"). Behind trips_recap AND trips_boards,
both off in both registries. The design is trips-next-lab part 5, "The recap when a trip ends", restyled to the app.
The server (GET /api/me/trip-boards/:id/recap?today=YYYY-MM-DD&tz=<IANA zone>, recap/trip-recap.controller.ts;
TripsRecapFlagGuard first, so with either flag off the route answers Nest's unknown-route 404, then auth) answers any
joined member (others: the bare 404) with their own recap, worked out on every read and stored nowhere
(recap/trip-recap.service.ts):
firstDate/lastDate: the first and last dated day;days: every day on the plan.miles: the days' miles added up, whole miles. Null when a day with a stop was never routed (a total would be short) or no day has miles; an empty day adds nothing (totalMiles).states: the US states the days' stored roads cross, once each, in the order the road meets them, day by day (the corridor'scrossedrule,trips/corridor-sql.ts, over up to 30 roads). A stale day keeps its last road. The read has the spatial reads' 8 s (spatialQuery); a timeout isnull(unknown, not none), logged asspatial_timeout where=recap.statesand counted for Server Health.earned: the caller'suser_patcheson the trip's visible patch pins (planned on a day or not) collected inside the trip's window, oldest first:{ patchId, name, artUrl, collectedAt }. However collected: a live unlock, Unlock Manually or a camera-roll import all count. A recap is the record of what you got on the trip and earns nothing, and an import is the app's own account of where you were (its photo's date and place), so there is nothing to protect by leaving it out (achievements still countgpsonly). A patch that left the catalogue since is not earned; another member's collecting is not yours.- The window (
recapWindow): midnight startingfirstDateto midnight endinglastDate, on the clocks oftz, the phone's zone (a board day's date has no zone, so only the phone can say when it began; clock changes are handled). An unknown zone is 400bad_tz. With notzthe window widens to every zone on Earth (UTC+14 to UTC−12), so nothing collected on the trip is missed, at the cost of up to a day's slack at each end. No dated day: no window,earned: []. totalPatchStops: the plan's visible patch stops (GoalService.plannedPatchIds).completed: visible collections (not one the caller bought, which the app shows complete) holding an earned patch that the caller now holds whole and whose last patch was collected inside the window (one finished later, at home, is not the trip's). Built onGoalService.collectionLines.ended: the last dated day is beforetoday, the phone's local date (400bad_dateif not a real date). Withouttoday, yesterday in UTC, which no zone's today is ever before, so a trip never ends early. No dated day never ends.canMakePublic: the caller is the owner, the trip is notpublic, a moderator hasn't removed it, andtrips_socialis on.
The app's Recap screen (/trip-recap/[id], src/features/trips/screens/recap/TripRecapScreen.tsx, behind
TripBoardsGate recap; either flag off redirects to /trips): the route on a map from the top of the screen (every
day's stops as pins, the patches earned ticked, and the days' roads joined, from the cached plan; while the plan loads, a
skeleton; no plan, no map), with Back (to the board when nothing is behind it) and Share floating over it, and a sheet over
the map's foot holding "Trip complete · May 13–17" (or "So far · …" before the last day has passed, from the server's
ended), the title, three numbers (patches, miles, states; no day count, which the dates already say; miles and states
are left out when unknown, and states that couldn't be worked out say so), a card per collection completed (its art
stacked, the patches this trip earned first, up to six; "<name> complete"; and a second line, "Finished on this trip.",
"2 of its 3 on this trip." or "All three in one trip.", completedLine, components/recap/recapCopy.ts:40), the patches
earned as a grid of art with no heading, or "No patches collected on this trip's stops during its dates." / the no-dates
line, Share the trip, and for the owner with trips_social on and canMakePublic, Make it public (queued
through the outbox as Plan together's visibility switch, kind: 'update'; then "Public. Listed on Discover."). The
read sends the phone's date and zone (logic/queries/tripRecap.ts, deviceZone), sits under the board's query key (a
board refresh re-reads it) and is persisted with the query cache. States: signed out, loading (the house skeleton; also
while a signed-in session is still loading), offline with nothing saved, error with Retry.
The share card (components/recap/RecapShareCard.tsx): a 1080×1350 card drawn off-screen and captured by
useShareCard (surface trip_recap), like the 50 States card: the wordmark, TRIP RECAP, the title and dates, up to 10
patch arts (+N), the completed collections, the numbers, and the sharer's invite code (InviteCodeLines: "Scout · Invite
code K7M2QX" and the invite URL; with no code, scout-patches.com/get). A first share mints the code before the capture.
The sheet's text is "<title>, my trip on Scout: <invite link>?src=trip-recap" (SHARE_LINE.tripRecap, inviteUrlFor).
On the web build view-shot can't capture, so Share sends the same line and link as text through the browser's share
(navigator.share, via React Native Web's Share), or with none copies them and says "Link copied"; no image leaves the web.
When it is offered (components/recap/RecapEntry.tsx, logic/domain/recap.ts):
- On the board: "See the recap" with "Ended <date>" under the header (
RecapEntry, mounted inTripBoardScreen.tsx) once the plan's last dated day is before the phone's today (tripHasEnded, the server's rule). It stays there; it is not one-time. - On Trips (
RecapReadyCard): "Your trip's recap is ready" and the trip's title, once per trip on this phone (useRecapSeen, an AsyncStorage device flag like the permission prompt's; opening it or Not now marks it seen), when a board day started with Start day N (the live tripboard-day-<dayId>withv2.boardRef) has ended on the plan's last day (finished, so archived, or ended with End trip; ending day 1 of 3 is not the end of the trip) or gone quiet: still live with no start or unlock for 24 hours (QUIET_MS), whichever day it is (liveDayOutcomes,recapReadyFrom). Only the newest such trip is offered. - No push notification for a recap: it is not one of the six trip notification types.
Boards on the web (trips-web, flag on)
The same boards are pages of the web app at scout-patches.com/trips (trips-web/):
| Path | Page |
|---|---|
/mine |
Trips: Mine · Shared with you, start an empty trip. /my-trips redirects here with the flag on (app/my-trips/page.tsx:18). With trips_social on too: the tabs Mine · Discover · Shared with you (components/social/TripsTabs.tsx), Invitations (my pending @handle invites, Accept opens the board, Decline drops the row; components/social/Invitations.tsx) and Saved (GET /api/me/trip-board-saves as cards to each trip's /t/<id>; "Trips you save from Discover show up here." when none; left out when it can't be read; components/social/SavedTrips.tsx) |
/discover |
Discover (trips_social, else a 404): other scouts' public trips, readable signed out (app/discover/page.tsx). Filter chips are links (?filter=): All, Near you (a button shown only where the browser has geolocation, asking for it only when pressed, the place rounded to 2 decimals in the URL; components/social/NearYouChip.tsx), National parks, Weekend, Route 66, Weird stuff, Cities, and You have some already signed in only. Cards: art (or the credited cover), title, @author unless hidden, likes · saves, patches · days, "You have N" signed in. More trips follows next one page at a time; "No public trips here yet." when empty. Indexed, canonical to the bare /discover |
/b/<id> |
A board for its members: owner renames in place, the map (a planned board's is the plan's: every day's road and every stop with its patch art, none dimmed, boardMap in lib/board-map.ts; planned with roads but every stop taken off, the roads and the board's two ends; unplanned, its ends and places), pins (move, remove, add a note), MembersPanel (visibility, invite links with Revoke, roles, leave). With trips_social on: the owner's visibility gains Public: listed on Discover, anyone can find it (and the page prints "Public, on Discover: …/t/<id>"), Invite by @handle (people search from 3 letters, pick, Can edit / Can view, Invite; components/social/InviteByHandle.tsx), and pending invites listed as "Invited · Can …" with Cancel (the existing member DELETE) |
/b/<id>/plan |
The route, in the planner layout: a bar with From, To, Dates (the first to the last day's date, else "From" the plan's start or the first day's own date, else "No dates yet"; datesLabel) and the detour, the goal card and each day as a timeline in a scrolling column, and the map of all days. Editors get every plan edit as buttons (no drag): a stop's Up, Down, Day N and Remove sit behind its ⋯ button, which stays open while you work on that stop (components/plan/DayCard.tsx); Along, Two ways and Plan again. Every member gets Route in Google Maps on each day: Google's directions link from where the day starts (the trip's start; else the day before's overnight or last stop), through its stops where the road reaches each, to where it ends (its overnight; the trip's end on the last day), at most 9 stops after the start as the app's hand-off (lib/route-in-maps.ts). Where to? keeps its waiting state until the new trip's page has opened |
/b/new |
Where to?: a start and a place; lands on the new trip's plan |
/i/<token> |
Invite: Open in Scout (a scout://trip-invite/<token> link) and Join on the web |
/t/<id> |
The link view: a migrated or planner-saved trip as before; an app board shared by link as PublicBoardView (title, description, endpoint labels, patch pins, author only if shown). With trips_social on, an app board renders from GET /api/trip-boards/:id/details instead (components/social/TripDetailsView.tsx): the patch art, title, "A trip by @handle" unless hidden, "Based on @author's trip" (a link while the original is readable), the stats row (likes · saves · finished · comments), the finished scouts' avatars, "You have N of M" signed in, the days and their patch stops (the patches when unplanned), and the comments beside them ("At <stop>" tags, Author / Finished it badges, one level of replies). Like, Save and Copy to my trips are sign-in links signed out (back to this page); signed in they toggle on the server's answer and Copy lands on the new trip's /b/<id>. The composer has @-mention autocomplete (people search, 3+ letters; only mentions still in the text are sent) and an optional stop tag; a comment's like and its author's Delete. Report trip (the moderation reasons) for signed-in non-owners. Never a coordinate, note, own place or member: the client components get stop names only. Unreadable (private to you, blocked, removed) is the existing not-found page. Its card (app/t/[id]/opengraph-image) is the trip's own only when public (title, author, art); a link or private trip gets the hub's |
| route pages | Flag on: the planner layout and MapLibre map; a save lands on a board and the button says "Save to a trip" (components/SaveBar.tsx:51) |
- One BFF per surface (
app/api/plan/route.ts→lib/plan-bff.ts;app/api/boards/route.ts→lib/boards-bff.ts;app/api/social/route.ts→lib/social-bff.tsfor like, save, copy, comment, report, people search, invite by @handle and my invitations, a 404 unlesstrips_socialandtrips_boardsare on), route handlers rather than server actions so per-member limits see the real user and a signed visitor IP; same-origin only, 401 with a sign-in link, Bearer forwarded (lib/bff-core.ts; a list answer, such as the comments after a post, passes through as a list). Pages read the social GETs server-side (lib/social-api.ts), with the token when there is one. - Time limits (
lib/backend-timeout.ts:15): plan calls 285 s,alternative45 s, edits and re-route 20 s, the rest 8 s. If a long call is cut, the page keeps waiting and reads the plan every 10 s until it is ours or 285 s pass. - The map (
components/TripMap.tsx): MapLibre in the app's field-guide style over Protomaps tiles, the route in brass with a dark casing (lib/trip-map.ts:4-5). The SVG sketch stays as the fallback until GL draws, for good when WebGL fails, and in print. MapLibre's worker is served by the app; the style file must match the app's byte for byte (test/map-style-drift.test.ts). - The web computes nothing: every number, line and offer is the server's.
- Indexing:
/mine,/b/<id>and/i/<token>arenoindex; a board's/t/<id>isnoindex, follow;landing/public/robots.txt:30-33disallows the board paths. Withtrips_socialon, a public trip's/t/<id>isindex, followwith a canonical (tripDetailsMetainlib/seo.ts), and/discoveris indexed; both, plus up to 5 Discover pages (100 trips) of public trips, are in/trips/sitemap.xml. So/t/<id>no longer carries anX-Robots-Tagheader (a header can't see visibility): every non-public/tbranch saysnoindexin its robots meta. - Trips social on the web does NOT have: the lab's "Search trips" box on Discover (no backend search), the crew
view, comment reporting (only the trip is reportable from the web), editing a comment, or a share sheet. A
migrated or planner-saved trip made public keeps its old saved-trip page (
noindex), not the social page.
The saved_routes migration
backend/prisma/migrations/20261105130000_trip_boards_from_saved_routes/ copied every saved_routes row onto a board
with the same id (so /trips/t/<id> and older app builds keep working), visibility = 'link', hide_author = true, the endpoints and detour, legacy_slug, legacy_marker_ids, one owner member and one patch pin per saved stop.
It is re-runnable and not behind the flag. saved_routes stays, unread. SavedRoutesService
(backend/src/road-trips/saved-routes.service.ts) now reads and writes boards with a legacy_slug. Pins carry source
(route or board) and on_route: the saved-routes API reads only route stops, and a re-save never removes a board
pin. npm run saved-routes:reconcile (run by the deploy after the restart) carries over saves made by the old backend
in the minutes between migration and restart.
Data model
On the device (persisted store, MMKV): the trips slice src/features/trips/logic/store/tripsSlice.ts, composed by
src/domain/store.ts:68.
dayTrips(every saved trip, planned days and board mirrors included),activeDayTripId,tripArchive(finished trips, newest first),roadTrips/activeRoadTripId(road trips saved before 2026-11-12; none can be made now),roadView, the trip-sync bookkeeping (tripServerIds,tripSyncAccountId,syncedTripsFingerprint,rejectedTripsFingerprint),tripBoardOutbox,tripRemindersEnabled(default true),preferredMapsApp,lastTripKind(tripsSlice.ts:46-173).tripDaysRemovingis transient.- Persisted keys are unchanged by the module move except
roadDraftandtripView, which are dropped (__tests__/logic/tripsPersist.test.ts). - A trip's
visitedIds(stops collected while that trip existed, its progress) is device-only and not synced, so a reinstall starts every trip at 0 of N. - A planned day is an
ActiveTripwhosev2.scheduledis true, itsstartAton its day,originits From, and for Collect nearbycollectionId. It sits indayTripswithout being live (saveDayTrip,tripsSlice.ts:444). - Two optional
TripV2fields (src/domain/types.ts), device-only likevisitedIdsand absent on older trips:dismissedIds(Not today on the patch-ahead alert) andunlocks({ patchId, at, unlocked, announced? }[], what was unlocked or reached while the trip was live, once per patch).tripsPersist.test.tsround-trips both.
On the server:
tripsandtrip_patches(backend/prisma/schema.prisma:1354,:1368), written by the sync push.routes.legs jsonb(nullable), migration20261006120000_route_legs;route_refusals.curated_tripsand their stops are still content tables with a backend endpoint (GET /api/trips/curated,backend/src/trips/trips.controller.ts:35), but nothing in the app reads them since the curated trips query was deleted.- Boards (migration
20261105120000_trip_boardsand later;schema.prisma:1436-1700):trip_boards(owner, title, description, visibility,hide_author, cover pin, from / to, detour,legacy_slug,start_date,from_is_current),trip_board_pins(kind, patch, place, note, position,source,on_route,client_op_id),trip_board_members(role, state),trip_board_invites,trip_board_activity,trip_board_removals,trip_board_days(position, date,start_min, overnight,stops_version,route_stale,route_id, miles,drive_min,legs,routed_stop_ids,arrivals,route_refused) andtrip_board_stops(day, pin unique, position,at_min,dwell_min). Boards are separate fromtrips/trip_patches. - Trips Next phases 3, 4 and 6 (migration
20261127120000_trips_next_social_facts, additive, every column defaulted or nullable, safe to deploy with the flags off):trip_boardsgains the copy creditcopied_from_trip_idandcopied_from_owner_id(both SET NULL when the original or its author goes) andcopied_from_handle(a snapshot, so the credit survives); the counterslike_count,save_count,copy_count,comment_count,finished_countwithfinished_checked_at;published_at(last time it became public, Discover's tiebreak); andremoved_at(a moderator removed it). Indextrip_boards_public_idxon public, unremoved trips bypublished_at.trip_board_likesandtrip_board_saves: one row per trip and user (cascade with either).trip_board_checklist: Before you go's ticks, keyed by trip anditem_key(book:<patchId>orkeep:<stopId>), with who ticked it and when (the items themselves are computed, never stored).posts.trip_board_id(unique where set, cascade with the trip): the trip's hidden anchor post for its comments;posts_one_board_checknow allows at most one of patch, campaign and trip.post_comments.stop_patch_id: a trip comment's stop tag (plain text, no FK).profiles_handle_prefix_idxonlower(handle) text_pattern_ops, for people search.- Twelve
profilesbooleans,notify_trip_*andpush_trip_*for invites, activity, comments, mentions, copies and starts, all default true. - The recap stores nothing: it is worked out on every read. Invite by @handle reuses
trip_board_memberswithstate = 'invited'.
API surface
POST /api/trips/route(JWT) returns the route pluslegs: { miles, driveMin }[] | null, one per waypoint pair.POST /api/trips/rerouteserves Navigate.POST /api/trips/route-corridorandGET /api/trips/curatedare still served; the app no longer calls them (backend/src/trips/trips.controller.ts).- The sync channel (
POST /api/sync/push,GET /api/sync/user-data) carries trips. - From the web reads
GET /api/me/saved-routes({ routes }, newest first; the app readsname,detourMin,patchIds). The rest of the saved-routes API is in road-trip-planner.md. - Board routes (all behind
trips_boards; off, each answers Nest's unknown-route 404):
| Route | Role | Answers |
|---|---|---|
GET /api/me/trip-boards |
— | { mine, shared } cards; each carries the first four patch pins that have art, dayCount, startDate / endDate (the first and last day's dates, null without days or dates) and youHave (how many of its patch pins the caller holds), for the card's status badge (backend/src/trip-boards/dto/trip-board.dto.ts:58-66) |
POST /api/me/trip-boards |
— | 201 board; 400 bad_title / blocked_term; 409 limit |
GET /api/me/trip-boards/places?q= |
— | up to 8 towns and patches; 400 bad_query |
POST /api/me/trip-boards/where-to |
— | 201 { board, plan }; 409 limit; 400 nothing_to_plan; 502 route_unavailable |
GET /api/me/trip-boards/calendar?from= |
joined | dated days; 400 bad_date |
GET / PATCH / DELETE /api/me/trip-boards/:id |
viewer / owner / owner | the board; public is 400 not_yet with trips_social off, 409 removed on a removed trip |
POST /api/me/trip-boards/:id/pins |
editor | 201 pin (clientOpId idempotent); 404 patch_not_found; 409 already_pinned / trip_full_pins |
PATCH / DELETE /api/me/trip-boards/:id/pins/:pinId |
editor | 404 pin_gone |
GET /api/me/trip-boards/:id/activity?cursor= |
viewer | 30 per page |
POST / GET / DELETE /api/me/trip-boards/:id/invites[/:inviteId] |
owner | invite (predatesRemoval on the list); 404 invite_gone |
PATCH / DELETE /api/me/trip-boards/:id/members/:userId |
owner, or yourself | 400 owner_role_fixed / owner_cannot_leave |
POST /api/me/trip-board-invites/:token/accept |
— | the board; 404 invite_gone; 409 trip_full |
POST /api/me/trip-boards/:id/members (trips_social) |
owner | 201 { userId, handle, avatarUrl, role, state: 'invited' }; 400 bad_role / cannot_invite_self; 404 user_gone; 409 already_member / trip_full |
GET /api/me/trip-board-invitations (trips_social) |
— | [{ tripId, title, role, owner: { userId, handle }, invitedAt }], newest first |
POST /api/me/trip-boards/:id/invitation/accept / …/decline (trips_social) |
the invitee | accept: the board, 404 invite_gone, 409 trip_full; decline: 204, 404 invite_gone |
GET /api/trip-board-invites/:token, GET /api/trip-boards/:id/public |
none | preview; link view (never members, notes, places, activity or coordinates) |
GET /api/people/search?q= (trips_social; backend/src/people/people.controller.ts:26) |
signed in | [{ userId, handle, avatarUrl }], up to 8; 400 bad_query; 60 a minute per member |
GET /api/trip-boards/discover?filter=&lat=&lng=&cursor= (trips_social; trip-social.controller.ts:41) |
none (optional auth) | { items: SocialTripCard[], next }; 400 bad_filter / bad_cursor / bad_coordinates; 60/min per IP |
GET /api/trip-boards/:id/details (trips_social; :53) |
anyone the read rule lets in | TripDetailsDto (see "Trips social on the server"); a malformed or unreadable id 404 |
GET /api/trip-boards/:id/comments (trips_social; :59) |
anyone the read rule lets in | the comments, with stopPatchId, isAuthor, finishedIt |
PUT / DELETE /api/me/trip-boards/:id/like, …/save (trips_social; :77-103) |
signed in, can read | { liked, likeCount } / { saved, saveCount }; 404 unreadable |
GET /api/me/trip-board-saves (trips_social; :105) |
signed in | saved trips as cards with savedAt, newest first |
POST /api/me/trip-boards/:id/copy (trips_social; :110) |
signed in, can read | 201 { id, title, copiedFrom: { tripId, handle } }; 409 limit |
POST /api/me/trip-boards/:id/comments (trips_social; :118) |
signed in, can read | 201 the thread; body { text (≤500), parentId?, mentions? (≤20), stopPatchId? }; 400 bad_stop |
DELETE /api/me/trip-boards/:id/comments/:commentId (trips_social; :126) |
the comment's author or an admin | { success: true }; 404 a comment the caller can't see |
PUT / DELETE /api/me/trip-boards/:id/comments/:commentId/like (trips_social; :133-145) |
signed in, can read | { likeCount } |
GET /api/me/trip-boards/:id/crew (trips_social; :147) |
joined member | { patches, members, finishesForEveryone } |
GET / POST /api/me/trip-boards/:id/plan |
viewer / editor | PlanDto; plan body { from, to?, startDate?, dayCount? (1-30), detourMin?, fill?, replace? }; 409 plan_exists / legacy_endpoints / trip_full_pins; 502 route_unavailable. Without detourMin the board's, else 15 (plan.service.ts:133); both forms send 30 |
POST /api/me/trip-boards/:id/days, PATCH / DELETE …/days/:dayId, POST …/days/:dayId/route |
editor | add, edit, remove, re-route a day; 409 trip_full_days (30) |
POST / DELETE …/days/:dayId/stops[/:stopId], PUT …/stops/order, POST …/stops/:stopId/move |
editor | stop edits; 409 already_planned / stale_order; 400 stops_mismatch |
GET …/days/:dayId/along, …/alternative, GET …/goal |
viewer | as above |
PATCH …/days/:dayId/stops/:stopId |
editor | { dwellMin?, atMin? } (number or null) → the day (DayDto); 400 bad_dwell_min / bad_at_min; 404 stop_gone / day_gone |
GET /api/me/trip-boards/:id/before-you-go (trips_facts) |
viewer | { today, bookAhead, closures, goodToKnow, notChecked, checkedOn, stale, sources, arrivals, records, ticks } (items { key, kind, title, text, url, where: { stopId, patchId, name, dayIndex, date }, ticked }; arrivals { status, label, detail, arrival, venues, conflict, groundsConflict, keep, shiftMin, shiftFor, stale, checkedOn, fixes, noFix }) |
GET /api/me/trip-boards/:id/recap?today=&tz= (trips_recap) |
viewer | { tripId, title, firstDate, lastDate, days, miles, states, earned: [{ patchId, name, artUrl, collectedAt }], totalPatchStops, completed: [{ collectionId, name }], ended, canMakePublic }; 400 bad_date / bad_tz (see "The trip recap") |
PUT / DELETE /api/me/trip-boards/:id/checklist/:itemKey (trips_facts) |
editor | { itemKey, ticked: true, at, by } / { itemKey, ticked: false }; 400 bad_item; 404 item_gone (tick only) |
Every trips_social, trips_facts and trips_recap route also needs trips_boards; with either flag off it answers
Nest's unknown-route 404 before auth. Social writes share the boards' 300-an-hour member bucket. Reporting a trip is the
shared POST /api/moderation/reports with target trip_board.
Plan edits write one activity row each; a reroute writes none. routeStale on the wire is true when the stored flag is
set or the routed stop ids differ from the visible stops (isDayStale, backend/src/trip-boards/plan-mappers.ts:70);
while stale, per-stop legs are null.
Key files
src/features/trips/README.md: the module layout and its rules.index.ts,domain.ts,types.ts,store.ts,mocks.ts: its doors.src/features/trips/screens/home/TripsRoute.tsx: what/tripsshows.screens/routes.tsx: the thin route bodies and the gate.screens/redirects/oldTripLinks.tsx: the four old links.src/features/trips/logic/domain/:plan.ts(the pure planner),trip.ts,home.ts,ahead.ts,calendar.ts,tripSync.ts,tripBoardOutbox.ts,suggest.ts,dayOrigin.ts,boardCard.ts(a trip card's status badge and meta line),activityLine.ts(the activity feed in words).logic/hooks/useTripsMember.ts: signed out vs. a session still loading.src/features/trips/logic/services/:start.ts,drive.ts,drivePass.ts,reminders.ts,mapsApp.ts,fromTheWeb.ts,notificationActions.ts,calendarMirror.ts,outboxRunner.ts,planCalls.ts.src/features/trips/logic/store/tripsSlice.ts: trip state and actions, composed bysrc/domain/store.ts.src/features/trips/screens/andcomponents/{v2,boards,plan,social}/: every screen and its parts. Trips social in the app:screens/details/TripDetailsScreen.tsx,components/social/(Discover, the comment thread and composer, the trip card;SavedTrips.tsxis no longer used: saved trips are tiles in Mine's grid),logic/api/tripSocial.ts,logic/queries/tripSocial.ts,logic/hooks/useTripSocial.tsanduseTripComments.ts,logic/domain/trip-social-types.ts. The recap:screens/recap/TripRecapScreen.tsx,components/recap/(the share card, the entries, the words),logic/domain/recap.ts,logic/domain/trip-recap-types.ts,logic/api/tripRecap.ts,logic/queries/tripRecap.ts,logic/hooks/useRecapSeen.ts.src/utils/maps.ts,src/utils/tripRoute.ts,src/hooks/useStopGeofences.ts: shared route helpers.src/components/drive-map/,app/navigate/[id].tsx,src/utils/rerouteGate.ts: Navigate in Scout (shared).src/services/location/tracker.ts(setDrivePassHandler) andapp/_layout.tsx(the watchers and the handler).- Backend:
src/trips/(route, reroute, corridor),src/routing/(routers, cache, refusals),src/trip-boards/(boards, plan, reroute, along, alternative, goal, calendar, the flag guardstrips-boards-flag.guard.tsandtrips-phase-flag.guards.ts,planner/,facts/the arrival check and Before you go,recap/the trip recap,trip-board-social-members.controller.tsinvite by @handle),src/trip-social/(the read rule, Discover, details, likes and saves, copy, comments, crew, finished, trip notifications and the two daily jobs),src/people/(people search),src/road-trips/saved-routes.service.ts,src/sync/. - Notifications:
src/features/trips/logic/services/notificationCategories.tsandnotificationActions.ts(the buttons),logic/domain/liveUnlocks.tsandlogic/services/unlockToasts.ts(the unlock toast); the inbox's trip types live inbackend/src/user-notifications/andmobile/src/components/notifications/notificationRoute.ts. - Web:
trips-web/app/{mine,discover,b/[id],b/[id]/plan,b/new,i/[token],t/[id]}/,components/{boards,plan,social}/,lib/{plan,boards,bff-core,trip-map,flags,social,social-api,social-bff,facts}.ts,components/TripMap.tsx.
Configuration and flags
| Setting | Where | Default |
|---|---|---|
trips_boards |
both registries (src/config/feature-flags.ts:99, backend/src/admin/feature-flag-definitions.ts:112) |
off |
web_saved_trips |
both registries; From the web, and the web planner's Save | off |
trips_social |
both registries (src/config/feature-flags.ts:104, backend/src/admin/feature-flag-definitions.ts:119); people search, invite by @handle, public trips, Discover, trip details, likes, saves, copies, comments, Crew, Finished, Report trip and the six trip notification types (with trips_boards). Web: socialOn in trips-web/lib/flags.ts |
off |
trips_facts |
both registries (feature-flags.ts:110, feature-flag-definitions.ts:127); the arrival check, its fixes and Before you go (with trips_boards). Web: factsOn in trips-web/lib/flags.ts |
off |
trips_recap |
both registries (feature-flags.ts:116, feature-flag-definitions.ts:135); the trip recap, its share card and the ways into it (with trips_boards; "Make it public" also needs trips_social). The web reads no recap flag: it has no recap |
off |
| Trip notification switches | Settings → Notifications, six inbox and six push (notifyTrip*, pushTrip*), shown only with trips_social and trips_boards on |
on |
trips_tab |
backend registry only (feature-flag-definitions.ts:49) |
off; nothing reads it in any build |
| Trip reminders | Settings → Notifications (tripRemindersEnabled) |
on |
| Lengths | PLAN_LENGTHS, plan.ts:20 |
3 hr / 5 mi, Half day / 10 mi, Full day / 25 mi (the radius is a preference: with nothing inside it, the budget alone decides, planPool) |
| Detour (Just drive) | DETOUR_OPTIONS, ahead.ts:16 |
15 min (5, 15, 30, 45) |
| Reminder lead | LEAVE_LEAD_MIN, reminders.ts:23 |
10 min |
VALHALLA_URL |
backend env, optional | unset means ORS only; it changes the router for every caller, so it is its own rollout step |
ORS_API_KEY |
backend env | required for any routing |
| Planner ORS budget | PLANNER_ORS_DAILY_CAP |
400 a day (the web planner keeps 800) |
Turning trips_boards on also needs the gateway's read timeout raised to 300 s for /trips and the backend's /api,
or a long plan is cut at the gateway (the pages then fall back to reading the plan back). Analytics: the trip lifecycle
events (trackTripCreated, trackTripStarted, trackTripFinished), the feature events day_trip_started,
road_trip_started, trip_stops_reordered, opened_trip_planner, and the five trip_board_* events (see
analytics-events.md).
Edge cases and known limits
-
The arrival check's limits (trips_facts): the day's clock is its first checked stop's zone, so a day that starts in another zone than that stop is off by the difference. The server counts a record's age from today in UTC, the phone from its own date, so the stale line can differ by a day at midnight. A record that lists several buildings names each one shut at arrival (Zion at 5:25 PM: three), and Keep it keeps the stop as a whole, not one building or one time. The fix aims at the last entry, else 30 min before closing, which is a rule, not the place's advice. The web reads Before you go again after every change to the plan's clock; the app's list (not its checks) is the server's as last read.
-
The keyboard never covers a sheet's field or its button (2026-11-27): RouteSheets ride above it (gorhom's keyboard props plus a
BottomSheetTextInputfor every Scout.Field inside,src/scout/primitives/sheetKeyboard.tsx; RN's own input on web, where gorhom's blur handler crashes), and the board's inline sheets, Where to? and Drop a place use react-native-keyboard-controller on both platforms. Checked by jest wiring tests and a short-viewport web E2E (trips-keyboard.spec.ts); web cannot show a native keyboard, so the lift itself is unverified on iOS and Android. -
No location: the question, Plan my day, Just drive and Collect nearby all say so; the question offers Turn on location. None shows a zero-patch plan.
-
Nothing in reach: with nothing a length's budget reaches (not just nothing inside its radius), Plan my day says "No patches within reach" and "Nothing you still need is close enough for a full day." (or "for a 3 hr", "for the rest of today") and offers no Start; the question marks it unavailable and leads with Just drive; Collect nearby says "Nothing nearby yet" past 150 mi.
-
Past the radius, a plan can be one long drive. From 120 mi out a full day may be a two-hour drive and one stop; that is the plan, not a fault. The radius still wins whenever anything you need is inside it, so in town nothing changed.
-
Route request fails: times stay estimates, with a note, never a stuck skeleton.
-
Notification permission denied: the trip runs; reminders and patch-ahead alerts are not scheduled.
-
A day trip live from before Trips v2 (no
v2block) is adopted the first time Trips opens on it: a Plan my day trip with its stops nearest-next from its own origin and times from now (adoptLegacyTrip,start.ts:82;TripsRoute.tsx:33-40). -
A road trip saved before 2026-11-12 is not shown anywhere. It still records visits, archives if it was the active one and is finished, and syncs (Status).
-
A plan for later shows "Leave at …" and marks no stop "Now" until it starts.
-
The heading is only as good as the last two fixes. Unknown when parked, lagging a sharp turn; patches level with you or behind are never "ahead".
-
Route in Maps carries at most 9 stops after you.
-
Planning today on the calendar never offers a passed start: earlier quick starts read "too late", Leave at opens on the next one ahead (
firstLeaveAfter,calendar.ts:46), and a past start says "That time has passed" with no Save (TripPlanScreen.tsx:457). -
Collecting a planned day's stops before its date ticks them; the day is never archived until it has gone live (
tripsSlice.ts:586). -
Editing a planned day that is or was live keeps what happened: ended stays ended, Stay longer is kept, and a live day keeps its per-stop reminders (
start.ts:118-131). -
Daylight saving: a leave time is set on the wall clock of its day (
startAtFor,calendar.ts:23). -
Routing is global; stop-finding is U.S.-only (
us_states). Trips have no offline map pack; unlock needs a network round trip. -
Boards (flag on only):
- Invite links are multi-use until revoked; the web's ended-invite page still says "revoked or has already been used
up" (
trips-web/app/i/[token]/page.tsx:27) though nothing is ever used up. - "Open in Scout" on the web invite page is a
scout://link, not a universal link: without the app it does nothing. With the web flag off, an app-shared invite link is a 404. - Members are capped at 20, pins at 200, owned trips at 100 (saved web trips included), days at 30.
- A board created by Save to a trip whose pin never lands (the app dies between the calls) is left empty.
/trip-board-place/[id]has no role gate of its own; the server refuses a viewer's pin.- A place with no road reads as an estimate until its stops or start change; a pair both routers refused stays refused for 7 days. Over the planner's ORS budget a real road can read as "no road" until the next day.
routeRefusedcan be wrong during an ORS outage (Scout's router refusing while ORS is down counts as refused); the Route tab's Try again is the way out.- A big cold plan can hit the 240 s budget; finished routes stay cached, so a retry gets further. Measured 2026-11-07: 30 pins 23 s, 100 pins 40 s, with some legs from ORS where Scout's router had no path.
- Fill doesn't re-split, so a filled day drives longer than its target. A day's order comes from the pins though its
driving runs to park entries, so it can be slightly off the best road order. A park's entry is the first one this
road reaches, which may not be its gate. A leg inside a park still drives to the pin. A
replaceloses each stop'satMinanddwellMin. - A patch hidden from the catalogue drops off its day at once, but the next day's stored route still starts from it until that day is rerouted.
- A city at the end of a long day still fills
worthStopping(the 3-per-end cap covers only what the dial would refuse). A better road is on offer for about a fifth of days, and city density can flatter it (Boston to Salem offers +106 min for 6, three of them inside town). A big park can't be a waypoint unless the road goes in or near its pin.viais the router's own name for a road, so two spellings read as two roads. patchCountis a stored column that can drift from the memberships the goal counts.- A timed-out spatial read leaves things out of
alongsilently for the viewer. - The web plan page works online only (no outbox) and never names who changed a day on a stale order.
- Invite links are multi-use until revoked; the web's ended-invite page still says "revoked or has already been used
up" (
What this feature does NOT do
- Nothing built in Trips Next phases 3 to 6 is available to any user. Public trips, Discover, likes, saves,
copies, trip comments, the Crew tab, Finished counts, Report trip, invite by @handle, people search and the six trip
notifications (
trips_social); the arrival check and Before you go (trips_facts); the trip recap and its share card (trips_recap); and the notification buttons and live unlock toast (trips_boards) are all behind flags that are off in both registries, and every one of them also needstrips_boards, which is off. No marketing copy, store listing or/contextline may describe any of them. - Not built at all, whatever the flags: the iOS Live Activity and the Android ongoing notification (spec §6.7, need
a native build); past trips made from the camera roll (the rest of §6.8); Discover trips seeded from Scout's own
curated trips (
CuratedTrip, the spec's@scouttrips:trip-discover.service.ts:37says they are not built, so Discover lists members' trips only); a universal link for the web invite page's Open in Scout (it is ascout://link that does nothing without the app); guest boards; photo pins; an offline map; a search box on Discover. - The trip recap (
trips_recap, off) is not available, and even with it on: it counts only patches on the trip's own pins (a patch you passed but never pinned, a state crossed, is not "earned"); a trip with no dates has no window and earns nothing; it is worked out on every read, never stored or frozen, so a patch removed from your collection or the catalogue later drops out of an old recap; the "ready" card is per device and per trip, offered for the newest trip only, and knows only about board days started on this phone; there is no recap notification, no recap for a Plan my day, Just drive or Collect nearby trip that is not a board day, no recap on the web, no video or reel, and the share card is an image only (no link to the trip). Past trips from the camera roll (the rest of §6.8) are not built. - Trip boards are not available. They are built and behind
trips_boards, which is off in both registries. With it off the app's board screens redirect to/trips, the web's board pages and BFFs are 404s, and the backend's board routes answer like routes that don't exist. There is no admin or per-user preview. No marketing copy, store listing or/contextline may describe boards, sharing a trip with friends, invite links, multi-day plans, Where to?, Along the day, Two ways, Start day N or Save to a trip. - With
trips_boardson, "What kind of trip?" has no door in the app. The board grid that replaces it at/tripslinks only to Where to?, which offers Plan my day and Just drive; nothing links to the question at/trips-question, so Collect nearby and the question's Calendar pill are reachable only by that address (the Trip Calendar also from an "On this phone" row once a planned day exists). With the flag off, as it ships, the question is/tripsitself and nothing changes. - The legacy Day Trip and Road Trip screens are gone. The swipe deck, the road planner, its stop list, My Trips,
the trip preview and the legacy trip map were deleted on 2026-11-12. Old links (
/trip-planner,/road-planner,/trip-stops,/my-trips) redirect to Plan my day or Trips. - You cannot create a road trip anymore, and there is no "drive to X and show what is on the way" in the app. Just drive follows your heading only. A road trip saved on a device before the deletion is kept but not shown.
- No curated or Scout-authored trips. The backend still serves them; the app reads none.
- Navigate in Scout has no address destination. It drives to one patch only, saves nothing, does not replace the maps-app hand-off for trips, and needs a location fix.
- No in-app turn-by-turn on Trips. Plan my day, Just drive and Collect nearby hand directions to Google Maps or Apple Maps. The in-app driving map and maneuver banner serve Navigate in Scout only.
- Trip notifications have no buttons with
trips_boardsoff (prod). A tap opens the trip in the app. With it on, the patch-ahead and leave-by carry the buttons above; they cannot Stay longer, re-plan the day, or reach a maps app already navigating, and their delivery on a device is unverified. - The patch-ahead alert does not check hours. On a planned day it says when you would reach the next stop, from the plan's times; it never says a place will be closed.
- It cannot add a stop to navigation already running in another app. "Save and add a stop" re-opens directions from you through your saved stops; Scout cannot see whether a maps app is open.
- No prices, opening hours, open/closed status, tickets, weather or traffic in the shipped Trips. A stop's time is a
default by type of place, not a promise about the place. Board plans (behind
trips_boards, off) show a stop's checked hours, car price, NPS alert count and what to book, and a Park entry total, only where the Plan tab has a published record (today the 64 national parks); nothing for any other stop, and never weather or traffic. The warning when a day reaches a stop outside its hours, and the "Before you go" list, exist only withtrips_factson too, which is off. - No multi-day trips in what ships. The longest plan is a full day; a weekend on the Trip Calendar is several planned days, each its own plan.
- The Trip Calendar does not export to Apple or Google Calendar and reads nothing from them. Planned days live only in Scout, on this phone.
- No morning-of notification for a planned day. Its one reminder is the 10-minute head-out.
- A planned day starts only from where you are or a City Challenge city. No address search.
- Just drive is not on the calendar.
- A planned day never replaces a live trip and is never re-planned for you.
- From the web is off (
web_saved_trips), and even on it brings no markers into the app and cannot edit, rename or delete a web-saved trip. Scout does not plan or follow the web route. - No server push for trips in what ships. With the flags as they are, every trip notification is local, scheduled
on the phone, and only for a trip the user started or a day they planned. The six server-side trip types (invites,
stop edits, comments, mentions, copies, "your trip starts tomorrow") are written, and pushed, only with
trips_socialandtrips_boardson; both are off. Even on, there is no notification for a like, a save, a finish, a comment like, someone joining or leaving, a role change, a recap or an arrival-check conflict, and "starts tomorrow" goes out at 17:00 Chicago time whatever the member's zone. The buttons are on the local notifications only, never on a push. - Trip details do not sync between devices. The
v2details and a trip's progress never leave the phone; only the flat trip and its stops are pushed. - No food, restaurant or fuel stops. The catalog has no such patches.
- It does not unlock anything by itself. Collecting still happens through the normal unlock (polygon containment); Trips records it against the live trip.
- Boards with only
trips_boardson (andtrips_socialoff, as it ships) have no public trips (publicis refused 400not_yet, shown "Coming soon"), no Discover, no likes, saves, copies or comments, no invite by @handle ("Coming soon"; people search does not exist), no Report trip, no trip notifications, and the Crew tab is disabled ("coming soon" to a screen reader). That is only becausetrips_socialis off: all of it is built behind it. Whatever the flags: no photo pins, no guest boards, no offline map, no place search when dropping a pin, no lodging. The activity feed on Plan together shows only the latest 30 changes (no older pages) and sends no notification. Start day, reminders and the calendar are app-only. Start day N copies the day at the tap and reports nothing back to the board. Old phone trips are not migrated to boards. A "better road" is not a scenic one, never uses ORS, and Take it stores no road. "On the way" is not a promise of an unlock. A day's miles stop at the park's edge. - The crew, invites by @handle and invitations (
trips_social), even with it on: people search finds a member only by the START of their handle (3+ letters, at most 8; never a display name, email or contacts), so someone whose handle was derived from their email is found by that. There is no invite by email or phone, and an invitation never expires (it stays until accepted, declined, cancelled or pruned by a block). An invited person is not on the trip: they can't read it, aren't in the Crew tab and don't count in "held of total"; they only see the invitation. The Crew tab counts the trip's patch pins only (not places or notes), shows no member's own collection beyond those patches, and ranks only by patches held on the trip ("Leads" marks one member strictly ahead; no score, streak or prize). The finish line names only collections every joined member completes with the trip's planned stops. Report trip is for members who aren't the owner; the owner can't report their own trip. - Checked facts (
trips_facts), even with it on: the check reads only published visit-info records and live NPS alert counts; a place with no record gets no hours, ever ("Hours not checked yet"). It never says a patch won't unlock, and it never decides open or closed from an NPS alert. It does not watch live hours or re-check a record, sends no notification about a conflict, and does not move anything by itself: every fix is a tap. Keep it is per stop, not per building or time. Before you go names no pass price (none is recorded) and is computed by the server only; the app shows the list as last read (its arrival checks are its own). A reservation is never booked for you: Book ahead links to the booking page. Ticks are the trip's, shared by its members, and never public. - Discover and Trip details in the app (
trips_social), even with it on: Discover has no search box and no map; a filter narrows rather than reorders (Near you is 150 miles from the last fix and isn't offered without one; Discover opens on it when there is a fix, and on All when nothing is near); it never lists your own trips (they are in Mine) or a blocked or suspended author's, and signed out the boards home shows the sign-in prompt, not Discover. Trip details shows no members, places, notes or checklist, only the author, the patches and the days; its hero is the first stop's catalog photo, not a cover the author chose. Trip comments take no photos, can't be edited, and a?comment=link highlights the comment without scrolling to it. Copy takes the patches and days only and has no undo from this screen (delete the copy from its board). Saved shows only trips you saved, not copies or likes; there is no "Liked" list. Trip details' Share sends only the trip's web link through the phone's share sheet: no image or card. Discover cards show a trip's saves, not its likes.
Tests that cover it
-
The trip recap (trips_recap, 2026-11-27): backend
src/trip-boards/__tests__/trip-recap.db.spec.ts(a stranger and an invitee 404; badtoday/tz; no days; no dates never end and earn nothing; nothing collected, or collected before/after; an unrouted day makes miles null, paired with the sum; a hidden patch neither earned nor a stop; another member's collecting; ended the day after the last day, not on it, and with notoday; the Chicago window at both ends and across a clock change; every source counts; a pin on no day; collections completed on the trip vs before, after, short or bought; states in road order, none unrouted, and a timeout as null and counted;canMakePubliceach way; all 26 seen failing against a stub first),api-tests/trips-recap-gate.api.spec.ts(each flag off: the route absent signed in or not, falsified by dropping the guard; on: the full answer over HTTP, bad input, a stranger 404, signed out 401). App:__tests__/logic/recap.test.ts(ended, quiet, ended on the last day; mutations seen failing), screenstrip-recap.test.tsx(flag off redirects, offline, error, nothing earned, no dates, unknown miles and states, the numbers, "So far" paired, the card's invite code and share text and analytics surface, no code paired, Make it public queued and its four paired refusals) andtrip-recap-entries.test.tsx(the board's entry: flag off, not yet, ended; the ready card: flag off, not the last day, still busy, last day ended, quiet, seen, Not now), the DEV mockmocks/trip-recap.tsx, and RN web E2Ee2e-rn-web/specs/flows/trips/trips-recap.spec.ts(a trip ten days ago: the board's entry, the recap's numbers against the server's, Share minting and printing the code, Make it public held by the server and kept on reload; a trip ahead: no entry, "So far", nothing earned). -
Checked facts (trips_facts, 2026-11-27): backend
src/trip-boards/facts/arrival-check.spec.ts(hand assertions: no record, stale, another zone and its paired own-clock case, a whole closure, a closed weekday / exception / season, early, late and after the last entry, closing, a building shut with the keep reason, view only, reservation, no date, no time, past midnight; every fix: leave earlier via the stop before, via the start, leave later, keep, move only to open days, no fix; then the whole fixture),facts/before-you-go.spec.ts,stop-facts.spec.ts(theuncheckedlist),__tests__/trip-facts.db.spec.ts(a stranger 404, a viewer reads and can't tick, bad and gone keys, one row and one activity per real tick, keep and untick, no ticks on a public read; the editor check falsified),__tests__/plan-edit-stop.db.spec.ts,api-tests/trips-facts-gate.api.spec.ts(each flag off: every facts route absent; on: a viewer, then an editor, over HTTP, and the stop edit). App:__tests__/logic/arrivalParity.test.ts(the shared fixture),factsOutbox.test.ts(updateStop and a start time re-time the cached day, ticks patch the facts cache, newest tick wins, the runner sends them,item_gonedrops quietly), screenstrip-board-route-arrival.test.tsx(flag off: the hours chip and no entry; no record; stale; no fix; a viewer; Start the day later, Leave Sunrise point earlier, Keep it and Undo, Move it, each queued and the check following offline; the entry; the unchecked fees by name, paired) andtrip-before-you-go.test.tsx(flag off redirects, offline, error, empty, the groups, stale, an editor's switch queued, a viewer's "Ticked by"). The offline re-time was falsified (2 tests failed with it removed). Web:test/facts.test.ts,plan-facts-calls.test.ts,plan-arrival.test.ts(the viewer branch falsified),flags.test.ts, andbanned-claims.test.ts(no hours claim is worded in trips-web source; an unchecked stop prints "Hours not checked yet" and no time). E2E:e2e-rn-web/specs/flows/trips/trips-facts.spec.ts(Great Sand Dunes at an evening hour: keep and undo, leave earlier, Before you go's reservation ticked, each held by the server and after a reload; run green 2026-11-27 with--flag trips_boards=on --flag trips_facts=on --valhalla-url http://100.77.15.20:8002: without a router the backend can't plan the trip) andweb-e2e/specs/flows/facts.spec.ts(the same on the web planner; its first run found the web's Book ahead checkbox springing back until the server answered, now shown at once, with a unit test that failed first; green after the fix). -
Notification buttons and unlocks while driving (Trips Next phase 5, JS-only, 2026-11-27): logic
notificationCategories.test.ts(flag on registers both categories with the background/foreground split, once; off deletes them; a failed native call retried; web nothing;tripCategoryForoff → none),notificationActions.test.ts(Add on a drive and on a planned day among the stops ahead; Add and Not today on an ended trip or another trip do nothing; Not today twice writes once; Open in Maps to the patch, to the leave-by's next stop, refused → the trip opens, an old reminder with nonextId→ the trip opens; flag off, every button a plain tap),reminders.test.ts(nextIdon every reminder, dismissed never offered,aheadImpactwith estimates and with measured legs, nothing after the last stop, the categories on scheduled content only with the flag on),drivePass.test.ts(dismissed never announced; a live planned day announced with its impact, flag on; quiet with it off),liveUnlocks.test.ts(stop, along the way, by hand / already held not along the way, ticked before going live not news, no live trip nothing, once per patch, the subscription hearing a background unlock at once, the copy by type),tripsPersist.test.ts;src/services/__tests__/flagSnapshot.test.ts(isFlagOnNow); hooks__tests__/hooks/tripNotificationButtons.test.tsx(registered only once the flags are known, removed when off, a press warm and cold, the dedupe); screens__tests__/screens/trip-drive-unlock-toast.test.tsx(the state-line toast, gone after 4 s and never again; along the way; a background unlock shown on arrival, paired with an announced one; held back while covered; no live trip none; flag off none; turned on mid-drive, what came while it was off stays quiet, paired with flags not yet known silencing nothing; Not today gone from Next and Stops, paired). Each new test was seen failing first: the modules missing, or the change mechanically reverted (the drive screen's dismissal and toast mount, the toast's flag and focus gates, the slice's recording and its two rules, the hook's wiring).e2e-rn-web/specs/flows/trips/trips-live-unlock.spec.tsstarts Just drive from Where to?'s "Or, no destination" and drives into South Dakota and The Mammoth Site on that live drive (local,--flag trips_boards=on); written, not yet run. Web has no local notifications, so no E2E presses a button, and device delivery of the actions is unverified.
A trip started from the flag-on question shows (2026-11-12): __tests__/screens/trips-question.test.tsx pairs both
branches (trips_boards on at /trips-question: Just drive calls dismissTo('/trips'); off at /trips: nothing
navigates). It was seen failing without showLiveTrip with Number of calls: 0. trip-plan.test.tsx and trip-collect.test.tsx
pair Start and Go the same way: flag on, dismissTo('/trips'); flag off, opened from another screen, back() and no
dismissTo (seen failing with Received number of calls: 0 before the flag-off fallback, 2026-11-16). e2e-rn-web/specs/flows/trips/trips.spec.ts
runs today's Trips journeys under either flag: with trips_boards on, openTrips opens /trips-question by its address
(the grid has had no door to it since 2026-11-29) and "back at the start of Trips" is the board grid. Before this, a
flag-on run failed 11 of 12, and 7 of those failures
were this bug.
- Invite by @handle, public trips, trip reports (trips_social backend, 2026-11-27, each seen failing first):
backend/src/trip-boards/__tests__/trip-board-handle-invites.db.spec.ts(every refusal, the seat count, re-invite after removal, the invitee still 404 until accepting, list/accept/decline, owner cancel recording no removal, a block either way pruning the invite, accept re-checking the block; the block checks, the cancel rule and the seat count each falsified);trip-board-public-visibility.db.spec.ts(flag off or missingnot_yet, onpublic+published_atmoving only on a fresh publish, 409removed, the public read hiding a removed trip,blocked_termpublishing nothing);backend/src/moderation/__tests__/trip-reports.db.spec.ts(reportable only when visible, 404 for a non-uuid, queue snippet, removal =removed_at, a trip comment's "On trip:" snippet and removal keeping the anchor post);backend/api-tests/trips-social-people-invites-gate.api.spec.ts(the routes absent with either flag off, signed in or not).trips-phase-flag.guards.spec.tsbuilds each phase guard through Nest's injector: the base class had no decorator, soprismawas undefined and every phase route answered 500 in the real app. - Discover, Saved and Trip details in the app (trips_social, 2026-11-27; written with the code, then each branch
falsified by reverting it and watching the test fail):
__tests__/screens/trip-details.test.tsx(36: either flag off redirects and asks nothing, flags unread waits; 404 "This trip isn't available." vs a 5xx Retry; signed out reads but Like, Save, Copy, Report and a comment go to sign-in returning to/trip-details/<id>with the draft kept; like moves and a refused like goes back; save then unsave; copy at the cap vs another failure vs made (opens the copy); member "Open the board" vs not; owner no ⋯ vs ⋯ reportingtrip_board; "At <stop>", Author and Finished it vs none; the?comment=highlight; a comment sendingstopPatchIdvs none; @-mentions through people search sending the id; an absent route is Retry, not gone; the DEV mock's composer offers the thread and never searches the server);__tests__/screens/trips-social-home.test.tsx(15: flag off no Discover or saved trips and nothing asked; with a fix Near you leads, asked from the rounded fix, and a card shows its art, title, saves and one meta line; nothing near falls back to All by itself; All; no fix no Near you; a filter chip; a card opens details; empty; error with Retry; the next page by cursor vs the last page; saved trips in Mine's grid with a Saved badge, opening details; nothing saved, only your trips and the New trip tile; saved trips failing with Retry; saved trips only in Mine);src/lib/__tests__/auth-return-to.test.ts(a trip-details uuid allowed, anything else refused; seen failing first); the DEV mockscout://dev-screen-mock/trip-detailsinscreen-tests/screen-mocks.test.tsx;e2e-rn-web/specs/flows/trips/trips-social.spec.ts(B finds A's public trip on Discover, likes, saves, comments at a stop, a reload keeps them and the server holds them, Saved lists it, Copy opens B's credited copy; unlike and unsave; a private trip's link is not available; a signed-out link lands back on the trip after sign-in; a blocked author's trip leaves Discover and its page). - The radius is a preference (2026-11-22, each seen failing first):
trip.test.tsplanPool(real rows near Effingham, IL: inside the radius only what's inside, nothing inside → what the day reaches nearest first, a collected one inside counts as nothing, a shorter day reaches less far, a Challenge's own patches whatever the distance,planStopspast the radius;reachMinever under any leglegFortimes);home.test.ts(Valentine with Carhenge → "1 patch from now" and its pin; Valentine with only St. Louis → "Nothing close enough for a day", Just drive leads; 8 PM → "Nothing fits the rest of today");__tests__/screens/trip-plan.test.tsx(40 mi west of Forest Park plans past the radius, falsified by putting the wall back; Valentine's copy;?length=3hopens on 3 hr with fewer stops than a full day, an unknown length on a full day;?start=tomorrowleaves tomorrow at 9 AM, paired with now). - Logic (
src/features/trips/__tests__/logic/, the logic jest project): the planner (plan.test.ts), plan from a saved trip and live state (trip.test.ts), the question (home.test.ts), Just drive (ahead.test.ts,drive.test.ts,drivePass.test.ts,offRoadParity.test.ts), reminders (reminders.test.ts), notification taps and buttons (notificationActions.test.ts,notificationCategories.test.ts,useTripNotificationActions.test.tsx), unlocks while live (liveUnlocks.test.ts), the calendar (calendar.test.ts), From the web (fromTheWeb.test.ts,savedRoutes.test.ts), the store (v2Store.test.ts: a drive never auto-archives;dayTrips.test.ts,dayTrip.test.ts,roadArchive.test.ts,tripVisits.test.ts,tripStateMigration.test.ts,tripsPersist.test.ts), achievement events (tripAchievementEvents.test.ts: Just drive recordsroad_trip_started, a reorder or move recordstrip_stops_reordered), analytics (tripCreatedAnalytics.test.ts,tripLifecycleAnalytics.test.ts), sync (tripSync.test.ts), and boards: the outbox and its failure table (tripBoardOutbox.test.ts,tripBoardStore.test.ts,outboxRunner.test.ts,tripPlanOutbox*.test.ts), plan calls and queries (tripPlanApi.test.ts,tripPlanQueries.test.ts,planClocks.test.ts), Save to a trip's order (suggest.test.ts), the flag gate (flagsGate.test.ts), the calendar mirror (calendarMirror.test.ts,calendarMirror.zone.test.tsin Honolulu,useTripCalendar.test.tsx) and Start day N (startBoardDay.test.ts). - Hooks and screens (
src/features/trips/__tests__/hooks/,__tests__/screens/, registered inscreen-tests/screenTestRegistry.ts):trips-v2.test.tsx(the question, live trip, Stay longer, no location, the Calendar pill, today's plan going live, From the web on and off),trips-question.test.tsx,trip-plan.test.tsx(incl. date mode),trip-drive.test.tsx,trip-collect.test.tsx,trip-calendar.test.tsx,trip-day.test.tsx,trip-legacy-redirects.test.tsx(the four old links),appBoot.test.tsx,trips-no-grid.test.tsx,trip-map-pins.test.tsx, and for boardstrips-boards-gate.test.tsx(each of the nine routes, off and on),trips-boards-home.test.tsx(each card's status badge and meta line, the New trip tile, a signed-in cold start loading rather than asking to sign in) with__tests__/logic/boardCard.test.ts(the badge's date rules), the Plan together screen'strip-board-members.test.tsx(Can edit / Can view chips, the one Copy invite link action, the activity feed and its empty and failed states),trip-board*.test.tsx,trip-invite.test.tsx,save-to-trip.test.tsx(the best fit's "Suggested" line, the other rows' status and company),trip-where-to.test.tsx,trip-plan-board.test.tsx,trip-day-along*.test.tsx,trip-day-route.test.tsx,trip-day-alternative-*.test.tsx,trip-day-gates.test.tsx;trip-board-route-facts.test.tsx(arrival times, minutes there and the overnight time, the start-time hint, checked facts and the Park entry card, each paired with its opposite) with__tests__/logic/routeFacts.test.ts(their words). Withtrips_social(each paired with the flag off):trip-board-crew.test.tsx(the Crew tab: off, disabled and labelled "Crew, coming soon"; on, the heading, members most patches first with the patches each holds and Leads, the missing-patches line or no finish line, faded holders, no patches, a 404 and a 5xx with Retry; Report trip for a non-owner, none with the flag off),trip-board-invitation.test.tsx(a board opened by someone invited: the invitation or "no longer on this trip", Accept, Decline, trip_full, invite_gone),trip-board-members-social.test.tsx(Public and what it means under the switch, a removed trip refused it, search under 3 letters, 429, no match, Invite and its user_gone / already_member / trip_full, Invited with Cancel) andtrips-boards-invitations.test.tsx(the home's Invitations at the top of Shared with you and counted in its tab, paired with no count when there are none; not on Mine; never read with the flag off; Accept opens the trip, Decline, a full trip, a failed decline); the outbox'sremovedtoast is__tests__/logic/outboxRunner.test.ts. - Elsewhere in mobile:
src/utils/__tests__/maps.test.ts(route URLs),screen-tests/notification-settings.test.tsx(the switch),src/components/navigation/__tests__/drawerSections.test.ts(one Trips row),screen-tests/navigate-id.test.tsxandsrc/components/drive-map/__tests__/(Navigate),src/providers/__tests__/SyncProvider.test.tsx(the outbox and the flag),src/dev/__tests__/deepLinkRoutes.test.ts,screen-tests/screen-mocks.test.tsx(the module's DEV mocks insrc/features/trips/mocks/). - RN web E2E (
e2e-rn-web/specs/flows/trips/):trips.spec.ts(the shipped Trips),trips-boards.spec.ts(every board screen against a real backend, with--flag trips_boards=on) andtrips-route-facts.spec.ts(a trip to Rocky Mountain: its checked facts and the Park entry card, then a start time by hand brings each stop's arrival and minutes there, read against the plan the server holds), andtrips-crew-members.spec.ts(--flag trips_boards=on --flag trips_social=on: the owner invites by @handle and makes the trip Public, the invitee accepts from Trips and sees both in the Crew tab, a declined invitation stays gone; each checked after a reload and against the server). Run one withcd e2e-rn-web && npm run e2e:run -- --spec flows/trips.lib/route-table.tsopens every trips route, boards keyed on the flag. - Backend:
src/routing/*.spec.ts(legs stored and healed, fallback, refusals, cache keys, steps),src/trips/*.spec.ts(trip-route,reroute,corridor-sql,corridor-grouping),src/trips/__tests__/corridor-sql.db.spec.ts(the pieced corridor against the plain query, at the radius edge and at 64° and 70°N),src/sync/__tests__/sync.trips.db.spec.ts(a pushed trip reachestrips/trip_patches), and for boardssrc/trip-boards/__tests__/(service, members, plan, plan-edit, along, alternative, goal, calendar, place search, migration, saved routes, schema, the flag guard),api-tests/trip-boards-flag-gate.api.spec.tsandapi-tests/trip-plan-throttle.api.spec.ts.trip-plan.http.db.spec.tspushes each per-member quota (plan, places, along, alternative) through real HTTP, against one server bound to 127.0.0.1 (test-support/loopback-server.ts: left to supertest, each request listened on a fresh wildcard port, and macOS sometimes handed it a port another slot's api-tier app held on 127.0.0.1, whose 401 failed a quota loop) and ontest-support/clocked-throttler-storage.ts, a throttle store on a clock only the test moves (Nest's own storage lapses each hit on a wall-clock timer). - Web:
trips-webnpm test(plan words and calls, BFFs off and on, maps, layout, flags) andtest/e2e/;web-e2e/drives the board pages in a real browser. - No Maestro flow covers Trips or boards.
Open questions
- Background location cadence while driving decides how early a patch-ahead notification can fire. Not measured on a real drive.
- Whether a tap on a notification that arrived while the app was killed reaches
getLastNotificationResponseon every iOS version has not been verified on a device. - No automated test drives the web's GL map in a real browser with WebGL; it was checked by hand on 2026-11-04.
- Whether
trips_boardswill be flipped for the app and the web at the same time (an app-shared invite link 404s on the web while the web flag is off). - Whether
src/components/drive-map/(Navigate in Scout) becomes its own module.