Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.

chore: add quality tooling, build fixes, and lint cleanup#1

Merged
abhiraj-mengade merged 2 commits into
mainfrom
chore/quality-tooling-and-build-fixes
Feb 28, 2026
Merged

chore: add quality tooling, build fixes, and lint cleanup#1
abhiraj-mengade merged 2 commits into
mainfrom
chore/quality-tooling-and-build-fixes

Conversation

@Spoorthi-Hokrana

@Spoorthi-Hokrana Spoorthi-Hokrana commented Feb 28, 2026

Copy link
Copy Markdown
Contributor

Adds Husky hooks, Prettier, lint-staged, commitlint, and GitHub Actions CI.

@vercel

vercel Bot commented Feb 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
relay Ready Ready Preview, Comment Feb 28, 2026 3:52pm

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the project's development workflow and code quality by integrating a suite of modern quality tooling. It addresses several build-related issues, ensuring a more robust and consistent development environment. Additionally, extensive linting and formatting efforts have been undertaken to improve code consistency and maintainability across the codebase.

Highlights

  • Quality Tooling Integration: Introduced Husky for Git hooks (pre-commit, commit-msg, pre-push), lint-staged to process only staged files, Prettier for consistent code formatting, and commitlint for conventional commit messages. GitHub Actions CI is configured to enforce linting, formatting, type checking, testing, coverage, and build checks.
  • Build System Enhancements: Implemented getMnemonic() in wallet utilities for the poker page, added Supabase environment variable fallbacks to ensure successful builds without a local .env file, and introduced a shared supabase-admin client for API routes to centralize Supabase interactions.
  • Linting and Code Cleanup: Configured ESLint to ignore the dealer/ directory (Node.js scripts), resolved numerous unused imports and variables, added argsIgnorePattern for underscore-prefixed parameters in ESLint rules, and formatted the entire codebase with Prettier for improved readability and consistency.
  • Code Formatting and Readability: Applied consistent code formatting across various files, including markdown documents, TypeScript files, and UI components, to enhance overall code readability and maintainability.
  • API Route Refactoring: Refactored numerous API routes to utilize the newly introduced shared supabaseAdmin client, removing redundant createClient calls and streamlining Supabase interactions.
