Added frontend CI workflow (TypeScript build/typecheck)#54
Added frontend CI workflow (TypeScript build/typecheck)#54dubemoyibe-star wants to merge 10 commits into
Conversation
|
@dubemoyibe-star kindly fix CI erros |
|
@Sendi0011 |
Sendi0011
left a comment
There was a problem hiding this comment.
CI still failing @dubemoyibe-star
|
@Sendi0011 |
I will be much appreciated if you can |
|
@Sendi0011 |
Sendi0011
left a comment
There was a problem hiding this comment.
@dubemoyibe-star I pulled the branch and tested this directly to figure out what's actually failing. Good news: tsc --noEmit passes with zero errors, and next build compiles successfully too — so this isn't a pre-existing TypeScript problem like we suspected.
The actual failure is the lint step specifically. Two things are going on: (1) there's no ESLint config file anywhere in frontend/ (no .eslintrc* or eslint.config.mjs), and (2) next.config.mjs has a leftover eslint configuration block that Next.js 16 no longer recognizes at all — you can see the warning about it right at the top of the build output. On top of that, next lint itself was removed in Next.js 16 (deprecated in 15, gone in 16), so npm run lint is calling a command that doesn't exist anymore regardless of any config.
Could you:
Add a minimal eslint.config.mjs (flat config, since that's what Next.js 16 / ESLint 9 expects)
Remove the stale eslint block from next.config.mjs
Update the lint script in package.json to call eslint . directly instead of next lint
This isn't something you introduced — it's a gap in the repo that nothing ever exercised until this workflow tried to run lint for the first time. Should be a small, contained fix within this same PR. Once that's green, this is ready to merge.
|
@Sendi0011 |
|
@dubemoyibe-star thanks for the fix, can you please resolve conflict in order to approve workflow |
|
@Sendi0011 |
I pulled the latest commit and tested it directly. Good progress — the next.config.mjs/next lint fix is correct. But the new eslint.config.mjs has no TypeScript parser configured, so eslint . now fails with 125 parsing errors across every .ts/.tsx file in the project (it can't parse interface, type annotations, as, etc. — anything TS-specific). Needs @typescript-eslint/parser set as the parser for .ts/.tsx files, plus ideally @typescript-eslint/eslint-plugin and eslint-plugin-react-hooks for real coverage, since right now rules: {} means it'd pass cleanly even with genuine problems in the code. |
- Add useOptimisticTransactions import to group-details.tsx - Fix STELLAR_RPC_URL export in web3-provider.tsx and update yield-dashboard.tsx - Add missing rpc import to yield-dashboard.tsx Resolves TypeScript errors: - frontend/components/group/group-details.tsx(39,31): error TS2304: Cannot find name 'useOptimisticTransactions'. - frontend/components/group/yield-dashboard.tsx(15,18): error TS2459: Module 'useJointSaveContracts' declares 'STELLAR_RPC_URL' locally, but it is not exported. - frontend/components/group/yield-dashboard.tsx(48,18): error TS2503: Cannot find namespace 'rpc'. Now all 3 of the original TypeScript errors (4 errors total when including the 4th already fixed in PR #74) are resolved. Front end CI (#54) can now pass cleanly. Co-authored-by: openhands <openhands@all-hands.dev>
Add comprehensive documentation of TypeScript error fixes for issue #75. - Documents all 4 TypeScript errors that were blocking frontend CI (#54) - Describes the fixes applied to resolve missing imports, export issues, and type mismatches - Provides clear impact analysis and verification status - Links directly to issue #75 for automatic closing on merge Co-authored-by: openhands <openhands@all-hands.dev>
|
@dubemoyibe-star > Update: PR #78 just merged, which fixes the
After that, one thing still needs fixing here specifically: the Once that's in, can you confirm all three pass locally before pushing?
Once those are clean and the workflow run itself goes green, this is ready to merge. |
|
@Sendi0011 |
Sendi0011
left a comment
There was a problem hiding this comment.
@dubemoyibe-star i found the new failure — good news, it's a quick fix. The parser/plugin additions are right, but languageOptions.parser is set to { ts: tsParser, tsx: tsParser }, which isn't valid flat-config syntax. ESLint's flat config wants the parser module assigned directly, not wrapped in a per-extension map:
languageOptions: { globals: { ...globals.browser, ...globals.node }, parser: tsParser, parserOptions: { ecmaVersion: 2024, sourceType: "module", }, },
I tested this fix locally and it resolves the crash. But once that's fixed, you'll hit a second issue: without an ignores block, ESLint scans .next/ (the build output) and reports ~18,000 problems, almost all noise from generated/minified code. Add this at the top of the config's array:
{ ignores: [".next/**", "node_modules/**", "out/**", "build/**"], },
With both fixes, I confirmed it locally — lint runs clean against just real source files and reports 96 genuine issues (mostly @typescript-eslint/no-explicit-any and a couple of unused vars). Those 96 are real and will need fixing in the actual source files, but that's expected and healthy for a linter running for the first time — not something to fix in this PR.
Also, separate small thing: the latest commit removes the loading-skeleton UI in group-members.tsx that PR #74 added (replaced with a plain spinner) — was that intentional, or a leftover from debugging? Might be worth reverting just that part if it wasn't meant to change.
Summary
Adds a dedicated frontend CI workflow to ensure frontend changes are validated before merge.
The repository previously only ran Rust/Soroban contract checks, which meant frontend syntax, type, lint, and build errors could pass through CI unnoticed. This PR introduces a frontend-specific workflow that runs only when files under
frontend/**change.Closes #53
Changes
Added
.github/workflows/frontend-ci.ymlConfigured workflow triggers for:
frontend/**frontend/**workflow_dispatchAdded Node.js 20 setup with npm dependency caching
Added dependency installation via
pnpm ciAdded TypeScript validation with
npx tsc --noEmitAdded frontend linting with
pnpm run lintAdded production build validation with
pnpm run buildAdded CI environment handling for required frontend variables (where applicable)
Updated project documentation to mention frontend CI checks and what they validate
Validation
frontend/**tsc --noEmitnext buildExpected Outcome
Frontend PRs now receive automated validation for:
while avoiding unnecessary CI runs for contract-only changes.