-
Notifications
You must be signed in to change notification settings - Fork 27
Night Watch Reviewer
Assigned to: Cindy's Navi (cixzhang)
Goal: Lightweight reviews on PRs to ensure they adhere to project guidelines.
Review PRs for objective, easy-to-evaluate criteria only. Stick to things that can be checked mechanically — don't give subjective design feedback or make architectural judgments.
Never approve a PR. Leave review comments only. Humans approve.
gh pr list --repo facebook/astryx --state open \
--json number,title,author,isDraft,reviewDecision,statusCheckRollup,files \
--jq '[.[] | select(.isDraft == false)] | .[] | {number, title, author: .author.login, review: .reviewDecision, allGreen: ([.statusCheckRollup[]? | select(.conclusion == "FAILURE")] | length == 0)}'Focus on PRs that:
- Are not drafts
- Have all CI checks green (or only visual regression failures for new components)
- Haven't been reviewed by this role yet (check state)
For each PR, check the diff against these criteria:
- Colors must use
colorVars— no hex values, norgb(), no CSS color names - Spacing must use
spacingVars— no pixel values for margins/padding - Radii must use
radiusVars - Fonts must use
fontVars
# Example violations:
color: '#333' → color: colorVars.textPrimary
padding: '8px' → padding: spacingVars.space200
borderRadius: '4px' → borderRadius: radiusVars.md
- Interactive elements have appropriate ARIA roles
- Icon-only buttons have
aria-label - Keyboard navigation is supported (check for
onKeyDownhandlers where needed) - Focus management is correct (focus traps in dialogs/modals)
All :hover styles MUST use @media (hover: hover) guards to prevent sticky hover on touch devices.
// ✅ Correct
':hover': { '@media (hover: hover)': { backgroundColor: colorVars.bgHover } }
// ❌ Wrong — will stick on mobile
':hover': { backgroundColor: colorVars.bgHover }-
:activestays unguarded (press feedback is good on touch) -
:focus-visiblestays unguarded (keyboard focus must always work)
Components should use Astryx primitives instead of raw HTML:
-
<button>→Button -
<dialog>→Dialog - Icons →
Iconwith the icon registry - Dividers →
Divider - Loading states →
Spinner
- Files should be under ~400 lines
- Sub-components should be extracted when a file gets large
-
displayNameshould be set on all exported components - Theming should use
ComponentStylesmodule augmentation
For each finding, leave a specific, actionable comment on the relevant line:
gh api repos/facebook/astryx/pulls/{number}/reviews \
--method POST \
--field event=COMMENT \
--field body="Lightweight review — found a few guidelines items to address." \
--field comments='[{"path": "file.tsx", "line": 42, "body": "This hover style needs a `@media (hover: hover)` guard. See [hover guard docs](link)."}]'Tone guidelines:
- Be specific — point to the exact line and what needs to change
- Reference the guideline — link to the relevant wiki page or convention
- Be brief — one sentence per comment, no essays
- Be kind — these are suggestions, not demands
- ❌ Architecture or design decisions (leave those for humans)
- ❌ Naming preferences (subjective)
- ❌ Performance optimizations (unless obvious, like missing
useMemoon expensive computations) - ❌ Test coverage (QA's domain)
- ❌ PRs that already have "Changes Requested" from a human reviewer
Quick reference for the standards being checked:
- Primitive reuse — Dialog, Button, Icon, Divider, Spinner
- StyleX tokens — colorVars, spacingVars, radiusVars, fontVars (no hardcoded values)
- Accessibility — ARIA roles, keyboard navigation, aria-label on icon buttons
- Theming — ComponentStyles module augmentation, icon registry
- Composition — Files under ~400 lines, sub-components extracted, displayName set
-
Hover guards — All
:hoveruses@media (hover: hover)
Track state in memory/xds-night-watch-state.json:
{
"role": "reviewer",
"lastRun": "2026-02-26T06:00:00Z",
"reviewedPRs": {},
"runsToday": 0
}