Skip to content

fix(apps): restore legacy app ordering toggles for client compatibility#296

Open
jukor112 wants to merge 1 commit into
Nonary:masterfrom
jukor112:master
Open

fix(apps): restore legacy app ordering toggles for client compatibility#296
jukor112 wants to merge 1 commit into
Nonary:masterfrom
jukor112:master

Conversation

@jukor112

Copy link
Copy Markdown

Restore Legacy App Ordering Configuration (Global + Per-Client)

Summary

This PR restores both the global configuration and per-client settings for Legacy App Ordering (legacy_ordering), which were inadvertently hardcoded to true in v1.17.0.

This allows legacy ordering to be selectively disabled for clients that require unmodified application names, such as the Moonlight CLI and MoonDeck.

Problem

When Legacy App Ordering is enabled, the host prepends hidden Unicode zero-width characters (\u200B and \u200C) to application names returned by the /applist endpoint. These invisible characters preserve a stable custom application order for legacy Moonlight GUI clients.

However, command-line clients such as the Moonlight CLI perform literal string matching against the application names returned by /applist. Because the hidden characters are not stripped, application lookup fails.

Example:

Requested: "Steam"
Returned:  "\u200B\u200CSteam"

As a result, the CLI hangs on:

Loading app list...

before eventually reporting that the application was not found.

Since MoonDeck uses the Moonlight CLI internally, this regression also prevents MoonDeck from launching streams.

Solution

This PR restores the ability to enable or disable legacy ordering both globally and on a per-client basis.

C++ Backend

  • Restored parsing and persistence of enable_legacy_ordering in src/confighttp.cpp.
  • Replaced the hardcoded value in src/nvhttp.cpp:
const bool enable_legacy_ordering =
    config::sunshine.legacy_ordering &&
    named_cert_p->enable_legacy_ordering;

This combines the global configuration with the per-client override.

Web UI

  • Restored the "App ordering for legacy clients" toggle under Configuration → Advanced (Advanced.vue).
  • Restored the "Enable legacy ordering" checkbox in the Client Management edit dialog (pin.html).
  • Reconnected the Vue state handlers for both settings.

Testing

Functional Verification

  1. Open Client Management.
  2. Disable Enable legacy ordering for the Moonlight CLI client.
  3. Run:
moonlight stream <host_ip> <app_name>

Expected Result

  • The Moonlight CLI receives application names without hidden zero-width characters.
  • Application lookup succeeds immediately.
  • Streaming launches successfully.
  • MoonDeck functionality is restored.

Restores both the global and per-client `legacy_ordering` toggles that
were recently hardcoded to true.

- In `/applist` (nvhttp.cpp), evaluates both the global config and
  client-specific switches to decide whether to pad app titles with
  zero-width spaces. This fixes issues with Moonlight CLI (and scripts)
  which fail to match app names when zero-width spaces are present.
- In client update handlers (confighttp.cpp), parses and saves the
  `enable_legacy_ordering` option.
- Restores the global "App ordering for legacy clients" toggle in the
  Advanced tab of Configuration.
- Restores the per-client "Enable legacy ordering" checkbox in the
  Client Management edit modal.
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