Repository navigation
feat(trip): edit trip title and notes - #39
Conversation
6f4d6ec to
6f5ab73
Compare
|
I've rebased the trip-editing work onto PR #38's API adapter branch so we can continue integration without waiting for #38 to merge. The original trip-editing commit (6f4d6ec) has been replayed as 6f5ab73. During integration, I resolved the overlapping mock API changes and updated The PR now targets Next, I'll enable live PATCH against backend #46 and add persistent integration tests. The existing mock editing tests will remain in place. Once PR #38 merges, we can retarget this PR to |
|
I noticed that I suggest trimming the notes before checking their length, so the mock and persistent implementations behave consistently. |
|
There's a small difference between the frontend and backend character limits. The Go backend counts Unicode code points, while JavaScript I suggest aligning the frontend validation with the backend's counting rules. Since this also affects trip creation, we could address it in a separate issue #42 rather than expanding the scope of this PR. |
kctong529
left a comment
There was a problem hiding this comment.
I've integrated this branch with the API adapters from #38 and enabled persistent trip updates through the backend PATCH endpoint.
The live integration tests now cover partial updates, notes clearing, validation, authentication, and cross-account ownership isolation. All 7 integration tests passed, alongside 263 acceptance tests (2 skipped), 2 boundary tests, type checks, and the production build.
I also verified editing through the browser: the updated title and notes persisted after signing out, signing back in, and restarting the backend.
The backend changes will be submitted separately under backend #46.
Before merging this PR, please merge #38 first, then change this PR's base branch from feat/api-adapters to main. After retargeting, please verify that the diff contains only the trip-editing changes and that all checks still pass.
We should also ensure that backend #46 is merged and deployed before releasing this frontend change, since the editing workflow depends on the new PATCH endpoint.
- Enable authenticated PATCH requests for trip updates in live mode - Reuse the existing HTTP client and trip response adapter - Preserve mock editing when backend integration is disabled
- Cover partial title and notes updates against the live backend - Verify notes clearing, response adaptation, and persisted values - Test invalid PATCH requests without modifying stored records - Check authentication and nonexistent-trip error responses - Verify bidirectional PATCH isolation between Firebase users
0749727 to
eee618c
Compare
Closes #23 . Saving runs on the mock until PATCH /api/trips/{id} lands with backend #46 (@kctong529 's next backend PR); switching over means adding updateTrip to LIVE in client.ts.
Suggested new body:
Summary
Implement trip title and private-notes editing, including authenticated persistence through the backend API.
Closes #23 when the remaining integration acceptance criteria are satisfied.
Implementation
updateTripwith authenticatedPATCH /api/trips/{id}when the persistent API is configured.Backend integration
Live editing has been verified against the PostgreSQL-backed, owner-authorized PATCH endpoint submitted in backend PR #48. Tests cover persistence, input validation, and cross-account ownership isolation.
Persistent backend availability is required before releasing this functionality. Unicode code-point length alignment is tracked separately in frontend #42.
Dependencies and merge order
This PR builds on frontend #38. Merge #38 first, then retarget this PR to
mainand verify the final diff and CI checks.Sharing and photo ordering are separate follow-up PRs (#37 and #40).