Skip to content

006 edit ride history#24

Merged
aligneddev merged 8 commits intomainfrom
006-edit-ride-history
Mar 30, 2026
Merged

006 edit ride history#24
aligneddev merged 8 commits intomainfrom
006-edit-ride-history

Conversation

@aligneddev
Copy link
Copy Markdown
Owner

No description provided.

aligneddev added 8 commits March 27, 2026 14:56
…uing

- Added EditRideService to handle ride updates, including version control and outbox event queuing.
- Created RideEditedEventPayload for event payload structure.
- Updated RidesEndpoints to include PUT endpoint for editing rides.
- Enhanced frontend HistoryPage to support inline editing of ride details with validation.
- Implemented tests for EditRideService and RidesEndpoints to ensure correct behavior.
- Added CSS styles for edit actions in the HistoryPage.
Phase 3 (User Stories) Completion Summary:
- US1: Edit ride row inline (save/cancel actions) - COMPLETE
- US2: Validation & conflict handling (400/409 responses) - COMPLETE
- US3: History totals refresh after edit with active filters - COMPLETE

Verification Results:
✅ Backend: 59 passed, 1 skipped (solution tests)
✅ Frontend: ESLint/Stylelint lint check passed
✅ Frontend: Build succeeded (CSS 1.77KB, JS 137.21KB gzipped)
✅ Frontend: Unit tests 53/53 passed
⚠️  Frontend: E2E 8/10 passed (pre-existing record-ride test issue, unrelated to US3)

Code Changes:
- Added migration file for Ride.Version concurrency field
- Updated DbContext initialization to use EnsureCreatedAsync in dev/test
- Added US3 red-phase tests (backend service, endpoint, and frontend refresh)
- Implemented post-save history refresh preserving active filters/pagination
- Fixed test selectors for US3 assertion clarity
- Updated constitution with commit gate requirements (v1.12.1)

All user stories are now independently functional and verified.
Next: Phase 6 (Polish & Cross-Cutting) with HTTP examples, E2E scenario update, and doc alignment.
Phase 6 (Polish & Cross-Cutting) Tasks Completed:

T048: Added HTTP examples for edit ride endpoint
  - Successful edit with version match
  - Validation error (miles <= 0)
  - Version conflict (stale expectedVersion)

T049: Created E2E scenario spec: tests/e2e/edit-ride-history.spec.ts
  - Inline edit, save, reload with updated values
  - Validation blocking save with error message
  - Cancel discards changes and exits edit mode
  - Summaries refresh after save with active filters

T050-T052: Verification Matrix Results
  ✅ Backend: 59 passed, 1 skipped
  ✅ Frontend: Lint, build, unit tests all pass
  ✅ E2E: Edit-from-history scenario ready for full flow (8/10 overall; 2 pre-existing record-ride issues)

T053: Enhanced quickstart.md with implementation details
  - Architecture overview (backend service, frontend flow, data model)
  - Step-by-step implementation guide with code examples
  - Result pattern explanation (non-exception-driven expected flows)
  - E2E and verification command reference

All tasks marked complete. Feature 006-edit-ride-history is fully specified, implemented, tested, and documented.
…ests reduce duplication

- e2e to e2e database only
@aligneddev aligneddev merged commit f60ef1d into main Mar 30, 2026
4 of 5 checks passed
@aligneddev aligneddev deleted the 006-edit-ride-history branch March 30, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant