Skip duplicate custom signatures on save - #38
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🟡 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
saveCustomSignatureto 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.
| const customs = getCustomSignatures(); | ||
| if (customs.some((c) => c.signature === signature.signature)) return; | ||
| customs.push(signature); | ||
| localStorage.setItem(STORAGE_KEYS.CUSTOM_SIGNATURES, JSON.stringify(customs)); |
Importing the same artifacts folder twice doubled every entry, and with no per-entry delete the only cleanup was wiping the whole library.
saveCustomSignaturenow skips signatures already in the library — covers folder import and manual add, which both route through it.