Skip to content

Keep the Default connection setup blank - #158

Open
benandez wants to merge 2 commits into
mainfrom
claude/default-setup-stays-blank
Open

benandez wants to merge 2 commits into
mainfrom
claude/default-setup-stays-blank

Conversation

@benandez

@benandez benandez commented Dec 6, 2026

Copy link
Copy Markdown
Member

Problem

In Settings > Connection, "Default" was an ordinary saved setup. Saving a server while it was loaded overwrote it. Remove setup is disabled for the active setup, which Default usually is, so there was no clean way back to blank defaults.

Change

  • Store::save_setup refuses to save filled server, address or port fields, or a new name, into Default (id 1). The message is "Default keeps blank servers. Give these settings a new setup name, then save."
  • From the form, a renamed Default saves as a new setup, so typing a name is all it takes. Default itself is unchanged.
  • On/off choices (Hide my address, Local only, router, data use) still save to Default, so the pre-join router question keeps working.
  • Default can't be removed (store and button).
  • Migration on load: a Default that already holds fields, or was renamed, becomes "Default (edited)". It stays active, so the next call is unchanged. A blank Default is added back, and also if it had been removed. When all 16 setups are in use, nothing is moved (lean: comment).

Not covered

The "can't save a blank server" report isn't reproduced. Blank is accepted by every save check. The likely cause is VEIL_RENDEZVOUS being set, which shows as "Replaced by … for now". That's left out of this PR.

Testing

  • New: default_keeps_blank_servers_and_its_name_and_always_stays and a_removed_default_comes_back_blank_and_the_active_setup_is_kept.
  • Updated: tests that saved servers straight into Default now name a setup, and the legacy migration test now expects "Default (edited)". failed_validation_preserves_the_unsaved_draft checks the rename step.
  • Not built locally because of a benchmark on this machine. CI is the first compile and test run.

🤖 Generated with Claude Code

Saving servers while Default was loaded wrote them into Default, and the
active setup cannot be removed, so the defaults were lost for good.

Default (id 1) now keeps blank fields and its name: Store::save_setup
refuses otherwise, and the form saves a renamed Default as a new setup.
Default cannot be removed. On load, a Default with fields set or renamed
becomes "Default (edited)", still active, and a blank Default returns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@benandez
benandez requested a review from Jeremy8776 as a code owner December 6, 2026 01:24
@coderabbitai

coderabbitai Bot commented Dec 6, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 42 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 97239544-d998-4d4c-a723-3957aa7f85da
Commits

Reviewing files that changed from the base of the PR and between 86b7f2d and 2da4cb7.

Files selected for processing: 4

  • CHANGELOG.md
  • crates/veil-app/src/connection.rs
  • crates/veil-app/src/screens/connection.rs
  • crates/veil-app/src/screens/connection/setups.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Dec 6, 2026

Copy link
Copy Markdown

This branch has not been deployed

No deployments
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