Skip to content

feat: add skip duplicates#104

Closed
skynet2 wants to merge 1 commit intomasterfrom
skip-duplicates
Closed

feat: add skip duplicates#104
skynet2 wants to merge 1 commit intomasterfrom
skip-duplicates

Conversation

@skynet2
Copy link
Member

@skynet2 skynet2 commented Feb 21, 2026

No description provided.

@gemini-code-assist
Copy link

Summary of Changes

Hello @skynet2, 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 introduces a new feature that allows users to bypass strict duplicate reference checks during transaction imports. Previously, importing transactions with identical internal reference numbers would cause an error. Now, users can opt to automatically resolve these duplicates by having the system append unique suffixes to the reference numbers, thereby providing more flexibility and a smoother experience for importing diverse datasets.

Highlights

  • Frontend UI Enhancement: A new checkbox, 'Skip Duplicate Reference Check', has been added to the transaction import page, providing users with an option to control duplicate handling.
  • Backend Duplicate Handling Logic: The backend CheckDuplicates function now accepts a skipDuplicateRefCheck parameter. When true, instead of erroring on duplicate internal reference numbers, it automatically appends numeric suffixes (e.g., ref_duplicate_1, ref_duplicate_2) to make them unique.
  • Dependency Updates: Go and Node.js dependencies related to buf.build/gen/go/xskydev/go-money-pb have been updated to their latest versions.
Changelog
  • frontend/package-lock.json
    • Updated the version of the @buf/xskydev_go-money-pb.bufbuild_es dependency.
  • frontend/src/app/pages/transactions/transactions-import.component.html
    • Added a new p-checkbox element with the label 'Skip Duplicate Reference Check' and bound it to skipDuplicateReferenceCheck.
  • frontend/src/app/pages/transactions/transactions-import.component.ts
    • Added a new public property skipDuplicateReferenceCheck initialized to false.
    • Included skipDuplicateReferenceCheck in the ParseTransactionsRequestSchema when calling parseTransactions.
    • Included skipDuplicateReferenceCheck in the ImportTransactionsRequestSchema when calling importTransactions.
  • go.mod
    • Updated the versions of buf.build/gen/go/xskydev/go-money-pb/connectrpc/go and buf.build/gen/go/xskydev/go-money-pb/protocolbuffers/go.
  • go.sum
    • Updated checksums for the buf.build/gen/go/xskydev/go-money-pb dependencies.
  • pkg/importers/importer.go
    • Imported the fmt package.
    • Modified the CheckDuplicates function signature to include a skipDuplicateRefCheck boolean parameter.
    • Updated the logic within CheckDuplicates to, if skipDuplicateRefCheck is true, append numeric suffixes to duplicate internal reference numbers instead of returning an error.
    • Updated the Import method to pass the SkipDuplicateReferenceCheck from the request to ParseInternal.
    • Updated the ParseInternal method to pass the SkipDuplicateReferenceCheck from the request to CheckDuplicates.
  • pkg/importers/importer_test.go
    • Modified existing CheckDuplicates test calls to pass false for the new skipDuplicateRefCheck parameter.
    • Added a new test case named 'skip duplicate reference check adds suffix' to verify the behavior when skipDuplicateRefCheck is true, ensuring duplicates are suffixed.
Activity
  • No human activity has been recorded on this pull request yet.
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.

@skynet2 skynet2 closed this Feb 21, 2026
@skynet2 skynet2 deleted the skip-duplicates branch February 21, 2026 15:17
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 feature to skip duplicate reference checks during transaction imports. The changes span the frontend to add a UI option and the backend to implement the logic. While the feature is a good addition, I've found a bug in the duplicate handling logic in pkg/importers/importer.go that fails to detect duplicates within a single transaction's reference list. I've provided a detailed comment with a suggested refactoring to address this issue.

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.

1 participant