Server and client boundariesCorePaid bank
Server and client boundary drift
A page fetches data on the server, but one nested widget needs a click handler. A draft adds `"use client"` to the whole page file so everything compiles. What is the cleaner fix?
This is where App Router codebases quietly lose caching, review clarity, and bundle discipline.
Identity and state ownershipAppliedPaid bank
Mirroring props into local state
An editable detail panel copies `user` props into local state inside an effect every time the parent rerenders. Unsaved edits keep disappearing. What is the best diagnosis?
AI drafts often patch ownership bugs by syncing props into state, which hides the real identity boundary instead of fixing it.
Async trustAppliedPaid bank
Optimistic UI without a truth contract
A save button updates the UI optimistically, but if the request fails the screen still shows the optimistic value and no recovery path. What is the strongest fix?
Optimistic UI creates trust debt fast when the code never defines how truth is re-established.
Async trustCorePaid bank
Async request races
A typeahead sends a request on every query change. Results for `rea` arrive after results for `react`, and the old response overwrites the new list. What is the best repair?
This is one of the most common AI-generated React bugs because the happy path works in demos.
Server and client boundariesAppliedPaid bank
Form pending state ownership
A server-action form needs a pending spinner only on its submit button. A draft lifts saving state into a parent client wrapper just to disable that one button. What is the cleaner move?
This is how small form needs become broad client wrappers that weaken the server-first design.
Scheduling and responsivenessStressPaid bank
Context churn under typing pressure
A single context provider stores both fast-changing input state and slow app preferences. Every keystroke rerenders distant consumers that do not care about the input. What is the better diagnosis?
AI often reaches for context early and hides render pressure inside a convenient but leaky global object.
Effects and cleanupCorePaid bank
Duplicate subscriptions after remount
A chat panel registers an event listener in an effect. After navigating away and back a few times, messages start appearing twice. What is the most likely fix?
Visual QA often misses this until production because the component appears healthy on first mount.
Server and client boundariesCorePaid bank
Browser APIs in the wrong layer
A server component reads `localStorage` during render to restore a theme preference. The route now throws on the server. What is the right fix?
Boundary mistakes like this create hydration confusion and are still common in generated Next.js code.
Identity and state ownershipStressPaid bank
Too many synchronized state patches
A multi-step editor now has five `useState` calls and three effects that keep one piece of state in sync with another. The AI patch added more cross-updates to fix edge cases. What is the better move?
When state transitions become fuzzy, AI tends to keep stacking synchronization effects instead of clarifying the model.
Async trustStressPaid bank
Interruption-safe optimistic flows
A settings screen applies optimistic changes immediately, then a route change interrupts the save. When the user comes back, stale optimistic state briefly flashes before the server data reloads. What is the stronger fix?
This is where async trust and scheduling meet: a UI can feel fast and still be fundamentally unreliable.