Skip to content

Give dialogs a side margin, and stop import misreading its own rules … - #26

Merged
EarMaster merged 1 commit into
mainfrom
develop
Sep 27, 2026
Merged

EarMaster merged 1 commit into
mainfrom
develop

Conversation

@EarMaster

Copy link
Copy Markdown
Owner

…as a conflict

The export, import and confirmation dialogs had a maximum width but no side margin, so below about 670px wide the panel touched both edges of the window with no gap. Added the same px-4 the other two dialogs already use.

Separately, the import conflict check compared imported and current rules as JSON text. An export writes a rule's fields in a different order than the app builds them in - alphabetical, from serde_json::Value - so any context with auto-switch rules was reported as conflicting with itself on every import. Added sameRules(), which compares rules by what they do: field order and a missing matchCase/useRegex (same as false) no longer count as a difference; the order of the rules themselves still does.

5 new unit tests for sameRules. Frontend: 224 tests, svelte-check clean.

…as a conflict

The export, import and confirmation dialogs had a maximum width but no side
margin, so below about 670px wide the panel touched both edges of the
window with no gap. Added the same px-4 the other two dialogs already use.

Separately, the import conflict check compared imported and current rules
as JSON text. An export writes a rule's fields in a different order than
the app builds them in - alphabetical, from serde_json::Value - so any
context with auto-switch rules was reported as conflicting with itself on
every import. Added sameRules(), which compares rules by what they do:
field order and a missing matchCase/useRegex (same as false) no longer
count as a difference; the order of the rules themselves still does.

5 new unit tests for sameRules. Frontend: 224 tests, svelte-check clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@EarMaster
EarMaster merged commit 5bc5a4f into main Sep 27, 2026
21 checks passed
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