Skip to content

fix(auth): include fetch in the retry callback deps - #57

Merged
JOY (JOY) merged 1 commit into
devfrom
fix/auth-compiler-deps
Sep 22, 2026
Merged

JOY (JOY) merged 1 commit into
devfrom
fix/auth-compiler-deps

Conversation

@JOY

Copy link
Copy Markdown

What kind of change does this PR introduce?

Bug fix (lint/compiler compliance). One-line dependency fix in apps/frontend/src/components/auth/register.tsx: the AuthErrorState retry useCallback now includes fetch in its dependency array ([attempts, fetch]). No behavior change.

Why was this change needed?

The eslint 9 SARIF pipeline (live since the eslint 9 migration) flagged the auth error component during the dev->main promote check: react-hooks/preserve-manual-memoization (error level - React Compiler skipped optimization because the inferred deps did not match the manually specified ones) plus an exhaustive-deps warning for the missing fetch reference. Aligning the deps resolves both and lets the compiler preserve its optimization.

Technical Details & Scope

  • apps/frontend/src/components/auth/register.tsx: single line, deps array of the retry callback only.

Verification & Testing

  • CI build.yml + branding-guard on this PR; the promote PR re-runs the SARIF check and should report zero new alerts after this lands.

QA

  1. CI green on this PR
  2. After merge, the dev->main promote PR re-runs the ESLint SARIF check - confirm zero new ESLint alerts
  3. Confirm the auth error page still renders and retries (manual QA on beta after the promote deploy)

Checklist:

  • My code follows the project's code style and architectural conventions.
  • Local verification - CI is the gate.
  • Branding guard - CI gate on this PR.
  • Tests - existing suites unaffected.
  • Documentation n/a.
  • No secrets included.
  • QA section filled with real steps.

The React Compiler flagged the manual deps as not matching the inferred
ones (missing fetch), skipping memoization optimization for the auth error
component (react-hooks/preserve-manual-memoization error-level) plus an
exhaustive-deps warning. Aligning the dependency array lets the compiler
preserve its optimization.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request updates the dependency array of a hook in the AuthErrorState component within register.tsx to include fetch alongside attempts. There are no review comments, and I have no feedback to provide.

@JOY
JOY (JOY) merged commit 85e72e1 into dev Sep 22, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant