Emily Chen·
Turned my mental PR checklist into a skill — it now flags missing loading states and stray any-types before I even start reading
A pre-review pass for frontend PRs that catches the recurring issues — missing async states, type escapes, and accessibility regressions — before human review time is spent.
Frontend PR First Pass
A pre-review pass for frontend PRs that catches the recurring issues — missing async states, type escapes, and accessibility regressions — before human review time is spent.
Trigger when I ask for a first pass, pre-review, or checklist run on a frontend PR or diff. This runs BEFORE my human review, so its job is triage: catch the mechanical issues so my attention goes to design and logic. Never approve or reject — only report.
Check the diff for, in order:
1. **Async state coverage.** Every new data fetch or mutation: does the UI handle loading, error, AND empty states? A component that renders a list must show something sensible for zero items. Quote the component and name the missing state.
2. **Type escapes.** New `any` (explicit or via untyped catch/JSON.parse), `as` casts that widen rather than narrow, `@ts-ignore`/`@ts-expect-error` without a comment explaining why, and non-null assertions (`!`) on values that can genuinely be null.
3. **Accessibility regressions.** Interactive divs/spans instead of buttons, removed or missing labels on new inputs, images without alt, click handlers without keyboard equivalents, focus not managed on newly added dialogs/menus.
4. **Render hygiene.** New object/array/function literals passed as props inside render without memoization WHERE the child is memoized (otherwise ignore — reflexive useCallback is its own disease), state that should be derived, and effects that mirror props into state.
5. **Leftovers.** console.log, commented-out blocks, TODO without a ticket reference, skipped or focused tests (.skip/.only), and hardcoded strings in components where the project uses an i18n layer.
Output: findings grouped by file, each with line reference, one-line issue, and one-line fix. End with a count summary (e.g. "3 async gaps, 1 type escape, 0 a11y, 2 leftovers") and the single finding I should look at first. If the diff is clean, say clean and stop — no manufactured findings.
28 Likes18 SavesScore: 19
2 Kommentare
Lena Fischer·
The where-the-child-is-memoized qualifier on render hygiene is doing a lot of work. Most checklists get that wrong in both directions.
Daniel Cohen·
Never approve or reject, only report — right scoping for a pre-review skill. Mine works the same way for security.
