Fix continuation action sorting in Fix Common Errors#11522
Merged
niksedk merged 1 commit intoJun 9, 2026
Conversation
Separate Fix Common Errors action identity from the user-visible action label so continuation-style rows can remain distinct for selection/apply while sorting together in the grid. Replace the trailing-space continuation action hack with explicit suffix/prefix action keys, bind the Action column to the normalized display label, and add a regression test covering the key/display split.
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
This PR changes the Fix Common Errors action list so continuation-style fixes sort under a single visible action label while still keeping the two fix variants distinct internally.
Previously,
FixContinuationStyleused a trailing-space hack in the action text to distinguish the current-line suffix fix from the next-line prefix fix. That preserved selection/apply behavior, but it also caused sorting byActionto split the rows into two visually identical groups.In the screenshot below, the grid is sorted by Action, but the numbering restarts midway without any clear reason. This inconsistency prompted my investigation.
What changed
FixActionKeyhelper to separate:FixContinuationStyleto use explicit internal keys for:FixDisplayItemto expose:Actionas the internal keyActionDisplayas the normalized visible labelActioncolumn toActionDisplayResult
Actionno longer creates two visually identical continuation-style groupsAlternative solution
This would have worked too: give the two continuation rows genuinely different action names, such as:
or localized equivalents, the same way src/libse/Forms/FixCommonErrors/FixEmptyLines.cs:20 uses distinct labels for top/bottom/middle.
I did not choose that approach because it changes the UI semantics:
The action-key/display split keeps the UI behavior as I expected it:
So a solution similar to RemovedEmptyLineAtTop pattern was a valid option, but it would have solved the identity problem by making the labels visibly different, whereas this fix solves it without changing the user-facing label.