UI: Actions Menu (Part 2 of 4) → XCI Trimmer #146

Merged
Ghost merged 38 commits from Neo/Ryubing:ui-actions-xci-trimmer into master 2026-06-27 02:11:32 +00:00
Contributor

Ayyyy, welcome to the UI: Actions Menu → XCI Trimmer PR!

Let's keep it up!

This is the second PR in a series aimed at delivering the largest overhaul and improvements to the Actions menu yet.

This second PR introduces visual improvements to the XCI Trimmer and also fixes some bugs.

GENERAL:

  • Renamed: XCI Trimmer files to use the capitalised XCI instead of Xci
    • Files were inconsistently named with either Xci or XCI. As such, they were all renamed to use XCI.

LOCALISATION:

  • Fractured: More locales
    • Common_Search.json - search-related locales
    • Common_Sort.json - sorting fields, ascending/descending locales
    • Dialog_XCITrimmer.json - XCI trimmer dialogs
    • GameListContextMenu.json - all UI dialogs related to the game list menu (right-click game)
    • XCITrimmer.json - all UI-related locales for the XCI Trimmer window
  • Added: Additional entry to StatusBar.json
  • Added: Simulate Wake-Up Message to MenuBar_Actions.json (previously did not exist there, for some reason).

NOTE: Common_Search.json and Common_Sort.json were not fully populated, but many more locales will be added and cleaned up in future PRs.

