✨ Ship the GNOME panel mini-player extension with the package and update it without a logout
Consent
- I verified that there is no open/closed issue for the same subject.
- I understand that YTMDesktop have NO affiliation with Google or YouTube
Feature
Follow-up to #1791: could the app distribute and maintain its GNOME panel extension so users can install a package and receive panel updates without logging out? #1791 still requires manual extension installation. I am keeping automatic installation and the dynamic-loader experiment out of that PR until there is maintainer guidance.
Solution
The local experiment has two parts:
- Bundle the extension under app resources and copy a newer version into the user's GNOME extensions directory. Enable it through the session bus. Keep non-GNOME sessions unchanged, and expose an opt-out setting; no root process or package post-install script is involved.
- Keep a small stable entry module that imports the UI with a versioned URL. Re-enable only after observing the previous extension state become inactive. A new UI module uses a distinct GObject type name because registrations survive disabling an extension.
The app also requires the actual panel to report its expected UI version and a fresh app-session identifier before removing a fallback tray. Shell-active status alone does not prove that a panel was created. Startup fallback creation waits for readiness or timeout, avoiding a transient tray that GNOME may leave cached after destruction.
Validation and remaining policy choice
An isolated GJS re-import test was not sufficient evidence. The local installed-package tests later confirmed v38 → v41 → v42 in one Shell session, followed by v42 → v43 and v43 → v44 with actual UI-ready reports. The user confirmed the panel features, the v44 stale-tray fix, and the corrected Dock icon. These results remain local experiment evidence; they do not mean this installation policy is accepted upstream.
The initial migration from a previously loaded single-file extension, or a future edit to the stable loader itself, still needs a logout. Timeouts and failed UI creation preserve the fallback tray.
My preference is default-on with an opt-out, but opt-in or keeping manual installation are both reasonable. I will wait for that decision before adding the installer or loader to #1791.
Alternatives
- Keep manual copy/enable instructions and the logout requirement.
- A separate system package for the extension; requires package-manager integration.
- A separate extensions.gnome.org distribution; splits the release workflow.
Anything else?
Related: #1791. Its feature update keeps manual installation and excludes this experiment.
Reactivation follow-up (v45)
The local experiment exposed a separate readiness bug: after the extension stayed unavailable past the handshake timeout, its later correct-version report was rejected and the panel stayed hidden. Fully restarting the app recovered it, but simply reopening the existing process did not.
The v45 fix lets GetPanelSession issue a fresh bounded handshake after expiry while continuing
to reject stale sessions and incorrect versions. This readiness fix is included in #1791; it does
not introduce automatic installation or the dynamic loader there. The local v44 → v45 upgrade
and UI-ready report were verified after user installation/restart. Long-delay reactivation and
timeout cases pass the regression harness; a full real lock/unlock cycle remains untested for v45.
v2.0.12 compatibility and recovery follow-up (v46)
PR #1791 has been rebased onto upstream v2.0.12, which fixes the startup failure in #1807 and upgrades Electron to 44.3.0. Its feature-specific Start mix and Play next calls now use the new hooked player API as well.
The v46 panel also receives explicit web-view readiness/error state. When YouTube Music fails to initialize or stops responding, its music area is dimmed and blocked, with a Refresh action; window/settings/power controls remain available. Refresh recreates the web view with the existing session and prevents concurrent retries. This is separate from the extension UI version/session handshake used for tray fallback.
For this distribution experiment, app and extension updates must carry the matching v46 contract. The same API/recovery changes have been applied to the local dynamic-UI source without including its installer or loader in #1791. The proposed automatic installation policy remains awaiting maintainer guidance; the PR still uses manual extension installation.
Five focused regression scripts pass, including controller-only API fixtures and failure/recovery checks. Linux x64 Electron 44 packaging and an isolated signed-out runtime verified failed-state reporting, music-command rejection, accessible settings, and Refresh replacing the failed view. The new recovery UI uses actor-double tests; live GNOME layout checks, authenticated playback, and installed dynamic-loader upgrade verification have not been repeated for v46. No package was reinstalled in this update. The detailed validation limitations are recorded in #1791.
Source: ytmdesktop/ytmdesktop