You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refetch-hardening + dedup across the three sidebar surfaces — all now ?selected= editors sharing the same doFetch / handleSave / handleDeactivate block:
False-success over stale table — handleSave/handleDeactivate set the green "saved" flag beforeawait onSaved, so a committed save whose post-save refetch fails still shows success over a stale table. useVehicles.doFetch swallows fetch errors; VehicleDetails.handleSave has no try/catch. src/data/vehicles/hooks/useVehicles.ts, src/data/vehicles/components/VehicleDetails.tsx:72
Invisible list error — list error is hidden when data is non-empty, so non-save refetch failures (e.g. filterParam change after an Autosys import) silently leave a stale table. src/pages/GenericDataViewPage.tsx
useMutationOutcome({ mutate, onSaved }) — owns the success flag (set after await onSaved), tags { outcome: 'mutation-error' | 'refetch-error' | 'ok' } for severity routing, and owns the snackbar render slot (omitting it = compile error). Dissolves the ~19-line handleSave/handleDeactivate copy in all three Details files down to ~5 lines each, plus commitSave (now unused — delete).
Refetch-hardening + dedup across the three sidebar surfaces — all now
?selected=editors sharing the samedoFetch/handleSave/handleDeactivateblock:createOrUpdateVehicle(highest-stakes).Bugs (same shape, repeated per surface)
handleSave/handleDeactivateset the green "saved" flag beforeawait onSaved, so a committed save whose post-save refetch fails still shows success over a stale table.useVehicles.doFetchswallows fetch errors;VehicleDetails.handleSavehas no try/catch.src/data/vehicles/hooks/useVehicles.ts,src/data/vehicles/components/VehicleDetails.tsx:72erroris hidden when data is non-empty, so non-save refetch failures (e.g.filterParamchange after an Autosys import) silently leave a stale table.src/pages/GenericDataViewPage.tsxe2e-tests/no-auth/vehicle-type-sidebar.spec.tsLift (dedup destination)
src/utils/translateFetchError.ts— generic of the error switch (fromfetchVehiclesAndApply.ts).src/hooks/useEntityListFetch.ts— generic gate / loading / error / refetch hook; migrateuseVehicleTypes,useDeckPlans,useVehicles(latter deletesfetchVehiclesAndApply.ts+ test).useMutationOutcome({ mutate, onSaved })— owns the success flag (set afterawait onSaved), tags{ outcome: 'mutation-error' | 'refetch-error' | 'ok' }for severity routing, and owns the snackbar render slot (omitting it = compile error). Dissolves the ~19-linehandleSave/handleDeactivatecopy in all three Details files down to ~5 lines each, pluscommitSave(now unused — delete).Status
useVehicleTypes— good shape (fix(#122): doFetch return regression surfaced by e2e org-rebuild (#117) #125).useDeckPlans— same shape (a4d9372, more uniform table ux across all 3 entity pages #129).useVehicles— still setter-injection viafetchVehiclesAndApply, no rethrow.handleDeactivatecopy a third time → land the lift first, then re-implement Feature/add disable option #131 on top (~5 lines each).Refs: #114, #91, #130 (closed as dup), #131.