Episode 2 — React Frontend Architecture NextJS / 2.12 — Server State and API Integration
2.12.e — Mutations: updating server data properly
Learning outcomes
- Use
useMutationfor POST/PUT/PATCH/DELETE flows. - Invalidate or patch queries after success.
- Understand optimistic updates trade-offs.
Basic mutation
import { useMutation, useQueryClient } from "@tanstack/react-query";
async function renamePost(id: string, title: string) {
const res = await fetch(`/api/posts/${id}`, {
method: "PATCH",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ title }),
});
if (!res.ok) throw new Error("Save failed");
return res.json();
}
export function RenameButton({ id }: { id: string }) {
const qc = useQueryClient();
const m = useMutation({
mutationFn: (title: string) => renamePost(id, title),
onSuccess: () => qc.invalidateQueries({ queryKey: ["post", id] }),
});
return (
<button type="button" disabled={m.isPending} onClick={() => m.mutate("New title")}>
Save
</button>
);
}
Invalidation vs patch
- invalidateQueries: simplest; refetches soon—can be heavier.
- setQueryData: instant UI if you trust the server response shape.
Optimistic updates (caution)
Great UX when latency is high and conflicts are rare—always plan rollback on error.
Appendix — Scenario bank (basic → advanced)
Flashcard rhythm: symptom → cause → fix → phrase for interviews.
API4-001 — mutations #1
- Level: Beginner
- Symptom: stale UI or spinner stuck after
13ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-002 — mutations #2
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
26ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-003 — mutations #3
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
39ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-004 — mutations #4
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
52ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-005 — mutations #5
- Level: Advanced
- Symptom: stale UI or spinner stuck after
65ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-006 — mutations #6
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
78ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-007 — mutations #7
- Level: Beginner
- Symptom: stale UI or spinner stuck after
91ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-008 — mutations #8
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
104ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-009 — mutations #9
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
117ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-010 — mutations #10
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
130ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-011 — mutations #11
- Level: Advanced
- Symptom: stale UI or spinner stuck after
143ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-012 — mutations #12
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
156ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-013 — mutations #13
- Level: Beginner
- Symptom: stale UI or spinner stuck after
169ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-014 — mutations #14
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
182ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-015 — mutations #15
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
195ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-016 — mutations #16
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
8ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-017 — mutations #17
- Level: Advanced
- Symptom: stale UI or spinner stuck after
21ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-018 — mutations #18
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
34ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-019 — mutations #19
- Level: Beginner
- Symptom: stale UI or spinner stuck after
47ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-020 — mutations #20
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
60ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-021 — mutations #21
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
73ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-022 — mutations #22
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
86ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-023 — mutations #23
- Level: Advanced
- Symptom: stale UI or spinner stuck after
99ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-024 — mutations #24
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
112ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-025 — mutations #25
- Level: Beginner
- Symptom: stale UI or spinner stuck after
125ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-026 — mutations #26
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
138ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-027 — mutations #27
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
151ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-028 — mutations #28
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
164ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-029 — mutations #29
- Level: Advanced
- Symptom: stale UI or spinner stuck after
177ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-030 — mutations #30
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
190ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-031 — mutations #31
- Level: Beginner
- Symptom: stale UI or spinner stuck after
3ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-032 — mutations #32
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
16ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-033 — mutations #33
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
29ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-034 — mutations #34
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
42ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-035 — mutations #35
- Level: Advanced
- Symptom: stale UI or spinner stuck after
55ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-036 — mutations #36
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
68ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-037 — mutations #37
- Level: Beginner
- Symptom: stale UI or spinner stuck after
81ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-038 — mutations #38
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
94ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-039 — mutations #39
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
107ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-040 — mutations #40
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
120ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-041 — mutations #41
- Level: Advanced
- Symptom: stale UI or spinner stuck after
133ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-042 — mutations #42
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
146ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-043 — mutations #43
- Level: Beginner
- Symptom: stale UI or spinner stuck after
159ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-044 — mutations #44
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
172ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-045 — mutations #45
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
185ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-046 — mutations #46
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
198ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-047 — mutations #47
- Level: Advanced
- Symptom: stale UI or spinner stuck after
11ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-048 — mutations #48
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
24ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-049 — mutations #49
- Level: Beginner
- Symptom: stale UI or spinner stuck after
37ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-050 — mutations #50
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
50ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-051 — mutations #51
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
63ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-052 — mutations #52
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
76ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-053 — mutations #53
- Level: Advanced
- Symptom: stale UI or spinner stuck after
89ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-054 — mutations #54
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
102ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-055 — mutations #55
- Level: Beginner
- Symptom: stale UI or spinner stuck after
115ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-056 — mutations #56
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
128ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-057 — mutations #57
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
141ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-058 — mutations #58
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
154ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-059 — mutations #59
- Level: Advanced
- Symptom: stale UI or spinner stuck after
167ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-060 — mutations #60
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
180ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-061 — mutations #61
- Level: Beginner
- Symptom: stale UI or spinner stuck after
193ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-062 — mutations #62
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
6ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-063 — mutations #63
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
19ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-064 — mutations #64
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
32ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-065 — mutations #65
- Level: Advanced
- Symptom: stale UI or spinner stuck after
45ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-066 — mutations #66
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
58ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-067 — mutations #67
- Level: Beginner
- Symptom: stale UI or spinner stuck after
71ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-068 — mutations #68
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
84ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-069 — mutations #69
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
97ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-070 — mutations #70
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
110ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-071 — mutations #71
- Level: Advanced
- Symptom: stale UI or spinner stuck after
123ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-072 — mutations #72
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
136ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-073 — mutations #73
- Level: Beginner
- Symptom: stale UI or spinner stuck after
149ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-074 — mutations #74
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
162ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-075 — mutations #75
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
175ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-076 — mutations #76
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
188ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-077 — mutations #77
- Level: Advanced
- Symptom: stale UI or spinner stuck after
1ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-078 — mutations #78
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
14ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-079 — mutations #79
- Level: Beginner
- Symptom: stale UI or spinner stuck after
27ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-080 — mutations #80
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
40ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-081 — mutations #81
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
53ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-082 — mutations #82
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
66ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-083 — mutations #83
- Level: Advanced
- Symptom: stale UI or spinner stuck after
79ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-084 — mutations #84
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
92ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-085 — mutations #85
- Level: Beginner
- Symptom: stale UI or spinner stuck after
105ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-086 — mutations #86
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
118ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-087 — mutations #87
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
131ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-088 — mutations #88
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
144ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-089 — mutations #89
- Level: Advanced
- Symptom: stale UI or spinner stuck after
157ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-090 — mutations #90
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
170ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-091 — mutations #91
- Level: Beginner
- Symptom: stale UI or spinner stuck after
183ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-092 — mutations #92
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
196ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-093 — mutations #93
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
9ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-094 — mutations #94
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
22ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-095 — mutations #95
- Level: Advanced
- Symptom: stale UI or spinner stuck after
35ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-096 — mutations #96
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
48ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-097 — mutations #97
- Level: Beginner
- Symptom: stale UI or spinner stuck after
61ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-098 — mutations #98
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
74ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-099 — mutations #99
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
87ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-100 — mutations #100
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
100ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-101 — mutations #101
- Level: Advanced
- Symptom: stale UI or spinner stuck after
113ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-102 — mutations #102
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
126ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-103 — mutations #103
- Level: Beginner
- Symptom: stale UI or spinner stuck after
139ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-104 — mutations #104
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
152ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-105 — mutations #105
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
165ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-106 — mutations #106
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
178ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-107 — mutations #107
- Level: Advanced
- Symptom: stale UI or spinner stuck after
191ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-108 — mutations #108
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
4ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-109 — mutations #109
- Level: Beginner
- Symptom: stale UI or spinner stuck after
17ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-110 — mutations #110
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
30ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-111 — mutations #111
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
43ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-112 — mutations #112
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
56ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-113 — mutations #113
- Level: Advanced
- Symptom: stale UI or spinner stuck after
69ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-114 — mutations #114
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
82ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-115 — mutations #115
- Level: Beginner
- Symptom: stale UI or spinner stuck after
95ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-116 — mutations #116
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
108ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-117 — mutations #117
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
121ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-118 — mutations #118
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
134ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-119 — mutations #119
- Level: Advanced
- Symptom: stale UI or spinner stuck after
147ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-120 — mutations #120
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
160ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-121 — mutations #121
- Level: Beginner
- Symptom: stale UI or spinner stuck after
173ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-122 — mutations #122
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
186ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-123 — mutations #123
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
199ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-124 — mutations #124
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
12ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-125 — mutations #125
- Level: Advanced
- Symptom: stale UI or spinner stuck after
25ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-126 — mutations #126
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
38ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-127 — mutations #127
- Level: Beginner
- Symptom: stale UI or spinner stuck after
51ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-128 — mutations #128
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
64ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-129 — mutations #129
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
77ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-130 — mutations #130
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
90ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-131 — mutations #131
- Level: Advanced
- Symptom: stale UI or spinner stuck after
103ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-132 — mutations #132
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
116ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-133 — mutations #133
- Level: Beginner
- Symptom: stale UI or spinner stuck after
129ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-134 — mutations #134
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
142ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-135 — mutations #135
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
155ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-136 — mutations #136
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
168ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-137 — mutations #137
- Level: Advanced
- Symptom: stale UI or spinner stuck after
181ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-138 — mutations #138
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
194ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-139 — mutations #139
- Level: Beginner
- Symptom: stale UI or spinner stuck after
7ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-140 — mutations #140
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
20ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-141 — mutations #141
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
33ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-142 — mutations #142
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
46ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-143 — mutations #143
- Level: Advanced
- Symptom: stale UI or spinner stuck after
59ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-144 — mutations #144
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
72ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-145 — mutations #145
- Level: Beginner
- Symptom: stale UI or spinner stuck after
85ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-146 — mutations #146
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
98ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-147 — mutations #147
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
111ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-148 — mutations #148
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
124ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-149 — mutations #149
- Level: Advanced
- Symptom: stale UI or spinner stuck after
137ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-150 — mutations #150
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
150ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-151 — mutations #151
- Level: Beginner
- Symptom: stale UI or spinner stuck after
163ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-152 — mutations #152
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
176ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-153 — mutations #153
- Level: Intermediate
- Symptom: stale UI or spinner stuck after
189ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: onSettled invalidates too broadly slowing UI after every keystroke-save.
- Primary remediation: Invalidate narrowly; patch cache with returned entity when API returns it.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-154 — mutations #154
- Level: Intermediate+
- Symptom: stale UI or spinner stuck after
2ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Double-click submit fires two POSTs without idempotency keys.
- Primary remediation: Surface toast + inline error; keep mutation error in UI state.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-155 — mutations #155
- Level: Advanced
- Symptom: stale UI or spinner stuck after
15ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Optimistic update without rollback on failure corrupts list order.
- Primary remediation: Model progress via xhr/fetch reader or library support.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-156 — mutations #156
- Level: Advanced+
- Symptom: stale UI or spinner stuck after
28ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation succeeds but UI stale because invalidateQueries keys mismatch.
- Primary remediation: Align invalidation keys with query key factory module.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-157 — mutations #157
- Level: Beginner
- Symptom: stale UI or spinner stuck after
41ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: File upload mutation missing progress state.
- Primary remediation: Use onMutate snapshot + onError restore; or pessimistic update when safer.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.
API4-158 — mutations #158
- Level: Beginner+
- Symptom: stale UI or spinner stuck after
54ms of navigation. - Integration smell: server errors surfaced as blank screen without recovery path.
- Root cause class: Mutation error swallowed; user thinks save succeeded.
- Primary remediation: Disable button + idempotency header or UUID client key per product rules.
- Verify: Network tab + React Query Devtools (if used) + user retry path.
- Interview one-liner: Mutations are transactions: update server, then reconcile cache or rollback explicitly.