feat: trip persistence — save / list / view saved trips #15

Merged
charles merged 1 commit from feat/trip-persistence into main 2026-06-17 14:32:50 +00:00
Owner

Built trips now persist and are listable per account (FR-PRES-14/17).

Changes

  • service: TripStore port (save/get/list, owner-scoped) + TripSummary; mem (MemTrips) + Postgres (trips table, migration 0002, JSONB) impls. Trips capability gains save_trip/list_trips/get_trip (gated). AppContext gains trips_store.
  • api: build → save_trip → redirect /trips/:id; GET /trips (list), GET /trips/:id (saved trip, owner-scoped).

Verification

  • just qa green. Mem test: owner-scoping (list/get isolation, anon gated). Real Postgres integration: save→get→list, cross-owner denied, status→Saved. Live: build → /trips/1 → list shows "Voyage #1 — 2 étapes · ≈ 500 €".

Traces: FR-PRES-14/17, FR-ACC-09 · tech-spec 02.

Built trips now **persist** and are listable per account (FR-PRES-14/17). ## Changes - **service**: `TripStore` port (save/get/list, **owner-scoped**) + `TripSummary`; `mem` (`MemTrips`) + **Postgres** (trips table, migration 0002, JSONB) impls. `Trips` capability gains `save_trip`/`list_trips`/`get_trip` (gated). `AppContext` gains `trips_store`. - **api**: build → `save_trip` → redirect `/trips/:id`; `GET /trips` (list), `GET /trips/:id` (saved trip, owner-scoped). ## Verification - `just qa` green. Mem test: owner-scoping (list/get isolation, anon gated). **Real Postgres** integration: save→get→list, cross-owner denied, status→Saved. Live: build → `/trips/1` → list shows "Voyage #1 — 2 étapes · ≈ 500 €". Traces: FR-PRES-14/17, FR-ACC-09 · tech-spec 02.
feat(service,api): trip persistence — save / list / view saved trips
All checks were successful
qa / qa-1 (push) Successful in 18s
qa / qa (push) Successful in 0s
qa / qa-1 (pull_request) Successful in 4m27s
qa / qa (pull_request) Successful in 0s
f9aabb50e9
- service: TripStore port (save/get/list, owner-scoped) + TripSummary; mem
  (MemTrips) + Postgres (trips table, migration 0002, JSONB) impls. Trips
  capability gains save_trip/list_trips/get_trip (all gated, owner-scoped).
  AppContext gains trips_store.
- api: build now persists the trip (build_trip → save_trip) and redirects to
  /trips/:id; GET /trips lists the account's trips; GET /trips/:id renders a
  saved trip (owner-scoped). trip_view links back to /trips.

Tests: mem owner-scoping (list/get isolation, anon gated) + real-Postgres
integration (save→get→list, cross-owner denied, status→Saved). Verified live:
build → /trips/1 → list shows "Voyage #1 — 2 étapes · ≈ 500 €". just qa green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/geneatrip!15
No description provided.