XCI TRIMMER:

  • Renamed: Trim XCI Files menu → XCI Trimmer
  • XCI Trimmer (Window):
    • Renamed: Window title from XCI File Trimmer → XCI Trimmer
    • Renamed: X of Y Title(s) Selected → XCI Selected: X/Y
      • Z Displayed was renamed to Displayed: Z and, as usual, appears only when searching for particular XCIs in the search bar.
    • Fixed: Counting bug
      • Pressing Select Shown continuously would increment the amount of XCIs selected to infinity (e.g. if 5 XCIs are in the list, then you could get 1201312 of 5 Title(s) Selected). Furthermore, when you were trimming a specific number of XCIs (not the all XCIs) at once, it would show that its trimming all titles from the list (e.g. "Trimming 5 Titles" when only 1 was being trimmed).
    • Changed: Button structure
      • Previous structure included 2 buttons: Select Shown and Deselect Shown. Initially, they were renamed to Select All and Deselect All, as that sounded more natural. However, after further consideration, they were both removed and replaced by a single button, whose action and label would change depending on the state it was in:
        • If no XCIs were selected → Select All
        • If at least one XCI is selected →Clear Selection
          • Clear Selection was used instead of Deselect All, because some translations were quite awkward.
          • Furthermore, this reflects the way the button works: you are not "deselecting all" when only 2 out of 5 XCIs are selected - you are clearing that particular selection of XCIs.
    • Improved: Button and Control Layout (above list)
      • Sorting dropdown was expanded a bit further (150 default to 170 width), as some locales would get cutoff. This will be further adjusted in a future PR, which will tackle all of Ryujinx's sorting features.
      • Added a new sorting: Trim Status
      • See images for visual comparison.
    • Improved: XCI List Layout
      • The entire list was revamped to be more modern and cleaner to look at.
      • Instead of displaying the file status (Trimmed, Untrimmed, Partial, Failed, Unknown), it now shows icons: Checkmark (Trimmed), Cross (Untrimmed), Wrench (Partial), Exclamation Mark (Failed), Question mark (everything else/Unknown), No Icon (when it's not XCI).
        • Furthermore, it shows a Sync icon when performing the trimming/untrimming operation.
        • Additionally, it shows the said status when you hover above the icons.
      • Save X MB and Saved Y MB were both removed and replaced with just the amount and a percentage value (how much you save per file).
      • See images for visual comparison.
      • NOTE: Icons are still under consideration and may be changed in the future.
    • Improved: Bottom Savings Display
      • Instead of showing Potential Savings" and Actual Savings, the bottom row now shows the amount Saved AND the amount Remaining.

GAME LIST CONTEXT MENU (Right-Click Game):

  • Renamed: Check & Trim XCI File → Trim XCI
    • The option already performs a check regardless.
  • Remove: Trim XCI Tooltip
    • The user can press the option and will be confronted with a dialog, which explains what the feature does. Furthermore, the action itself is reversible at any moment (i.e. before trimming and after trimming in the XCI Trimmer).
      • It is planned to either add a message that tells the user they can untrim the XCI in the XCI Trimmer, or to make the option work both ways (Trim & Untrim). This is still under consideration, but, if chosen to be implemented, it will be a part of the Game List Context Menu PR.
  • Added: IsVisible parameter to Trim XCI
    • Instead of displaying Trim XCI for every single game (NSP, NSO, etc.), it will only be displayed for XCIs (as they are the only ones that can be trimmed). It is still enabled only if an XCI is untrimmed.
  • Improved: Trim XCI Dialog
    • Some minor visual adjustment and organisation improvements.
    • Changed: Value formatting for "File Size", "Game Size", and "Space Savings"
      • Previously they were very long numbers, expressed in MB, with all the decimals. Instead of displaying them as such, they were shortened to display the same amount as they do in the XCI Trimmer window already.
    • All further dialogs will be improved in a separate PR, because they desperately need consistency.

STATUS BAR:

  • Adjusted: Formatting of XCI Trimming Status on status bar
    • Forced: Filename without extension (as we are already trimming an XCI already).
    • Fixed: Trimming Position when Playtime is not available
    • Fixed: Progress bar position (will be further adjusted in a Status Bar PR…boy there will be a lot of PRs, which is good)

If there are any features or changes that you wish to be implemented, please comment down below and I'll be happy to accommodate!

Ayyyy, welcome to the UI: Actions Menu → XCI Trimmer PR! Let's keep it up! This is the second PR in a series aimed at delivering the largest overhaul and improvements to the `Actions` menu yet. This second PR introduces visual improvements to the `XCI Trimmer` and also fixes some bugs. ### GENERAL: * **Renamed:** `XCI Trimmer` files to use the capitalised XCI instead of Xci * Files were inconsistently named with either Xci or XCI. As such, they were all renamed to use XCI. ### LOCALISATION: * **Fractured:** More locales * `Common_Search.json` - search-related locales * `Common_Sort.json` - sorting fields, ascending/descending locales * `Dialog_XCITrimmer.json` - XCI trimmer dialogs * `GameListContextMenu.json` - all UI dialogs related to the game list menu (right-click game) * `XCITrimmer.json` - all UI-related locales for the XCI Trimmer window * **Added:** Additional entry to `StatusBar.json` * **Added:** `Simulate Wake-Up Message` to `MenuBar_Actions.json` (previously did not exist there, for some reason). **NOTE:** `Common_Search.json` and `Common_Sort.json` were not fully populated, but many more locales will be added and cleaned up in future PRs. ### XCI TRIMMER: * **Renamed:** `Trim XCI Files` menu → `XCI Trimmer` * **XCI Trimmer (Window):** * **Renamed:** Window title from `XCI File Trimmer` → `XCI Trimmer` * **Renamed:** `X of Y Title(s) Selected` → `XCI Selected: X/Y` * `Z Displayed` was renamed to `Displayed: Z` and, as usual, appears only when searching for particular XCIs in the search bar. * **Fixed:** Counting bug * Pressing `Select Shown` continuously would increment the amount of XCIs selected to infinity (e.g. if 5 XCIs are in the list, then you could get 1201312 of 5 Title(s) Selected). Furthermore, when you were trimming a specific number of XCIs (not the all XCIs) at once, it would show that its trimming all titles from the list (e.g. "Trimming 5 Titles" when only 1 was being trimmed). * **Changed:** Button structure * Previous structure included 2 buttons: `Select Shown` and `Deselect Shown`. Initially, they were renamed to `Select All` and `Deselect All`, as that sounded more natural. However, after further consideration, they were both removed and replaced by a single button, whose action and label would change depending on the state it was in: * If no XCIs were selected → `Select All` * If at least one XCI is selected →`Clear Selection` * `Clear Selection` was used instead of Deselect All, because some translations were quite awkward. * Furthermore, this reflects the way the button works: you are not "deselecting all" when only 2 out of 5 XCIs are selected - you are clearing that particular selection of XCIs. * **Improved:** Button and Control Layout (above list) * Sorting dropdown was expanded a bit further (150 default to 170 width), as some locales would get cutoff. This will be further adjusted in a future PR, which will tackle all of Ryujinx's sorting features. * Added a new sorting: Trim Status * See images for visual comparison. * **Improved:** XCI List Layout * The entire list was revamped to be more modern and cleaner to look at. * Instead of displaying the file status (Trimmed, Untrimmed, Partial, Failed, Unknown), it now shows icons: Checkmark (Trimmed), Cross (Untrimmed), Wrench (Partial), Exclamation Mark (Failed), Question mark (everything else/Unknown), No Icon (when it's not XCI). * Furthermore, it shows a Sync icon when performing the trimming/untrimming operation. * Additionally, it shows the said status when you hover above the icons. * Save X MB and Saved Y MB were both removed and replaced with just the amount and a percentage value (how much you save per file). * See images for visual comparison. * NOTE: Icons are still under consideration and may be changed in the future. * **Improved:** Bottom Savings Display * Instead of showing `Potential Savings`" and `Actual Savings`, the bottom row now shows the amount `Saved` AND the amount `Remaining`. ### GAME LIST CONTEXT MENU (Right-Click Game): * **Renamed:** `Check & Trim XCI File` → `Trim XCI` * The option already performs a check regardless. * **Remove:** `Trim XCI` Tooltip * The user can press the option and will be confronted with a dialog, which explains what the feature does. Furthermore, the action itself is reversible at any moment (i.e. before trimming and after trimming in the XCI Trimmer). * It is planned to either add a message that tells the user they can untrim the XCI in the XCI Trimmer, or to make the option work both ways (Trim & Untrim). This is still under consideration, but, if chosen to be implemented, it will be a part of the Game List Context Menu PR. * **Added:** IsVisible parameter to `Trim XCI` * Instead of displaying `Trim XCI` for every single game (NSP, NSO, etc.), it will only be displayed for XCIs (as they are the only ones that can be trimmed). It is still _enabled_ only if an XCI is untrimmed. * **Improved:** `Trim XCI` Dialog * Some minor visual adjustment and organisation improvements. * **Changed:** Value formatting for "File Size", "Game Size", and "Space Savings" * Previously they were very long numbers, expressed in MB, with all the decimals. Instead of displaying them as such, they were shortened to display the same amount as they do in the XCI Trimmer window already. * All further dialogs will be improved in a separate PR, because they desperately need consistency. ### STATUS BAR: * **Adjusted:** Formatting of XCI Trimming Status on status bar * **Forced:** Filename without extension (as we are already trimming an XCI already). * **Fixed:** Trimming Position when Playtime is not available * **Fixed:** Progress bar position (will be further adjusted in a Status Bar PR…boy there will be a lot of PRs, which is good) _If there are any features or changes that you wish to be implemented, please comment down below and I'll be happy to accommodate!_
Neo force-pushed ui-actions-xci-trimmer from ee36833ac6
Some checks failed
Pull Request Triage / triage (pull_request_target) Successful in 20s
Build PR / linux-arm64 (Release) (pull_request) Successful in 4m29s
Build PR / win-x64 (Release) (pull_request) Successful in 7m58s
Build PR / linux-x64 (Release) (pull_request) Successful in 8m2s
Build PR / win-arm64 (Release) (pull_request) Successful in 8m4s
Build PR / macOS Universal (Release) (pull_request) Failing after 10m1s
to c9192a9714
Some checks failed
Build PR / linux-arm64 (Release) (pull_request) Successful in 8m2s
Build PR / win-arm64 (Release) (pull_request) Successful in 8m40s
Build PR / linux-x64 (Release) (pull_request) Failing after 8m43s
Build PR / win-x64 (Release) (pull_request) Successful in 8m49s
Build PR / macOS Universal (Release) (pull_request) Successful in 9m17s
2026-06-23 14:11:45 +00:00
Compare
Ghost left a comment

Looks good, as always, Neo! Just a couple of questions and nitpicks, and a suggestion: do you think it would make more sense for the view to contain checkboxes for the listed XCI titles to select/deselect? I like the x's and checkmarks, but from a user perspective, I think a checkbox would be more intuitive.

Looks good, as always, Neo! Just a couple of questions and nitpicks, and a suggestion: do you think it would make more sense for the view to contain checkboxes for the listed XCI titles to select/deselect? I like the x's and checkmarks, but from a user perspective, I think a checkbox would be more intuitive.
@ -27,3 +27,3 @@
internal class TrimmerWindow : Ryujinx.Common.Logging.XCIFileTrimmerLog
{
private readonly XciTrimmerViewModel _viewModel;
private readonly XCITrimmerViewModel _viewModel;

We should probably discuss with the other contributors whether we want to strictly enforce PascalCase for names with abbreviations in them. Personally speaking, I'm fine with setting abbreviations as their correct capital variants, but in many cases around the codebase, we use strict PascalCase where we use PascalCase.

We should probably discuss with the other contributors whether we want to strictly enforce PascalCase for names with abbreviations in them. Personally speaking, I'm fine with setting abbreviations as their correct capital variants, but in many cases around the codebase, we use strict PascalCase where we use PascalCase.
Author
Contributor

True. I changed it because I kept seeing inconsistencies and when I was searching for the files, I'd get inconsistent search results sometimes. I believe for abbreviations, such as XCI or DLC, they should as you described - capital variants, but only for those references, since it's not the "word", but "a bunch of words" together.

I can revert it here if required. Just let me know!

True. I changed it because I kept seeing inconsistencies and when I was searching for the files, I'd get inconsistent search results sometimes. I believe for abbreviations, such as XCI or DLC, they should as you described - capital variants, but only for those references, since it's not the "word", but "a bunch of words" together. I can revert it here if required. Just let me know!

i think its fine for now, we can have a discussion later about it with the team

i think its fine for now, we can have a discussion later about it with the team
Ghost marked this conversation as resolved
@ -12,3 +12,3 @@
internal class XCITrimmerFileSpaceSavingsConverter : IValueConverter
{
private const long _bytesPerMB = 1024 * 1024;
private const long BytesPerMB = 1024 * 1024;

this is a class member -- even if its internal, we should stick to using _ as a prefix for the file name

this is a class member -- even if its internal, we should stick to using `_` as a prefix for the file name
Author
Contributor

Hmm, the underscore disappeared...reverted!

Hmm, the underscore disappeared...reverted!
Ghost marked this conversation as resolved
@ -35,2 +58,3 @@
{
return LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.TitleXCICanSaveLabel, ((app.PotentialSavingsB - app.CurrentSavingsB) / _bytesPerMB).CoerceAtLeast(0));
return LocaleManager.Instance.UpdateAndGetDynamicValue(
LocaleKeys.XCITrimmer_CalculatedSavingsLabel, mb, roundedPercentage);

I noticed that your screenshot for the percentages use , for the separation between integers and decimal amounts. In American English, these are presented with . instead, and I'm sure this is different in other languages as well. Does your code handle this? If not, we may need to consider developing a formatter (or using a library) for this.

I noticed that your screenshot for the percentages use `,` for the separation between integers and decimal amounts. In American English, these are presented with `.` instead, and I'm sure this is different in other languages as well. Does your code handle this? If not, we may need to consider developing a formatter (or using a library) for this.
Author
Contributor

I did notice this inconsistency beforehand in Settings > Input, where I'd get a commas instead of periods for the sliders, but looking around a bit, it looked like a stylistic choice and not something determined by the computer (since I have it set to periods on my computer). I did once try manually setting it to a period, and did get periods throughout all instances.

Do you see periods instead of commas on your side?

I'm all for setting up a formatter for this, and it has been on my list, but I did not implement anything here because it concerns Ryujinx-wide styling preferences, which are better suited for a PR in the settings, either for Interface (styling) or Input (since that's where most of such values exist) PRs.

I did notice this inconsistency beforehand in Settings > Input, where I'd get a commas instead of periods for the sliders, but looking around a bit, it looked like a stylistic choice and not something determined by the computer (since I have it set to periods on my computer). I did once try manually setting it to a period, and did get periods throughout all instances. Do you see periods instead of commas on your side? I'm all for setting up a formatter for this, and it has been on my list, but I did not implement anything here because it concerns Ryujinx-wide styling preferences, which are better suited for a PR in the settings, either for Interface (styling) or Input (since that's where most of such values exist) PRs.

looks good to me. idk whats handling that, we should probably figure that out lmao

image

looks good to me. idk whats handling that, we should probably figure that out lmao ![image](/attachments/3bfc599e-8479-45e2-b678-eb314c6c1724)
Ghost marked this conversation as resolved
@ -2352,3 +2354,3 @@
LocaleManager.Instance[LocaleKeys.Continue],
LocaleManager.Instance[LocaleKeys.Cancel],
LocaleManager.Instance[LocaleKeys.GameListContextMenuTrimXCI]
LocaleManager.Instance[LocaleKeys.GameListContextMenu_TrimXCIButton]

I've noticed this with quite a few of your recent locale changes; do you prefer using Module_StringName for your string names? If so, we can discuss changing this in the updated guidelines with other contributors. I think it makes sense, given that ModuleStringName is a bit difficult to parse at a glance with our current system.

I've noticed this with quite a few of your recent locale changes; do you prefer using `Module_StringName` for your string names? If so, we can discuss changing this in the updated guidelines with other contributors. I think it makes sense, given that `ModuleStringName` is a bit difficult to parse at a glance with our current system.
Author
Contributor

For locales, since the initial implementation of "fracturing", it works by referencing a "file". By default, it references Root.json, so any locale added there would be immediately "understood" by the system and referenced properly.

If we are fracturing it into multiple files, then the underscore typically references the name of the file. In this case, the file in which I moved it to is GameListContextMenu.json, and the StringName is TrimXCIButton, so together we get: GameListContextMenu_TrimXCIButton. The string is not located in the Root.json anymore.

I do believe it'd be beneficial to use an underscore either way, since it definitely helps readability and parsing through hundreds of locales in .axaml files.

I'm still thinking about what would be best approach, as I'm see how existing strings are structured. Right now, I'm using FileName_NamePurpose or sometimes it's Classification_FileName_NamePurpose, like Common_Sort.json. Perhaps in the future I'll remove "Purpose", but I need more information on other locales. I would propose (and am willing to write) the updated guidelines once I get more locales fractured.

For locales, since the initial implementation of "fracturing", it works by referencing a "file". By default, it references `Root.json`, so any locale added there would be immediately "understood" by the system and referenced properly. If we are fracturing it into multiple files, then the underscore typically references the name of the file. In this case, the file in which I moved it to is `GameListContextMenu.json`, and the `StringName` is `TrimXCIButton`, so together we get: `GameListContextMenu_TrimXCIButton`. The string is not located in the `Root.json` anymore. I do believe it'd be beneficial to use an underscore either way, since it definitely helps readability and parsing through hundreds of locales in .axaml files. I'm still thinking about what would be best approach, as I'm see how existing strings are structured. Right now, I'm using `FileName_NamePurpose` or sometimes it's `Classification_FileName_NamePurpose`, like Common_Sort.json. Perhaps in the future I'll remove "Purpose", but I need more information on other locales. I would propose (and am willing to write) the updated guidelines once I get more locales fractured.

id like to discuss with a few other translators before we make any definitive decisions regarding the locales, but ill likely consult you for guidelines guidance

id like to discuss with a few other translators before we make any definitive decisions regarding the locales, but ill likely consult you for guidelines guidance
Ghost marked this conversation as resolved
Author
Contributor

Hi sh0! I replied to the other comments as well.

I believe I need to add more images for you to see, but the checkmarks and Xs don't show the selection state, but the trim state (i.e. checkmark if Trimmed, X if untrimmed). I've added more images to the show the different states. I opted for a checkmark for trimmed and X for untrimmed because it's the most simplest binary understanding of the status of the file.

I removed the actual string labels from the list because in many translations, there was no consistent column size that would look good in every single language (and I test this, yes). You can nonetheless hover about the icon to reveal its status.

(Already added the images, they are above!)

Hi sh0! I replied to the other comments as well. I believe I need to add more images for you to see, but the checkmarks and Xs don't show the _selection_ state, but the _trim_ state (i.e. checkmark if Trimmed, X if untrimmed). I've added more images to the show the different states. I opted for a checkmark for trimmed and X for untrimmed because it's the most simplest binary understanding of the status of the file. I removed the actual string labels from the list because in many translations, there was no consistent column size that would look good in every single language (and I test this, yes). You can nonetheless hover about the icon to reveal its status. (Already added the images, they are above!)
Ghost force-pushed ui-actions-xci-trimmer from 56e4e68011
All checks were successful
Build PR / linux-x64 (Release) (pull_request) Successful in 8m15s
Build PR / win-x64 (Release) (pull_request) Successful in 7m50s
Build PR / win-arm64 (Release) (pull_request) Successful in 8m1s
Build PR / macOS Universal (Release) (pull_request) Successful in 8m33s
Build PR / linux-arm64 (Release) (pull_request) Successful in 2m36s
to daf0cf58c7
All checks were successful
Build PR / linux-arm64 (Release) (pull_request) Successful in 4m29s
Build PR / win-x64 (Release) (pull_request) Successful in 8m39s
Build PR / win-arm64 (Release) (pull_request) Successful in 9m2s
Build PR / linux-x64 (Release) (pull_request) Successful in 9m8s
Build PR / macOS Universal (Release) (pull_request) Successful in 7m7s
2026-06-27 01:58:41 +00:00
Compare
Ghost merged commit 905a41a643 into master 2026-06-27 02:11:32 +00:00
Ghost deleted branch ui-actions-xci-trimmer 2026-06-27 02:11:33 +00:00
Ghost added this to the 1.4.0 milestone 2026-06-27 13:11:22 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
projects/Ryubing!146
No description provided.