Skip to content

Conversation

@osis
Copy link
Collaborator

@osis osis commented Dec 26, 2025

Short description of work done

Some long overdue action file refactoring.

PR Checklist

  • I have run linter locally
  • I have run unit and integration tests locally

@osis osis requested a review from a team as a code owner December 26, 2025 21:01
@changeset-bot
Copy link

changeset-bot bot commented Dec 26, 2025

⚠️ No Changeset found

Latest commit: bce6191

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@gemini-code-assist
Copy link

Summary of Changes

Hello @osis, 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 refactors the action structure for both Coinbase and MetaMask wallets. The primary goal is to enhance code organization and maintainability by decomposing large, feature-rich files into smaller, more focused modules. This restructuring also centralizes common browser interaction patterns into a shared helper file, which reduces redundancy and promotes reusability across different wallet implementations, ultimately making the codebase easier to navigate and extend.

Highlights

  • Centralized Action Helpers: Introduced generic performPopupAction and performSidepanelAction in src/helpers/actions.ts to centralize common interaction patterns with browser popups and sidepanels, reducing code duplication.
  • Coinbase Wallet Actions Refactoring: The monolithic src/wallets/coinbase/actions.ts file was removed. Its functionalities were broken down and distributed into new, dedicated files under src/wallets/coinbase/actions/ based on their purpose (e.g., account, network, token, transaction, setup, and utilities).
  • MetaMask Wallet Actions Refactoring: Similar to Coinbase, MetaMask actions were reorganized. Multiple individual action files (e.g., addNetwork.ts, approve.ts) were removed, and their contents were consolidated into new, functionally grouped files under src/wallets/metamask/actions/.
  • MetaMask Utility Renaming and Streamlining: The src/wallets/metamask/actions/util.ts file was renamed to utils.ts. The generic performPopupAction and performSidepanelAction functions were removed from it, as they are now centralized in src/helpers/actions.ts.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

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 significant and well-executed refactoring of the wallet action files, organizing them into a more modular and maintainable structure. The separation of concerns for both Coinbase and MetaMask wallets is much clearer now. My review focuses on some minor improvements for consistency and code cleanup that were noticed during this refactoring. I've pointed out some misleading parameter names, a typo, and some leftover commented-out code that could be removed.

@osis osis force-pushed the actions-cleanup branch 4 times, most recently from 2d0c5d5 to 0a5fc3a Compare December 26, 2025 22:00
@osis osis merged commit 8714de4 into main Dec 26, 2025
5 checks passed
@osis osis deleted the actions-cleanup branch December 26, 2025 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants