Skip to content

refactor: eliminate type duplication between Extension and Web-view#94

Merged
kubrickcode merged 1 commit into
mainfrom
develop/shlee/74
Nov 18, 2025
Merged

refactor: eliminate type duplication between Extension and Web-view#94
kubrickcode merged 1 commit into
mainfrom
develop/shlee/74

Conversation

@kubrickcode

Copy link
Copy Markdown
Owner

ButtonConfig and RefreshButtonConfig were separately defined in Extension and Web-view
Unified types in src/shared/types.ts for consistency

fix #74

ButtonConfig and RefreshButtonConfig were separately defined in Extension and Web-view
Unified types in src/shared/types.ts for consistency

fix #74
@github-actions github-actions Bot added the refactor Refactoring code label Nov 18, 2025
@kubrickcode

Copy link
Copy Markdown
Owner Author

/gemini review

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @kubrickcode, 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 addresses type duplication between the extension and web-view components by centralizing common type definitions into a new shared file. This refactoring enhances consistency, reduces redundancy, and simplifies future maintenance by ensuring that core interfaces are defined in one place and imported across the codebase.

Highlights

  • Type Centralization: Moved ButtonConfig and RefreshButtonConfig type definitions, along with message types, into a new src/shared/types.ts file to serve as a single source of truth.
  • Duplication Elimination: Removed duplicate type definitions from src/extension/src/types.ts and src/web-view/src/types.tsx, replacing them with imports from the new shared types file.
  • TypeScript Configuration Update: Updated src/extension/tsconfig.json to include the new ../shared/**/* directory, ensuring proper type resolution for the extension.
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 effectively refactors duplicated types into a shared types.ts file, which is a great improvement for maintainability. My review includes a couple of suggestions to align the new and modified files with the repository's style guide, specifically regarding alphabetical ordering of types and their properties. Once these minor adjustments are made, the changes look good to go.

Comment thread src/extension/src/types.ts
Comment thread src/shared/types.ts
@kubrickcode kubrickcode merged commit a8447dd into main Nov 18, 2025
9 checks passed
@kubrickcode kubrickcode deleted the develop/shlee/74 branch November 18, 2025 11:29
@kubrickcode

Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 0.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Refactoring code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create shared types package and unify ButtonConfig type

1 participant