Skip to content

Feature: rebase/eslint-react-compiler to dev - #409

Closed
github-actions[bot] wants to merge 4 commits into
devfrom
rebase/eslint-react-compiler
Closed

github-actions[bot] wants to merge 4 commits into
devfrom
rebase/eslint-react-compiler

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Automated PR tracking changes from rebase/eslint-react-compiler into dev.


Note

Medium Risk
Zod 4 and major React/Next bumps touch validation and payment input across api/db, while many portal pages change how state syncs during render—behavior should match but warrants regression on auth, checkout, judging admin, and submission flows.

Overview
Broad dependency refresh across the monorepo: Next 16.3.6, TypeScript 7, React 19.3, Zod 4, Vitest 5 (+ Vite 7), tRPC 11.19, Stripe client packages, Tailwind/ESLint tooling, and related bumps in api, db, auth, mainweb, and hacklytics2027.

React Compiler / hooks lint compliance is the main application change. Portal and marketing UI replace useEffect-driven “mounted” flags, form prefills, filter resets, and similar patterns with useIsClient / useWindowWidth (useSyncExternalStore) and render-time state updates so stale UI does not flash and cascading-render rules pass. Hacklytics countdown and several admin/portal flows (judging prep, submit, settings, resumes, club scanner, Stripe modal) follow the same approach.

Library/API touch-ups for upgrades: Stripe createPaymentIntent input uses Zod 4’s .prefault({}) instead of .default({}); auth email sending treats result.pending as optional; router tests use RFC‑4122 v4 UUIDs; LazySection drops the no-IntersectionObserver fallback; verify redirect uses location.assign.

Reviewed by Cursor Bugbot for commit 5d166e4. Bugbot is set up for automated code reviews on this repo. Configure here.

Move every workspace package to TypeScript 7.0.2, including
sites/hacklytics2027 (was 5.8.3). No tsconfig or source changes were
needed; tsc --noEmit and next build type checking both pass on 7.

tooling/eslint stays on TypeScript 6.0.2 on purpose: TS 7 no longer
ships the classic JS API, and typescript-eslint (latest 8.70.1) still
requires typescript <6.1.0. Every lint config resolves typescript-eslint
through @query/eslint-config, so pinning it there keeps lint working
while the rest of the repo compiles with TS 7.
Brings every dependency with a same-major update to its latest release,
including Next.js 16.3.6 (latest stable), tRPC 11.19, TanStack Query
5.103, drizzle, Tailwind 4.3, React 19.3, eslint 10.11 and
typescript-eslint 8.70.1. No source changes needed.
- zod 3 -> 4. `.default({})` on the createPaymentIntent input now uses
  `.prefault({})`, which keeps zod 3's behaviour of running the inner
  field defaults. zod 4's `.uuid()` is RFC-strict; the database only
  generates v4 ids (defaultRandom), so the stricter check stays and the
  router test fixtures now use valid UUIDs instead of 0000...0001.
- nodemailer 9 -> 10: `SentMessageInfo.pending` is optional; guard it.
- vitest 4 -> 5: vite is now a peer dependency, so it is installed
  explicitly at the root and in @query/api.
- @stripe/stripe-js 5 -> 9, @stripe/react-stripe-js 3 -> 6, dotenv 16 -> 18,
  qrcode.react 3 -> 4, cross-env 7 -> 10: no code changes needed.
- Drop @types/minimatch and @types/qrcode.react (deprecated; both
  packages ship their own types).
- @types/node stays on 22.x to match engines (node <24).
Upgrades @eslint/js 10, @eslint/compat 2, eslint-config-prettier 10,
eslint-plugin-react-hooks 7 and globals 17, and drops the deprecated
@types/eslint__js.

react-hooks 7's recommended set adds the React Compiler rules. Both
sites build with reactCompiler: true, so these are real findings, not
style. Fixes for the 31 new errors:

- Mounted flags (`useEffect(() => setMounted(true), [])`) become
  `useIsClient()`, a useSyncExternalStore hook in lib/use-is-client.ts.
- Resize listeners that mirror window.innerWidth into state become
  `useWindowWidth()` in lib/use-window-width.ts. Hero reads its prop
  directly instead of copying it into state.
- Forms seeded from query data, and state reset when an input changes,
  use the "adjust state during render" pattern guarded by the previous
  value, so the stale value never paints.
- AdminLayout derives `loading` instead of storing it; the Stripe modal
  memoizes loadStripe; EventFormModal seeds the date in its initial
  state; verify uses window.location.assign; the judging page updates
  its ref in an effect instead of during render.
- LazySection drops the IntersectionObserver-missing fallback (every
  supported browser has it) and the hacklytics countdown seeds its
  first tick from the initial state.
- AttendeesTab: drop a useless initial assignment (no-useless-assignment).
@aamoghS

aamoghS commented Sep 24, 2026

Copy link
Copy Markdown
Member

Duplicate of the stacked PR for this branch (#410 / #411 / #412). Merge order: #406 -> #410 -> #411 -> #412.

@aamoghS aamoghS closed this Sep 24, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5d166e4. Configure here.

}

useEffect(() => {
selectedHackathonRef.current = selectedHackathon;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale judging edition after switch

Medium Severity

selectedHackathonRef now updates in an effect instead of during render, so stillThisRun can still treat an in-flight prepare as current after the organiser switches editions. A late success or CONFLICT then writes prepState and assignConflictId for the previous edition onto the newly selected one.

Additional Locations (1)
Fix in Cursor Fix in Web

Triggered by learned rule: Judging rebuild force targets the refusing edition

Reviewed by Cursor Bugbot for commit 5d166e4. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant