fix(example-apps): clear eslint issues in dashproof-lab and dashmint-lab#79
Conversation
dashproof-lab: - Add "coverage" to globalIgnores so Vitest coverage HTML reporter scripts stop triggering unused-disable warnings (matches dashnote). - Replace HistoryPanel's prop-watching useEffect with the React-recommended "reset state during render" pattern, fixing react-hooks/set-state-in-effect. Initialize prevRequestToken to undefined so the panel still fires on its first render (the parent mounts it fresh with the token already bumped). - Add regression tests covering the parent-dispatched chain deep-link and the fire-once-per-token invariant. dashmint-lab: - Rename the Playwright fixture-API second-arg callback parameter from `use` to `provide` (matching dashproof-lab's convention) so that eslint-plugin-react-hooks v6 stops flagging `await use(page)` as a misplaced React Hook call. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis PR refactors the Dashmint-lab Playwright fixture to use the ChangesDashmint-lab Playwright fixture update
Dashproof-lab HistoryPanel state reset refactor
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 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)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
coverageto ESLintglobalIgnores(matches dashnote), replaceHistoryPanel's prop-watchinguseEffectwith the React-recommended "reset state during render" pattern to fixreact-hooks/set-state-in-effect, and add two regression tests for the chain deep-link path.usetoprovidesoeslint-plugin-react-hooksv6 stops flaggingawait use(page)as a misplaced React Hook call.Notes
HistoryPanelchange also fixes a subtle latent bug: the newprevRequestTokenis initialized toundefined(not torequestToken) so the panel still fires its reset on first render — the parent mounts a fresh panel with the token already bumped, so a same-value initializer would silently swallow the dispatch.npm run lint(tsc) errors insetupDashClient.mjsare intentionally out of scope for this PR.Test plan
cd example-apps/dashproof-lab && npm run lint— zero errors and warningscd example-apps/dashproof-lab && npm run test— 139/139 pass (was 137; two new regression tests)cd example-apps/dashproof-lab && npm run build— cleancd example-apps/dashmint-lab && npm run lint— zero errorscd example-apps/dashmint-lab && npm run test— 88/88 passcd example-apps/dashmint-lab && npm run build— cleancd example-apps/dashproof-lab && npm run test:e2e— manual run if you want to confirm the "View chain history" deep link still works against testnet🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Tests