fix(web-ui): resolve react-hooks/exhaustive-deps warnings (#682)#698
Conversation
Resolve the 3 remaining react-hooks/exhaustive-deps warnings (the other 4 from the issue were cleared by #658's eslint-10 upgrade) and enforce --max-warnings 0 to prevent regressions: - proof/[req_id]/page.tsx: add reqId to mount effect deps - BatchExecutionMonitor: hoist batchStatus, depend on it (preserves status-only re-run intent) - DiscoveryPanel: reorder startNewSession before initSession, add to deps - package.json: lint now runs with --max-warnings 0 Closes #682
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
WalkthroughThree ChangesESLint Warning Fixes and Lint Gate Hardening
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code ReviewGood, focused PR. Four small changes, all behavior-preserving. Here is the breakdown. package.json — Adding BatchExecutionMonitor.tsx — Hoisting proof/[req_id]/page.tsx — Adding DiscoveryPanel.tsx — The reorder is correct and the reasoning is sound. The TDZ situation is real: with Confirming the "no back-dependency" claim: Summary
Verification evidence (0 warnings, 1020 tests passing, build succeeds) matches the scope of the changes. Ready to merge. |
Closes #682.
What
Resolves the remaining
react-hooks/exhaustive-depswarnings and enforces zero-warnings in CI lint.Scope note: The issue listed 7 warnings. By the time this ran (after #658's eslint-10 + react-hooks plugin upgrade, which the issue explicitly sequenced before this work), only 3 remained — the 4
useMemowarnings inStressTestModal/GitHubIssueImportModalwere already cleared by that upgrade.Changes
proof/[req_id]/page.tsxreqIdto the mount effect deps (setters are stable; correctly reloads session filters if the route param changes)BatchExecutionMonitor.tsxconst batchStatus = batch?.statusand depend on it — preserves the original "re-run the poll only when status changes" intentDiscoveryPanel.tsxstartNewSessionbeforeinitSession(no back-dependency) and add it toinitSession's deps, avoiding a TDZ referencepackage.jsonlintnow runseslint . --max-warnings 0to prevent regressions (issue's optional acceptance criterion)All changes are behavior-preserving.
Verification (outcome evidence)
npm run lint→ exit 0, 0 warnings (was 3 before)npm test→ 1020 passed / 91 suitesnpm run build→ succeedsAcceptance criteria
--max-warnings 0enforced in the lint stepKnown limitations
None. The 2 deliberate
eslint-disablelines for mount-only effects (BatchExecutionMonitorinitial fetch,DiscoveryPanelauto-init) are pre-existing and intentionally left as-is.Summary by CodeRabbit
Bug Fixes
Chores