feat(import): dedup dialog when importing duplicate connections#1462
feat(import): dedup dialog when importing duplicate connections#1462J2TeamNNL wants to merge 8 commits into
Conversation
…ization, add tests
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fa5b543b71
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| normalizedLookupKey(connection.host), | ||
| String(connection.port), | ||
| normalizedLookupKey(connection.database), | ||
| normalizedLookupKey(connection.username) |
There was a problem hiding this comment.
Include Redis DB in duplicate keys
For Redis connections the selected database is stored in redisDatabase (and connection setup falls back to it when database is empty), but this new duplicate key only compares database. Importing a Redis connection for DB 1 when an otherwise identical DB 0 connection already exists will be marked as a duplicate, so choosing Replace can overwrite the wrong saved connection or the distinct DB is skipped by default.
Useful? React with 👍 / 👎.
Summary
(host, port, database, username), case-insensitiveTest plan
ConnectionImportServiceTestsall pass