Skip to content

fix: serialize visible columns deterministically - #13

Open
MattKotsenas wants to merge 1 commit into
psmux:masterfrom
MattKotsenas:fix-visible-column-order
Open

fix: serialize visible columns deterministically#13
MattKotsenas wants to merge 1 commit into
psmux:masterfrom
MattKotsenas:fix-visible-column-order

Conversation

@MattKotsenas

@MattKotsenas MattKotsenas commented Aug 9, 2026

Copy link
Copy Markdown

The order of visible_columns in pstoprc changes nondeterministically between saves, producing no-op diffs that make the file noisy to track in version control.

Summary

  • sort visible column indices before writing pstoprc
  • extract PstopConfig::serialize() so config output is testable without touching %APPDATA%
  • add a regression test that pins visible-column membership and canonical order

Runtime behavior is unchanged: column visibility remains set-based, and display order comes from the static column definitions. Existing config files are rewritten in canonical order on the next save.

Testing

  • before sorting, the targeted test failed with visible_columns=16,0,9
  • after sorting, cargo test visible_columns_are_serialized_in_canonical_order passes

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