feat: Pending vehicle association resolution UI (#149) #160
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Relates to #149
Scope
Frontend UI for resolving pending vehicle associations when multi-vehicle users submit receipts via email.
API Endpoints (Backend)
GET /api/email-ingestion/pending: List pending vehicle associations for authenticated userPOST /api/email-ingestion/pending/:id/resolve: Resolve by selecting a vehicle (body: { vehicleId })DELETE /api/email-ingestion/pending/:id: Dismiss/discard a pending associationFrontend Components
Mobile + Desktop
Files
backend/src/features/email-ingestion/api/email-ingestion.routes.ts(add user-facing routes)backend/src/features/email-ingestion/api/email-ingestion.controller.ts(add handlers)frontend/src/features/email-ingestion/(new feature directory)frontend/src/features/email-ingestion/components/PendingAssociationBanner.tsxfrontend/src/features/email-ingestion/components/PendingAssociationList.tsxfrontend/src/features/email-ingestion/components/ResolveAssociationDialog.tsxfrontend/src/features/email-ingestion/hooks/usePendingAssociations.tsAcceptance Criteria
Milestone: Implementation Complete
Phase: Execution | Agent: Developer | Status: PASS
Backend Changes
getPendingAssociationById()andgetPendingAssociationCount()toemail-ingestion.repository.tsresolveAssociation()(creates record + marks resolved) anddismissAssociation()methods toemail-ingestion.service.tsgetPendingAssociations,getPendingAssociationCount,resolveAssociation,dismissAssociationemailIngestionRoutesplugin with JWT-authenticated endpoints:GET /api/email-ingestion/pending- List pending associationsGET /api/email-ingestion/pending/count- Count for bannerPOST /api/email-ingestion/pending/:id/resolve- Resolve with vehicle selectionDELETE /api/email-ingestion/pending/:id- Dismiss/discardapp.tsFrontend Changes
frontend/src/features/email-ingestion/with types, API, hooks, componentsPendingVehicleAssociation,ExtractedReceiptData,ResolveAssociationResultemailIngestionApiwithgetPending,getPendingCount,resolve,dismissusePendingAssociationCount(polled),usePendingAssociations,useResolveAssociation,useDismissAssociationDashboardScreen.tsxQuality Checks
anywarnings only)Verdict: PASS | Next: Quality Agent review