Changelog
  • .husky/commit-msg
    • Added a new Git hook to enforce conventional commit message standards.
  • .husky/pre-commit
    • Added a new Git hook to run lint-staged before committing changes.
  • .husky/pre-push
    • Added a new Git hook to run lint and tests before pushing changes.
  • .lintstagedrc.json
    • Added configuration for lint-staged to lint and format only staged files.
  • .prettierignore
    • Added a new file to specify files and directories to be ignored by Prettier.
  • .prettierrc
    • Added a new file to configure Prettier for consistent code formatting.
  • README.md
    • Updated markdown table formatting and code block formatting.
  • SUPABASE_SETUP.md
    • Updated markdown table formatting.
  • TECHNICAL_ARCHITECTURE.md
    • Updated markdown table formatting and code block formatting.
  • app/api/activity/comment/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/activity/comments/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/activity/join/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/activity/leave/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/activity/like/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/agents/[agentId]/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/agents/claim/route.ts
    • Simplified NextResponse.json calls.
  • app/api/agents/me/regenerate-claim-token/route.ts
    • Simplified NextResponse.json calls.
  • app/api/agents/me/route.ts
    • Simplified NextResponse.json calls.
  • app/api/agents/register/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/agents/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/auth/nonce/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/auth/verify/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/championship/[challengeId]/agents/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/championship/[challengeId]/bets/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/championship/[challengeId]/bets/summary/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/championship/[challengeId]/claim/route.ts
    • Simplified NextResponse.json calls and BigInt arithmetic formatting.
  • app/api/championship/[challengeId]/finalize/route.ts
    • Simplified NextResponse.json calls.
  • app/api/championship/[challengeId]/my-status/route.ts
    • Simplified NextResponse.json calls.
  • app/api/championship/[challengeId]/results/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/championship/[challengeId]/reveal/route.ts
    • Simplified NextResponse.json calls and date calculations.
  • app/api/championship/[challengeId]/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/championship/[challengeId]/submit/route.ts
    • Simplified NextResponse.json calls.
  • app/api/championship/[challengeId]/withdraw/route.ts
    • Simplified NextResponse.json calls.
  • app/api/championship/bet/route.ts
    • Simplified NextResponse.json calls.
  • app/api/championship/create/route.ts
    • Simplified NextResponse.json calls.
  • app/api/championship/enroll/route.ts
    • Simplified NextResponse.json calls.
  • app/api/championship/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/championship/vote/route.ts
    • Simplified NextResponse.json calls and Supabase insert call.
  • app/api/community/create/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/community/join/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/community/leave/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/community/members/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/community/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/community/search/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/friends/[walletAddress]/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/friends/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/poker/bet/route.ts
    • Simplified conditional checks and error handling.
  • app/api/poker/claim/route.ts
    • Simplified conditional checks and error handling.
  • app/api/poker/tables/route.ts
    • Simplified conditional checks and error handling.
  • app/api/user/chain-accounts/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/user/nicknames/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/api/user/profile/route.ts
    • Refactored to use supabaseAdmin client and simplified NextResponse.json calls.
  • app/chains/evm/adapter.ts
    • Simplified conditional assignments and function calls.
  • app/chains/evm/chains.ts
    • Simplified icon URL assignment.
  • app/chains/near/adapter.ts
    • Simplified function calls and variable assignments.
  • app/chains/near/config.ts
    • Simplified icon URL assignment.
  • app/chains/polkadot/adapter.ts
    • Simplified function calls and variable assignments.
  • app/chains/polkadot/config.ts
    • Simplified wsEndpoints array assignment.
  • app/chains/registry.ts
    • Simplified function signature.
  • app/chains/solana/adapter.ts
    • Simplified function calls and variable assignments.
  • app/chains/solana/config.ts
    • Simplified icon URL assignment.
  • app/contexts/NetworkModeContext.tsx
    • Simplified getInitialNetworkMode logic.
  • app/create-password/page.tsx
    • Simplified style object assignments and conditional rendering for icons.
  • app/dashboard/championship/[challengeId]/page.tsx
    • Simplified conditional rendering and function calls.
  • app/dashboard/championship/agents/page.tsx
    • Simplified conditional rendering and label assignments.
  • app/dashboard/championship/create/page.tsx
    • Simplified conditional checks and error messages.
  • app/dashboard/championship/page.tsx
    • Simplified conditional rendering.
  • app/dashboard/community/[communityId]/ActivityDetailSlideIn.tsx
    • Simplified conditional rendering and string interpolation.
  • app/dashboard/community/[communityId]/CreateActivitySlideIn.tsx
    • Simplified conditional rendering and label assignments.
  • app/dashboard/community/[communityId]/page.tsx
    • Simplified image rendering and conditional checks.
  • app/dashboard/community/community-coins/page.tsx
    • Simplified conditional rendering and button styling.
  • app/dashboard/community/create-community/page.tsx
    • Simplified conditional rendering and label assignments.
  • app/dashboard/community/page.tsx
    • Simplified conditional rendering.
  • app/dashboard/layout.tsx
    • Simplified prop destructuring.
  • app/dashboard/poker/[tableId]/page.tsx
    • Added getMnemonic import and removed walletAddress from useAuth destructuring.
  • app/dashboard/poker/page.tsx
    • Removed unused formatEther import and simplified conditional rendering.
  • app/dashboard/settings/friends/AddFriendSheet.tsx
    • Simplified conditional rendering and button styling.
  • app/dashboard/settings/friends/EditFriendSheet.tsx
    • Simplified conditional rendering and button styling.
  • app/dashboard/settings/friends/FriendDetailSheet.tsx
    • Simplified address truncation and remark display.
  • app/dashboard/settings/friends/page.tsx
    • Simplified conditional rendering and friend display.
  • app/dashboard/settings/page.tsx
    • Simplified conditional rendering and prop assignments.
  • app/dashboard/settings/sheets/ChangePasswordSheet.tsx
    • Simplified conditional rendering and label assignments.
  • app/dashboard/settings/sheets/SeedPhraseSheet.tsx
    • Simplified conditional rendering and label assignments.
  • app/dashboard/settings/sheets/TermsSheet.tsx
    • Simplified paragraph formatting.
  • app/dashboard/settings/transaction-history/page.tsx
    • Simplified conditional rendering and label assignments.
  • app/dashboard/staking/page.tsx
    • Simplified prop destructuring and conditional rendering.
  • app/dashboard/wallet/import-wallet/page.tsx
    • Simplified conditional rendering and error message display.
  • app/dashboard/wallet/page.tsx
    • Simplified conditional rendering and component props.
  • app/dashboard/wallet/payment-review/page.tsx
    • Simplified conditional rendering and amount formatting.
  • app/dashboard/wallet/receive/page.tsx
    • Simplified conditional rendering and token data handling.
  • app/dashboard/wallet/scan/page.tsx
    • Simplified conditional rendering and address validation.
  • app/dashboard/wallet/send/page.tsx
    • Simplified conditional rendering and label assignments.
  • app/db/supabase.ts
    • Added fallback values for Supabase environment variables during build, updated auth token storage keys, and simplified conditional checks.
  • app/globals.css
    • Formatted CSS keyframes for better readability.
  • app/login/page.tsx
    • Simplified conditional rendering and icon components.
  • app/page.tsx
    • Simplified conditional rendering and icon imports.
  • app/services/escrow/solana.ts
    • Simplified function signatures for escrow operations.
  • app/services/escrow/types.ts
    • Simplified interface definitions for escrow parameters.
  • app/services/poker/contract.ts
    • Simplified ABI definition and state label mapping.
  • app/services/poker/index.ts
    • Simplified function signatures and variable assignments.
  • app/services/signing.ts
    • Simplified function signatures for key derivation.
  • app/services/treasury.ts
    • Simplified constant definitions and BigInt arithmetic.
  • app/types/constants.ts
    • Ensured a newline at the end of the file.
  • app/types/frontend_type.ts
    • Simplified interface definitions.
  • app/utils/api-auth.ts
    • Replaced direct Supabase client creation with supabaseAdmin import.
  • app/utils/auth.ts
    • Simplified constant definitions and conditional checks.
  • app/utils/crypto.ts
    • Simplified conditional checks and function signatures.
  • app/utils/defillama.ts
    • Simplified function signature.
  • app/utils/password.ts
    • Simplified function definition.
  • app/utils/qr.ts
    • Simplified function signatures and QR code generation logic.
  • app/utils/staking.ts
    • Simplified function signatures and conditional checks.
  • app/utils/supabase-admin.ts
    • Added a new file to provide a shared Supabase admin client for server-side operations.
  • app/utils/wallet.ts
    • Simplified function signatures and conditional checks.
  • app/welcome/page.tsx
    • Simplified conditional rendering and button styling.
  • commitlint.config.js
    • Added a new file to configure commitlint rules.
  • components/SeedPhraseDisplay.tsx
    • Simplified conditional rendering and style assignments.
  • components/action-button.tsx
    • Simplified component props.
  • components/championship/agent-card.tsx
    • Simplified conditional rendering and text display.
  • components/championship/bet-panel.tsx
    • Simplified text display.
  • components/championship/challenge-card.tsx
    • Simplified text display.
  • components/championship/phase-timeline.tsx
    • Simplified array definition and conditional rendering.
  • components/championship/results-panel.tsx
    • Simplified text display.
  • components/championship/vote-panel.tsx
    • Simplified text display.
  • components/community/community-list.tsx
    • Simplified component props and conditional checks.
  • components/community/index.ts
    • Simplified export statements.
  • components/community/swipeable-community-item.tsx
    • Simplified conditional checks and event handlers.
  • components/crypto/ChainSelector.tsx
    • Simplified component props and conditional rendering.
  • components/crypto/CryptoIcon.tsx
    • Simplified component props and conditional rendering.
  • components/crypto/TokenPicker.tsx
    • Simplified conditional rendering and text display.
  • components/dashboard/BottomNav.tsx
    • Simplified conditional rendering and prop assignments.
  • components/dashboard/Header.tsx
    • Simplified component props.
  • components/dashboard/index.ts
    • Removed trailing newline.
  • components/layout/PageHeader.tsx
    • Simplified text display.
  • components/layout/SlideInPage.tsx
    • Simplified class name assignment.
  • components/staking/PoolDetailSheet.tsx
    • Simplified conditional rendering and text display.
  • components/staking/PoolList.tsx
    • Simplified component props and text display.
  • components/staking/StakeActionSheet.tsx
    • Simplified conditional rendering and text display.
  • components/staking/StakingStatusCard.tsx
    • Simplified conditional rendering and text display.
  • components/ui/button.tsx
    • Simplified component props and conditional rendering.
  • components/ui/input.tsx
    • Simplified component props.
  • components/ui/sheet.tsx
    • Simplified component props and class name assignments.
  • components/ui/switch.tsx
    • Simplified component props.
  • components/ui/tab-button.tsx
    • Simplified conditional rendering.
  • components/ui/textarea.tsx
    • Simplified component props.
  • contracts/README.md
    • Updated markdown table formatting.
  • contracts/polkadot/arch.md
    • Updated markdown table formatting and added newlines for clarity.
  • contracts/solana/championship_escrow.json
    • Simplified discriminator arrays and docs fields.
  • dealer/dealer.js
    • Simplified conditional checks and logging.
  • dealer/package-lock.json
    • Updated package-lock.json to reflect dependency changes.
  • dealer/package.json
    • Updated dependencies.
  • dealer/poker.js
    • Simplified function definitions and conditional checks.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/ci.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@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 introduces a comprehensive set of quality tooling, including Husky, lint-staged, Prettier, and commitlint, which is a great step towards improving code quality and consistency. The refactoring of the Supabase client into a shared supabase-admin module is a significant improvement for maintainability. The build fixes, such as adding environment variable fallbacks, will make the CI/CD process more robust. The codebase has been nicely cleaned up with lint fixes and formatting. I've found a couple of minor issues in the documentation formatting.

Comment thread README.md
└─────────────────────────────────────────────────────────────────────────────┘
```

````

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The closing code block uses four backticks (````) while the opening one uses three (```). This can lead to rendering issues in some markdown parsers. Please use three backticks to close the code block for consistency.

Suggested change
````

Comment thread README.md
git clone https://github.com/MontaQ-Labs/relay-new.git
cd relay-new
```
````

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The closing code block uses four backticks (````) while the opening one uses three (```bash). This can lead to rendering issues in some markdown parsers. Please use three backticks to close the code block for consistency.

Suggested change
````

@abhiraj-mengade abhiraj-mengade merged commit 2d56d8e into main Feb 28, 2026
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants