Skip to content
This repository was archived by the owner on Aug 15, 2026. It is now read-only.

Add merge mode for bash import - #4

Merged
studiowebux merged 1 commit into
mainfrom
feat/import-merge
Feb 28, 2026
Merged

studiowebux merged 1 commit into
mainfrom
feat/import-merge

Conversation

@studiowebux

Copy link
Copy Markdown
Owner

Summary

  • Merge checkbox in Paste Commands modal: when checked, imported commands are deep-merged with existing editor YAML instead of replacing it
  • Zone merge: arrays (services, ports, sources, etc.) concatenated and deduplicated; scalars (target, forward, masquerade) from imported config overwrite
  • Direct merge: chains, rules, passthroughs concatenated and deduplicated; rule_groups from existing preserved
  • Variables and other top-level keys from existing YAML preserved through merge
  • When existing YAML is invalid, falls through to replace mode
  • When Merge is unchecked, behavior is unchanged (full replace)

Test plan

  • Empty editor + import = same result as replace mode
  • Existing config + import new zone = both zones present
  • Existing config + import overlapping services = no duplicates
  • Existing config with variables/loops + merge = variables preserved in output
  • Merge unchecked = replace behavior unchanged
  • Invalid existing YAML + merge checked = falls back to replace

🤖 Generated with Claude Code

When the Merge checkbox is checked in the Paste Commands modal,
imported commands are deep-merged with the existing editor YAML
instead of replacing it. Zones are merged per-zone with array
deduplication. Direct rules are merged with chain/rule/passthrough
dedup. Variables and rule_groups from existing config are preserved.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@studiowebux
studiowebux merged commit 58cfb6b into main Feb 28, 2026
1 check passed
@studiowebux
studiowebux deleted the feat/import-merge branch February 28, 2026 04:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant