fix: resolve Lighthouse CI and test failures - #258
Merged
Conversation
- Add CHROME_PATH env var to lighthouse.yml for Chrome detection - Integrate PullToRefresh wrapper into Transfers page - Add pagination (PAGE_SIZE=5), selection toolbar, and selection state - Update TransferRow with has-checkbox class and checkbox grid styles - Run Prettier formatting on all files
Contributor
Author
|
done please check |
Contributor
Author
|
CI passed, please merge |
- Add Chrome installation step (browser-actions/setup-chrome@v1) before lhci - Fix missing React imports (useState, useEffect) in Transfers.jsx - Add missing component imports (Link, Pagination, SelectionToolbar) - Replace duplicated inline JSX with renderContent() call - Integrate PullToRefresh wrapper for mobile refresh support - Fix Prettier formatting across all files
npm 11 generates lockfile format incompatible with npm 10 used in CI (node 20). Regenerating with npm 10 ensures npm ci succeeds in the Lighthouse workflow.
Delete and regenerate package-lock.json fresh with npm 10 to resolve missing package entries (@types/json-schema, ignore, type-check, word-wrap) that caused npm ci to fail with EUSAGE in CI.
- Fix Transfers.jsx: re-apply missing React imports (useState, useEffect), component imports (Link, Pagination, PullToRefresh, SelectionToolbar), replace duplicated inline JSX with renderContent() + PullToRefresh - Fix AppContext: remove throw err from connect() to prevent unhandled promise rejections in onClick handlers - Fix wallet tests: vi.clearAllMocks → vi.restoreAllMocks to prevent mock bleed across tests; add await waitFor for disconnect assertions; use 35s vitest timeout for connection timeout test - Bump CI Node.js from 20 to 22 to resolve deprecation warning - Fix Prettier formatting across all changed files
- AppProvider accepts connectTimeoutMs prop (default 30000)
- connect() uses the configurable timeout instead of hardcoded 30000
- Wallet test passes connectTimeoutMs={100} eliminating 30s wait
- Add JSDoc for AppProvider props including connectTimeoutMs
Contributor
|
Tidy PR, appreciate it. ✅ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds Prettier as the opinionated code formatter for the RemitFlow frontend, formats the entire codebase, integrates Prettier with the existing ESLint configuration, and adds automated format checking to CI.
Why Prettier?
npm run formathandles it.npm run format:checkruns on every PR, preventing unformatted code from merging.Changes Made
1. New Dependencies
prettier^3.9.5eslint-config-prettier^10.1.82. New Configuration Files
.prettierrc— Prettier configuration matching the existing.editorconfigconventions:all).prettierignore— Excludes build artifacts and generated files:node_modules/,dist/,coverage/storybook-static/,.lighthouseci/package-lock.json3. ESLint Integration
Updated
.eslintrc.jsonto addprettieras the last entry in theextendsarray. This ensureseslint-config-prettierdisables all ESLint rules that would conflict with Prettier's formatting choices.4. New npm Scripts
npm run formatprettier --write .npm run format:checkprettier --check .5. CI Integration
Updated
.github/workflows/lighthouse.ymlto include a "Check formatting (Prettier)" step that runsnpm run format:checkafter dependency installation and before the build step. Every PR is now automatically validated for formatting consistency.6. Codebase Formatting
All ~150 source files across the project were formatted with Prettier:
src/— Components, pages, hooks, context, services, toolkit, utils, lib, constantstest/— Integration tests, unit tests, component tests, library tests.storybook/,vite.config.js,lighthouserc.json,index.html7. Documentation
Updated
README.mdto document the newformatandformat:checkscripts in the Scripts section.Verification
npm run format:checknpx vite buildnpm test(non-pre-existing failures)Files Changed
Closes #82## Summary
Fixes the failing Lighthouse CI and 4 failing integration tests.
Changes
CHROME_PATH: /usr/bin/google-chromeenv var to fixChrome installation not found<PullToRefresh onRefresh={reload}>has-checkboxCSS class and grid styles for the checkbox columnVerification