From af32e5e38b9eb2c3e7b20d47aabdbeaa84492988 Mon Sep 17 00:00:00 2001 From: Jamie Chapman <104535858+bilbospocketses@users.noreply.github.com> Date: Wed, 3 Jun 2026 19:34:11 -0400 Subject: [PATCH] chore(modules): renumber SortOrder to remove APT/Jellyfin tie JellyfinModule and AndroidPowerToolsModule both declared SortOrder=2, so the sidebar order held only by the DisplayName alphabetical tiebreak. Renumber Jellyfin 2->3, Utilities 3->4, Cameras 4->5 so each module has a distinct ordering key (Android Devices 1, Android Power Tools 2 unchanged). Rendered sidebar/module-tile order is unchanged. Update CamerasModuleTests SortOrder assertion 4->5; CHANGELOG under Unreleased. --- CHANGELOG.md | 4 ++++ src/ControlMenu/Modules/Cameras/CamerasModule.cs | 2 +- src/ControlMenu/Modules/Jellyfin/JellyfinModule.cs | 2 +- src/ControlMenu/Modules/Utilities/UtilitiesModule.cs | 2 +- tests/ControlMenu.Tests/Modules/Cameras/CamerasModuleTests.cs | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 850f222..ec7b24b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- **Module `SortOrder` values renumbered to eliminate a collision.** `JellyfinModule` and `AndroidPowerToolsModule` both declared `SortOrder = 2`, so the sidebar order held only by the `DisplayName` alphabetical tiebreak. Renumbered Jellyfin `2 → 3`, Utilities `3 → 4`, and Cameras `4 → 5` so every module has a distinct ordering key (Android Devices `1` and Android Power Tools `2` unchanged). The rendered sidebar / module-tile order is unchanged — this only removes the fragile tie. `CamerasModuleTests.SortOrder_Is4` renamed to `SortOrder_Is5`. + ### Removed - **Orphaned `scrcpy` dependency dropped from the Android Devices module.** `AndroidDevicesModule` declared `scrcpy` (GitHub-sourced, `Genymobile/scrcpy`) as a `ModuleDependency`, but nothing in the app has invoked `scrcpy.exe` since the ws-scrcpy-web sidecar replaced the native-scrcpy mirror in Phase 8a (2026-04-11). Impact: (1) drops a per-dependency-sync GitHub releases API call; (2) removing `scripts/dependencies/fetch-scrcpy.ps1` (auto-discovered by `stage-seed.ps1`) stops bundling the ~40 MB `scrcpy-win64` payload — `scrcpy.exe` + SDL/ffmpeg DLLs + `scrcpy-server` + a duplicate `adb.exe` — into every MSI; (3) `SeedHydrator` now prunes a pre-existing `\dependencies\scrcpy\` on launch (best-effort, logged) so existing installs reclaim the space on upgrade. Synthetic test fixtures that used `"scrcpy"` as a dependency name were renamed to `"fake-tool"`. README dependency tables updated to match. diff --git a/src/ControlMenu/Modules/Cameras/CamerasModule.cs b/src/ControlMenu/Modules/Cameras/CamerasModule.cs index ec51207..3d5937c 100644 --- a/src/ControlMenu/Modules/Cameras/CamerasModule.cs +++ b/src/ControlMenu/Modules/Cameras/CamerasModule.cs @@ -10,7 +10,7 @@ public class CamerasModule : IToolModule public string Id => "cameras"; public string DisplayName => "Cameras"; public string Icon => "bi-camera-video"; - public int SortOrder => 4; + public int SortOrder => 5; /// /// Set by Program.cs on startup AND on CameraChangeNotifier.CamerasChanged. diff --git a/src/ControlMenu/Modules/Jellyfin/JellyfinModule.cs b/src/ControlMenu/Modules/Jellyfin/JellyfinModule.cs index 80eb1e7..11bf30e 100644 --- a/src/ControlMenu/Modules/Jellyfin/JellyfinModule.cs +++ b/src/ControlMenu/Modules/Jellyfin/JellyfinModule.cs @@ -7,7 +7,7 @@ public class JellyfinModule : IToolModule public string Id => "jellyfin"; public string DisplayName => "Jellyfin"; public string Icon => "bi-film"; - public int SortOrder => 2; + public int SortOrder => 3; private static readonly string DepsRoot = ControlMenu.Services.DepsRootHolder.Path; diff --git a/src/ControlMenu/Modules/Utilities/UtilitiesModule.cs b/src/ControlMenu/Modules/Utilities/UtilitiesModule.cs index 2243a2d..62cc281 100644 --- a/src/ControlMenu/Modules/Utilities/UtilitiesModule.cs +++ b/src/ControlMenu/Modules/Utilities/UtilitiesModule.cs @@ -5,7 +5,7 @@ public class UtilitiesModule : IToolModule public string Id => "utilities"; public string DisplayName => "Utilities"; public string Icon => "bi-tools"; - public int SortOrder => 3; + public int SortOrder => 4; public IEnumerable Dependencies => []; public IEnumerable ConfigRequirements => []; diff --git a/tests/ControlMenu.Tests/Modules/Cameras/CamerasModuleTests.cs b/tests/ControlMenu.Tests/Modules/Cameras/CamerasModuleTests.cs index 75b3c3a..9348bd3 100644 --- a/tests/ControlMenu.Tests/Modules/Cameras/CamerasModuleTests.cs +++ b/tests/ControlMenu.Tests/Modules/Cameras/CamerasModuleTests.cs @@ -13,7 +13,7 @@ public class CamerasModuleTests public void DisplayName_IsCameras() => Assert.Equal("Cameras", _sut.DisplayName); [Fact] - public void SortOrder_Is4() => Assert.Equal(4, _sut.SortOrder); + public void SortOrder_Is5() => Assert.Equal(5, _sut.SortOrder); [Fact] public void GetNavEntries_ReturnsEntriesFromEnabledCameras()