Continuation style: fix custom style not reaching engine, store per profile#11510
Merged
Conversation
…rofile The libse fix/merge engine reads the custom continuation style from Configuration.Settings.General, but the SE5 settings bridge only copied the ContinuationStyle enum there - never the 14 custom-style fields or the pause. As a result the "Custom" continuation style silently fell back to libse defaults in Fix Common Errors and Merge. Custom continuation style is now stored per rule profile (previously it was a single global setting). The 14 flat fields are collapsed into one CustomContinuationStyle value object, used by RulesProfile, ProfileDisplay and SeGeneral, with the libse-flat mapping centralized on the value object (ApplyToGeneralSettings/FromGeneralSettings). The active profile is mirrored onto SeGeneral and bridged to libse via Se.ApplyContinuationStyleToLibSe(), called from both bridge sites (MainViewModel.SetLibSeSettings and FixCommonErrorsViewModel.InitStep1). Also fixes: - "Edit custom style" button not appearing when reopening the settings page - continuation settings not reset by Reset Rules - ColorDurationTooLong not reset by Reset Syntax Coloring (self-assignment) No migration is performed for the old global custom style (pre-release). Tests: libse CustomContinuationStyle/RulesProfile (copy/round-trip/null) and UI bridge + save/load persistence. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the custom continuation style not reaching the fix/merge engine, and makes the custom continuation style per rule profile instead of a single global setting.
The core bug
The libse fix/merge engine reads the custom continuation style from
Configuration.Settings.General(14 fields +ContinuationPause). The SE5 settings bridge only copied theContinuationStyleenum there and never the custom fields — so selecting the Custom style silently fell back to libse defaults in Fix Common Errors and Merge. Presets were unaffected (only the enum matters for them).Per-profile storage + refactor (#2/#3)
CustomContinuationStylevalue object (src/libse/Common/CustomContinuationStyle.cs) collapses the 14 flat fields into one object, used byRulesProfile,ProfileDisplay, andSeGeneral.ApplyToGeneralSettings/FromGeneralSettings).SeGeneraland bridged to libse via a singleSe.ApplyContinuationStyleToLibSe(), called from both bridge sites (MainViewModel.SetLibSeSettingsandFixCommonErrorsViewModel.InitStep1).GeneralSettings/engine + the one mapping, instead of ~12 hand-copied sites. Net −119 lines inSettingsViewModel.Additional fixes
ColorDurationTooLongnot reset by Reset Syntax Coloring (self-assignment no-op).Notes
RulesProfile.Serialize/Deserialize(used by old SE, not SE5) does not carry the per-profile custom style — SE5 persists it via System.Text.Json.Se.SetDefaultValuesguards mirror + profiles).Tests
CustomContinuationStyle(defaults match legacy, deep copy, null-tolerant copy,ApplyTo/Fromround-trip),RulesProfile(copy/serialize).Se.ApplyContinuationStyleToLibSe()bridges into libseConfiguration; per-profile custom style survives a realSaveSettings→LoadSettingsround-trip.🤖 Generated with Claude Code