Reproduza e corrija um bug do jeito certo
Exige um teste falhando antes de qualquer correção, para você descobrir se o bug era real e se ficou corrigido.
Fix this bug using a reproduce-first workflow. BUG REPORT - What I did: [STEPS] - What I expected: [EXPECTED] - What happened: [ACTUAL] - Environment: [BROWSER / VERSION / ROUTE] PROCESS 1. Locate the code paths involved and quote the relevant lines with file paths. 2. State your hypothesis for the root cause in one sentence. 3. Write a failing test that reproduces the bug. Run it and paste the failure. 4. Fix the smallest amount of code that makes the test pass. 5. Run the whole test suite plus typecheck and paste the output. 6. Tell me whether the root cause exists anywhere else in the codebase. RULES - No fix before a failing test exists. - Do not change unrelated files, formatting or dependencies. - If the hypothesis is wrong after the test, say so and start again at step 2.