Skip to content

feat(settings): copy an existing connection when adding one - #43

Merged
ProjectAJ14 merged 1 commit into
mainfrom
feat/copy-connection
Dec 1, 2026
Merged

ProjectAJ14 merged 1 commit into
mainfrom
feat/copy-connection

Conversation

@ProjectAJ14

Copy link
Copy Markdown
Owner

What

The Add connection modal now has a Copy from picker. Choosing an existing connection fills in type, host, port, database, username, default schema, schemas and env. The ID is left blank, and the name becomes <name> (copy).

Secrets

Password and URI are never copied, and the picker says so. The client never holds them (the API only reports passwordSet/uriSet). mergeUpdate in server/routes/settings.ts already refuses to reuse a stored password at a new destination, so that stays the rule. There are no server changes.

Tests

  • 4 new tests in settings-page.connections.test.tsx:
    • the prefill
    • the createConnection payload (new id, no password/URI)
    • optional-field fallbacks
    • the picker hidden when editing, when there are no connections, and when the list failed to load
  • npm run verify passes at 100% coverage.
  • Checked by hand on local Postgres: copied a DEV connection, pointed it at the QA database, saved it, and ran a query on the copy (400 rows).

🤖 Generated with Claude Code

The Add connection modal gets a "Copy from" picker that prefills type,
host, port, database, username, schemas and env from an existing
connection. The ID is left blank and the name gets a " (copy)" suffix.
Password and URI are never copied: the client never holds them, and the
server already refuses to reuse a stored password at a new destination.
@ProjectAJ14
ProjectAJ14 merged commit ef150ad into main Dec 1, 2026
1 check passed
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.10.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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant