Episode 2 — React Frontend Architecture NextJS / 2.9 — Custom Hooks and Reusable Logic
2.9.c — Separating business logic from UI
Learning outcomes
- Place domain rules in pure modules testable without React.
- Keep hooks as orchestrators: effects, subscriptions, mapping to UI state.
- Avoid returning JSX from hooks meant for reuse.
Layering model
UI components (presentation)
↓ calls
Custom hooks (orchestration: React concerns)
↓ calls
Domain + services (pure rules, API adapters)
Example boundary
// domain/invoice.ts — pure, unit-tested
export function canSubmit(invoice: { total: number; lines: number }) {
return invoice.lines > 0 && invoice.total >= 0;
}
// hooks/useInvoiceForm.ts
import { canSubmit } from "../domain/invoice";
import { useMemo, useState } from "react";
export function useInvoiceForm() {
const [lines, setLines] = useState(0);
const [total, setTotal] = useState(0);
const submitAllowed = useMemo(() => canSubmit({ total, lines }), [total, lines]);
return { lines, total, setLines, setTotal, submitAllowed };
}
The component only renders inputs and buttons using submitAllowed.
Appendix — Scenario bank (basic → advanced)
Flashcard: symptom → cause → fix → interview phrase.
CH2-001 — Business vs UI #1
- Level: Beginner
- Symptom: duplicate
useEffectblocks across13screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: No pure function tests; only brittle E2E for core calculations.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-002 — Business vs UI #2
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across26screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Authorization checks only in UI hiding missing server enforcement.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-003 — Business vs UI #3
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across39screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Hook returns ready-made
<Card/>elements mixing view and rules. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-004 — Business vs UI #4
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across52screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: DTO mapping duplicated in three hooks with drift.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-005 — Business vs UI #5
- Level: Advanced
- Symptom: duplicate
useEffectblocks across65screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Fat
useInvoicehook imports UI icons for side effects. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-006 — Business vs UI #6
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across78screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Currency math in component without shared
money.tsmodule. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-007 — Business vs UI #7
- Level: Beginner
- Symptom: duplicate
useEffectblocks across91screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Business rules embedded in JSX ternary chains unreadable in review.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-008 — Business vs UI #8
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across104screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: No pure function tests; only brittle E2E for core calculations.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-009 — Business vs UI #9
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across117screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Authorization checks only in UI hiding missing server enforcement.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-010 — Business vs UI #10
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across130screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Hook returns ready-made
<Card/>elements mixing view and rules. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-011 — Business vs UI #11
- Level: Advanced
- Symptom: duplicate
useEffectblocks across143screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: DTO mapping duplicated in three hooks with drift.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-012 — Business vs UI #12
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across156screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Fat
useInvoicehook imports UI icons for side effects. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-013 — Business vs UI #13
- Level: Beginner
- Symptom: duplicate
useEffectblocks across169screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Currency math in component without shared
money.tsmodule. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-014 — Business vs UI #14
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across182screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Business rules embedded in JSX ternary chains unreadable in review.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-015 — Business vs UI #15
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across195screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: No pure function tests; only brittle E2E for core calculations.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-016 — Business vs UI #16
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across8screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Authorization checks only in UI hiding missing server enforcement.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-017 — Business vs UI #17
- Level: Advanced
- Symptom: duplicate
useEffectblocks across21screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Hook returns ready-made
<Card/>elements mixing view and rules. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-018 — Business vs UI #18
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across34screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: DTO mapping duplicated in three hooks with drift.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-019 — Business vs UI #19
- Level: Beginner
- Symptom: duplicate
useEffectblocks across47screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Fat
useInvoicehook imports UI icons for side effects. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-020 — Business vs UI #20
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across60screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Currency math in component without shared
money.tsmodule. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-021 — Business vs UI #21
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across73screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Business rules embedded in JSX ternary chains unreadable in review.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-022 — Business vs UI #22
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across86screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: No pure function tests; only brittle E2E for core calculations.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-023 — Business vs UI #23
- Level: Advanced
- Symptom: duplicate
useEffectblocks across99screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Authorization checks only in UI hiding missing server enforcement.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-024 — Business vs UI #24
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across112screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Hook returns ready-made
<Card/>elements mixing view and rules. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-025 — Business vs UI #25
- Level: Beginner
- Symptom: duplicate
useEffectblocks across125screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: DTO mapping duplicated in three hooks with drift.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-026 — Business vs UI #26
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across138screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Fat
useInvoicehook imports UI icons for side effects. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-027 — Business vs UI #27
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across151screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Currency math in component without shared
money.tsmodule. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-028 — Business vs UI #28
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across164screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Business rules embedded in JSX ternary chains unreadable in review.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-029 — Business vs UI #29
- Level: Advanced
- Symptom: duplicate
useEffectblocks across177screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: No pure function tests; only brittle E2E for core calculations.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-030 — Business vs UI #30
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across190screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Authorization checks only in UI hiding missing server enforcement.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-031 — Business vs UI #31
- Level: Beginner
- Symptom: duplicate
useEffectblocks across3screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Hook returns ready-made
<Card/>elements mixing view and rules. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-032 — Business vs UI #32
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across16screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: DTO mapping duplicated in three hooks with drift.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-033 — Business vs UI #33
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across29screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Fat
useInvoicehook imports UI icons for side effects. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-034 — Business vs UI #34
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across42screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Currency math in component without shared
money.tsmodule. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-035 — Business vs UI #35
- Level: Advanced
- Symptom: duplicate
useEffectblocks across55screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Business rules embedded in JSX ternary chains unreadable in review.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-036 — Business vs UI #36
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across68screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: No pure function tests; only brittle E2E for core calculations.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-037 — Business vs UI #37
- Level: Beginner
- Symptom: duplicate
useEffectblocks across81screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Authorization checks only in UI hiding missing server enforcement.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-038 — Business vs UI #38
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across94screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Hook returns ready-made
<Card/>elements mixing view and rules. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-039 — Business vs UI #39
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across107screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: DTO mapping duplicated in three hooks with drift.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-040 — Business vs UI #40
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across120screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Fat
useInvoicehook imports UI icons for side effects. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-041 — Business vs UI #41
- Level: Advanced
- Symptom: duplicate
useEffectblocks across133screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Currency math in component without shared
money.tsmodule. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-042 — Business vs UI #42
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across146screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Business rules embedded in JSX ternary chains unreadable in review.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-043 — Business vs UI #43
- Level: Beginner
- Symptom: duplicate
useEffectblocks across159screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: No pure function tests; only brittle E2E for core calculations.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-044 — Business vs UI #44
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across172screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Authorization checks only in UI hiding missing server enforcement.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-045 — Business vs UI #45
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across185screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Hook returns ready-made
<Card/>elements mixing view and rules. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-046 — Business vs UI #46
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across198screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: DTO mapping duplicated in three hooks with drift.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-047 — Business vs UI #47
- Level: Advanced
- Symptom: duplicate
useEffectblocks across11screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Fat
useInvoicehook imports UI icons for side effects. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-048 — Business vs UI #48
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across24screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Currency math in component without shared
money.tsmodule. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-049 — Business vs UI #49
- Level: Beginner
- Symptom: duplicate
useEffectblocks across37screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Business rules embedded in JSX ternary chains unreadable in review.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-050 — Business vs UI #50
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across50screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: No pure function tests; only brittle E2E for core calculations.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-051 — Business vs UI #51
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across63screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Authorization checks only in UI hiding missing server enforcement.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-052 — Business vs UI #52
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across76screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Hook returns ready-made
<Card/>elements mixing view and rules. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-053 — Business vs UI #53
- Level: Advanced
- Symptom: duplicate
useEffectblocks across89screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: DTO mapping duplicated in three hooks with drift.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-054 — Business vs UI #54
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across102screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Fat
useInvoicehook imports UI icons for side effects. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-055 — Business vs UI #55
- Level: Beginner
- Symptom: duplicate
useEffectblocks across115screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Currency math in component without shared
money.tsmodule. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-056 — Business vs UI #56
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across128screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Business rules embedded in JSX ternary chains unreadable in review.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-057 — Business vs UI #57
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across141screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: No pure function tests; only brittle E2E for core calculations.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-058 — Business vs UI #58
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across154screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Authorization checks only in UI hiding missing server enforcement.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-059 — Business vs UI #59
- Level: Advanced
- Symptom: duplicate
useEffectblocks across167screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Hook returns ready-made
<Card/>elements mixing view and rules. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-060 — Business vs UI #60
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across180screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: DTO mapping duplicated in three hooks with drift.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-061 — Business vs UI #61
- Level: Beginner
- Symptom: duplicate
useEffectblocks across193screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Fat
useInvoicehook imports UI icons for side effects. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-062 — Business vs UI #62
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across6screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Currency math in component without shared
money.tsmodule. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-063 — Business vs UI #63
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across19screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Business rules embedded in JSX ternary chains unreadable in review.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-064 — Business vs UI #64
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across32screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: No pure function tests; only brittle E2E for core calculations.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-065 — Business vs UI #65
- Level: Advanced
- Symptom: duplicate
useEffectblocks across45screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Authorization checks only in UI hiding missing server enforcement.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-066 — Business vs UI #66
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across58screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Hook returns ready-made
<Card/>elements mixing view and rules. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-067 — Business vs UI #67
- Level: Beginner
- Symptom: duplicate
useEffectblocks across71screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: DTO mapping duplicated in three hooks with drift.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-068 — Business vs UI #68
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across84screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Fat
useInvoicehook imports UI icons for side effects. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-069 — Business vs UI #69
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across97screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Currency math in component without shared
money.tsmodule. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-070 — Business vs UI #70
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across110screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Business rules embedded in JSX ternary chains unreadable in review.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-071 — Business vs UI #71
- Level: Advanced
- Symptom: duplicate
useEffectblocks across123screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: No pure function tests; only brittle E2E for core calculations.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-072 — Business vs UI #72
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across136screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Authorization checks only in UI hiding missing server enforcement.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-073 — Business vs UI #73
- Level: Beginner
- Symptom: duplicate
useEffectblocks across149screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Hook returns ready-made
<Card/>elements mixing view and rules. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-074 — Business vs UI #74
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across162screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: DTO mapping duplicated in three hooks with drift.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-075 — Business vs UI #75
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across175screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Fat
useInvoicehook imports UI icons for side effects. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-076 — Business vs UI #76
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across188screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Currency math in component without shared
money.tsmodule. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-077 — Business vs UI #77
- Level: Advanced
- Symptom: duplicate
useEffectblocks across1screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Business rules embedded in JSX ternary chains unreadable in review.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-078 — Business vs UI #78
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across14screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: No pure function tests; only brittle E2E for core calculations.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-079 — Business vs UI #79
- Level: Beginner
- Symptom: duplicate
useEffectblocks across27screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Authorization checks only in UI hiding missing server enforcement.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-080 — Business vs UI #80
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across40screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Hook returns ready-made
<Card/>elements mixing view and rules. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-081 — Business vs UI #81
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across53screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: DTO mapping duplicated in three hooks with drift.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-082 — Business vs UI #82
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across66screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Fat
useInvoicehook imports UI icons for side effects. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-083 — Business vs UI #83
- Level: Advanced
- Symptom: duplicate
useEffectblocks across79screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Currency math in component without shared
money.tsmodule. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-084 — Business vs UI #84
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across92screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Business rules embedded in JSX ternary chains unreadable in review.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-085 — Business vs UI #85
- Level: Beginner
- Symptom: duplicate
useEffectblocks across105screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: No pure function tests; only brittle E2E for core calculations.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-086 — Business vs UI #86
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across118screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Authorization checks only in UI hiding missing server enforcement.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-087 — Business vs UI #87
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across131screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Hook returns ready-made
<Card/>elements mixing view and rules. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-088 — Business vs UI #88
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across144screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: DTO mapping duplicated in three hooks with drift.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-089 — Business vs UI #89
- Level: Advanced
- Symptom: duplicate
useEffectblocks across157screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Fat
useInvoicehook imports UI icons for side effects. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-090 — Business vs UI #90
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across170screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Currency math in component without shared
money.tsmodule. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-091 — Business vs UI #91
- Level: Beginner
- Symptom: duplicate
useEffectblocks across183screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Business rules embedded in JSX ternary chains unreadable in review.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-092 — Business vs UI #92
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across196screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: No pure function tests; only brittle E2E for core calculations.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-093 — Business vs UI #93
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across9screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Authorization checks only in UI hiding missing server enforcement.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-094 — Business vs UI #94
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across22screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Hook returns ready-made
<Card/>elements mixing view and rules. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-095 — Business vs UI #95
- Level: Advanced
- Symptom: duplicate
useEffectblocks across35screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: DTO mapping duplicated in three hooks with drift.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-096 — Business vs UI #96
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across48screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Fat
useInvoicehook imports UI icons for side effects. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-097 — Business vs UI #97
- Level: Beginner
- Symptom: duplicate
useEffectblocks across61screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Currency math in component without shared
money.tsmodule. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-098 — Business vs UI #98
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across74screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Business rules embedded in JSX ternary chains unreadable in review.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-099 — Business vs UI #99
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across87screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: No pure function tests; only brittle E2E for core calculations.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-100 — Business vs UI #100
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across100screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Authorization checks only in UI hiding missing server enforcement.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-101 — Business vs UI #101
- Level: Advanced
- Symptom: duplicate
useEffectblocks across113screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Hook returns ready-made
<Card/>elements mixing view and rules. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-102 — Business vs UI #102
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across126screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: DTO mapping duplicated in three hooks with drift.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-103 — Business vs UI #103
- Level: Beginner
- Symptom: duplicate
useEffectblocks across139screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Fat
useInvoicehook imports UI icons for side effects. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-104 — Business vs UI #104
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across152screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Currency math in component without shared
money.tsmodule. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-105 — Business vs UI #105
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across165screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Business rules embedded in JSX ternary chains unreadable in review.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-106 — Business vs UI #106
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across178screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: No pure function tests; only brittle E2E for core calculations.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-107 — Business vs UI #107
- Level: Advanced
- Symptom: duplicate
useEffectblocks across191screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Authorization checks only in UI hiding missing server enforcement.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-108 — Business vs UI #108
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across4screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Hook returns ready-made
<Card/>elements mixing view and rules. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-109 — Business vs UI #109
- Level: Beginner
- Symptom: duplicate
useEffectblocks across17screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: DTO mapping duplicated in three hooks with drift.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-110 — Business vs UI #110
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across30screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Fat
useInvoicehook imports UI icons for side effects. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-111 — Business vs UI #111
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across43screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Currency math in component without shared
money.tsmodule. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-112 — Business vs UI #112
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across56screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Business rules embedded in JSX ternary chains unreadable in review.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-113 — Business vs UI #113
- Level: Advanced
- Symptom: duplicate
useEffectblocks across69screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: No pure function tests; only brittle E2E for core calculations.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-114 — Business vs UI #114
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across82screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Authorization checks only in UI hiding missing server enforcement.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-115 — Business vs UI #115
- Level: Beginner
- Symptom: duplicate
useEffectblocks across95screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Hook returns ready-made
<Card/>elements mixing view and rules. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-116 — Business vs UI #116
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across108screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: DTO mapping duplicated in three hooks with drift.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-117 — Business vs UI #117
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across121screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Fat
useInvoicehook imports UI icons for side effects. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-118 — Business vs UI #118
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across134screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Currency math in component without shared
money.tsmodule. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-119 — Business vs UI #119
- Level: Advanced
- Symptom: duplicate
useEffectblocks across147screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Business rules embedded in JSX ternary chains unreadable in review.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-120 — Business vs UI #120
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across160screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: No pure function tests; only brittle E2E for core calculations.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-121 — Business vs UI #121
- Level: Beginner
- Symptom: duplicate
useEffectblocks across173screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Authorization checks only in UI hiding missing server enforcement.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-122 — Business vs UI #122
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across186screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Hook returns ready-made
<Card/>elements mixing view and rules. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-123 — Business vs UI #123
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across199screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: DTO mapping duplicated in three hooks with drift.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-124 — Business vs UI #124
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across12screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Fat
useInvoicehook imports UI icons for side effects. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-125 — Business vs UI #125
- Level: Advanced
- Symptom: duplicate
useEffectblocks across25screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Currency math in component without shared
money.tsmodule. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-126 — Business vs UI #126
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across38screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Business rules embedded in JSX ternary chains unreadable in review.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-127 — Business vs UI #127
- Level: Beginner
- Symptom: duplicate
useEffectblocks across51screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: No pure function tests; only brittle E2E for core calculations.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-128 — Business vs UI #128
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across64screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Authorization checks only in UI hiding missing server enforcement.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-129 — Business vs UI #129
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across77screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Hook returns ready-made
<Card/>elements mixing view and rules. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-130 — Business vs UI #130
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across90screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: DTO mapping duplicated in three hooks with drift.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-131 — Business vs UI #131
- Level: Advanced
- Symptom: duplicate
useEffectblocks across103screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Fat
useInvoicehook imports UI icons for side effects. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-132 — Business vs UI #132
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across116screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Currency math in component without shared
money.tsmodule. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-133 — Business vs UI #133
- Level: Beginner
- Symptom: duplicate
useEffectblocks across129screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Business rules embedded in JSX ternary chains unreadable in review.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-134 — Business vs UI #134
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across142screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: No pure function tests; only brittle E2E for core calculations.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-135 — Business vs UI #135
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across155screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Authorization checks only in UI hiding missing server enforcement.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-136 — Business vs UI #136
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across168screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Hook returns ready-made
<Card/>elements mixing view and rules. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-137 — Business vs UI #137
- Level: Advanced
- Symptom: duplicate
useEffectblocks across181screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: DTO mapping duplicated in three hooks with drift.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-138 — Business vs UI #138
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across194screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Fat
useInvoicehook imports UI icons for side effects. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-139 — Business vs UI #139
- Level: Beginner
- Symptom: duplicate
useEffectblocks across7screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Currency math in component without shared
money.tsmodule. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-140 — Business vs UI #140
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across20screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Business rules embedded in JSX ternary chains unreadable in review.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-141 — Business vs UI #141
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across33screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: No pure function tests; only brittle E2E for core calculations.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-142 — Business vs UI #142
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across46screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Authorization checks only in UI hiding missing server enforcement.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-143 — Business vs UI #143
- Level: Advanced
- Symptom: duplicate
useEffectblocks across59screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Hook returns ready-made
<Card/>elements mixing view and rules. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-144 — Business vs UI #144
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across72screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: DTO mapping duplicated in three hooks with drift.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-145 — Business vs UI #145
- Level: Beginner
- Symptom: duplicate
useEffectblocks across85screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Fat
useInvoicehook imports UI icons for side effects. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-146 — Business vs UI #146
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across98screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Currency math in component without shared
money.tsmodule. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-147 — Business vs UI #147
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across111screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Business rules embedded in JSX ternary chains unreadable in review.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-148 — Business vs UI #148
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across124screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: No pure function tests; only brittle E2E for core calculations.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-149 — Business vs UI #149
- Level: Advanced
- Symptom: duplicate
useEffectblocks across137screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Authorization checks only in UI hiding missing server enforcement.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-150 — Business vs UI #150
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across150screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Hook returns ready-made
<Card/>elements mixing view and rules. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-151 — Business vs UI #151
- Level: Beginner
- Symptom: duplicate
useEffectblocks across163screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: DTO mapping duplicated in three hooks with drift.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-152 — Business vs UI #152
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across176screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Fat
useInvoicehook imports UI icons for side effects. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-153 — Business vs UI #153
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across189screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Currency math in component without shared
money.tsmodule. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-154 — Business vs UI #154
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across2screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Business rules embedded in JSX ternary chains unreadable in review.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-155 — Business vs UI #155
- Level: Advanced
- Symptom: duplicate
useEffectblocks across15screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: No pure function tests; only brittle E2E for core calculations.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-156 — Business vs UI #156
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across28screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Authorization checks only in UI hiding missing server enforcement.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-157 — Business vs UI #157
- Level: Beginner
- Symptom: duplicate
useEffectblocks across41screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Hook returns ready-made
<Card/>elements mixing view and rules. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-158 — Business vs UI #158
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across54screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: DTO mapping duplicated in three hooks with drift.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-159 — Business vs UI #159
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across67screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Fat
useInvoicehook imports UI icons for side effects. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-160 — Business vs UI #160
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across80screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Currency math in component without shared
money.tsmodule. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-161 — Business vs UI #161
- Level: Advanced
- Symptom: duplicate
useEffectblocks across93screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Business rules embedded in JSX ternary chains unreadable in review.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-162 — Business vs UI #162
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across106screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: No pure function tests; only brittle E2E for core calculations.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-163 — Business vs UI #163
- Level: Beginner
- Symptom: duplicate
useEffectblocks across119screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Authorization checks only in UI hiding missing server enforcement.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-164 — Business vs UI #164
- Level: Beginner+
- Symptom: duplicate
useEffectblocks across132screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Hook returns ready-made
<Card/>elements mixing view and rules. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-165 — Business vs UI #165
- Level: Intermediate
- Symptom: duplicate
useEffectblocks across145screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: DTO mapping duplicated in three hooks with drift.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-166 — Business vs UI #166
- Level: Intermediate+
- Symptom: duplicate
useEffectblocks across158screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Fat
useInvoicehook imports UI icons for side effects. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-167 — Business vs UI #167
- Level: Advanced
- Symptom: duplicate
useEffectblocks across171screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Currency math in component without shared
money.tsmodule. - Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.
CH2-168 — Business vs UI #168
- Level: Advanced+
- Symptom: duplicate
useEffectblocks across184screens or flaky tests after hook refactor. - Maintainability smell: hook name does not match behavior; grep fails.
- Root cause class: Business rules embedded in JSX ternary chains unreadable in review.
- Primary remediation: Extract
canEditInvoice(user, invoice)pure helpers with unit tests. - Verify: RTL hook test + one story + bundle diff if heavy.
- Interview one-liner: Hooks orchestrate; pure functions decide—UI renders outcomes.