Skip to content

fix(macutil): per-tab status and trim-safe export - #19

Merged
Cryptokid92 merged 20 commits into
mainfrom
mac-16-polish
Aug 30, 2026
Merged

Cryptokid92 merged 20 commits into
mainfrom
mac-16-polish

Conversation

@Cryptokid92

Copy link
Copy Markdown
Owner

Why

Tweaks and Install shared one StatusText string, so Applied N leaked onto Install. PresetService.exportIds used reflection JsonSerializer.Serialize on a string array. That dies when PublishTrimmed=true.

Scope

  • Deleted unused macos-terminal, macos-left-panel, and macos-right-panel styles from MacUtilGUI/App.axaml. They had no consumers.
  • AppTab keys four status strings on MainWindowViewModel. Tweaks, Install, Maintenance, and Updates each bind their own footer.
  • exportIds writes a JSON array of ids with Utf8JsonWriter. No reflection Serialize of string arrays.
  • Tests: ExportTrimSafe, PerTabStatusDoesNotLeak. Reflection serialize of string[] is off in the test project.
  • Out of scope: restyle, new theme, tab removal. Install groups, Uninstall, Refresh, Tweaks groups, Maintenance, and Updates stay. Opaque #1C1C1E. Name=MacUtil. Program.fs last.

Tradeoffs

Four footer bindings keep the current chrome. A single footer that rebinds on tab change would need selected-tab state. Utf8JsonWriter over a C# JsonSerializerContext so the GUI project stays F# only.

Blast Radius

GUI footers and PresetService.exportIds (CLI export uses the same function). Apply, Undo, Install, Uninstall, Maintenance, and Updates still write user-domain work only. No sudo. No /var/log. SIP stays on.

Verification

  • dotnet test --filter ExportTrimSafe passed. Ids serialize to a JSON array. JsonSerializer.Serialize of string[] throws. Utf8JsonWriter still writes.
  • dotnet test --filter PerTabStatusDoesNotLeak passed. Tweaks Applied 1 tweak(s). leaves Install empty.
  • dotnet test MacUtilGUI.Tests --configuration Release passed, 37 tests.
  • rg macos-terminal MacUtilGUI/App.axaml is empty.
  • fantomas --check on the CI file set passed.
  • Review screenshot: /Users/test/.grok/docs/macutil-plan-media/mac-16-review.png. Tweaks footer shows Nothing is selected. after empty Apply. Install status stays empty.

Do not merge.

@Cryptokid92
Cryptokid92 merged commit 99e9d80 into main Aug 30, 2026
3 of 4 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