Skip to content

Skip duplicate custom signatures on save - #38

Merged
Timidan merged 1 commit into
masterfrom
fix/dedupe-custom-signatures
Sep 8, 2026
Merged

Skip duplicate custom signatures on save#38
Timidan merged 1 commit into
masterfrom
fix/dedupe-custom-signatures

Conversation

@Timidan

@Timidan Timidan commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Importing the same artifacts folder twice doubled every entry, and with no per-entry delete the only cleanup was wiping the whole library. saveCustomSignature now skips signatures already in the library — covers folder import and manual add, which both route through it.

Importing the same artifacts folder twice doubled every entry, and with
no per-entry delete the only cleanup was wiping the whole library. A
signature already in the library is now left as-is.
@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
web3-toolkit Ready Ready Preview Sep 8, 2026 12:58pm UTC

Copilot AI lite review requested due to automatic review settings September 8, 2026 12:56
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-08T13:00:30.079400Z 8d82b05 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Timidan
Timidan merged commit f6574ce into master Sep 8, 2026
2 of 3 checks passed
@Timidan
Timidan deleted the fix/dedupe-custom-signatures branch September 8, 2026 12:57

Copilot AI 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.

🟡 Changes recommended

The new early-return on duplicates can silently drop newer description/project metadata for existing signatures, and there’s no per-entry update path to recover that information.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR makes saving custom signatures idempotent by skipping inserts when a signature string already exists in the local custom-signature library, preventing duplicate entries when importing the same artifacts folder multiple times.

Changes:

  • Add a duplicate check in saveCustomSignature to avoid pushing an already-saved signature into localStorage.
File summaries
File Description
src/utils/signatureDatabase.ts Prevents duplicate custom signature entries by short-circuiting saves when the same signature already exists.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 508 to 511
const customs = getCustomSignatures();
if (customs.some((c) => c.signature === signature.signature)) return;
customs.push(signature);
localStorage.setItem(STORAGE_KEYS.CUSTOM_SIGNATURES, JSON.stringify(customs));
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