feat(apps): order apps alphabetically - #3223
Merged
Merged
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3223 +/- ##
=========================================
- Coverage 9.82% 9.82% -0.01%
=========================================
Files 101 101
Lines 17969 17980 +11
Branches 8408 8418 +10
=========================================
Hits 1766 1766
- Misses 13320 13328 +8
- Partials 2883 2886 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
ReenigneArcher
force-pushed
the
feat/webui/order-apps-alphabetically
branch
3 times, most recently
from
September 28, 2024 16:40
cfde73a to
fd41138
Compare
Member
Author
|
Fixed the code smells, and a few others in this file. |
This comment was marked as resolved.
This comment was marked as resolved.
ReenigneArcher
force-pushed
the
feat/webui/order-apps-alphabetically
branch
from
September 29, 2024 21:38
fd41138 to
4c7d85d
Compare
|
KuleRucket
pushed a commit
to KuleRucket/Sunshine
that referenced
this pull request
Oct 9, 2024
c2vi
pushed a commit
to c2vi/Sunshine
that referenced
this pull request
Mar 27, 2025
4o66
added a commit
to 4o66/Sunshine
that referenced
this pull request
Sep 12, 2026
saveApp() sorted the apps array by name and wrote the sorted result back, so every save through the web UI rewrote the on-disk order of apps.json. Nothing needs it to do that any more. The sort was a workaround. PR LizardByte#3223, which added it, says the original plan was to sort in the web UI, but that broke edit and delete because those address apps by array index and the displayed order no longer matched the file. Sorting the file made the two match. At that time apps.html rendered `v-for="(app,i) in apps"` in raw file order, so sorting the file was what made the web UI list appear ordered, which is what LizardByte/Sunshine discussion #489 asked for. Every consumer now orders the list itself: - The web UI has since gained its own sorting in PR LizardByte#5158. displayedApps maps each app to { app, index }, carrying the real index through filtering and sorting, with a user-facing mode of default, asc or desc. - moonlight-qt sorts on every refresh from the server: NvComputer::sortAppList() runs a case-insensitive stable_sort immediately after `appList = newAppList`. - moonlight-android does the same in AppGridAdapter.sortList(), on every addApp(). So the file sort no longer affects what anyone sees, and it has two costs. It contradicts the web UI it was protecting, because sort mode "default" means file order and can never take effect. And it silently rewrites apps.json for anything that generates the file outside the web UI. Removing it changes no displayed order. It leaves apps.json ordered the way whoever wrote it left it. Co-Authored-By: Claude Opus 5 (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.



Description
Sort apps alphabetically.
Original plan was to sort them via the webUI; however the it attempted to delete/edit the incorrect apps due to the change in index order. So opted to alphabetize the
apps.jsonbefore saving the file.Screenshot
Issues Fixed or Closed
Type of Change
.github/...)Checklist