Launcher: Reload session, and Log out moves in from its own module
CI / test (push) Failing after 17s

The Application Launcher's menu now ends in a session row: Reload, Log out, Suspend, Restart,
Power off. Log out, Restart and Power off take a second click on the same button (a status line
says "Click Log out again to confirm"); Reload and Suspend act at once.

- Reload calls the new session.reload, which reaches the shell as the ReloadSession request
  (native stub: request 8 with n 1; host plasmoids.wit: reload-session; host-wasm: Req::ReloadSession)
  and runs DesktopShell::reload_modules(""): every panel module again from disk, in place, with
  its settings. Windows and apps keep running. The compositor redraws the whole frame after it.
- Suspend / Restart / Power off use the power capability, the same calls as Settings > Power.
- The standalone logout module is gone (component, world, components.txt). Saved panels drop
  "logout", or get the launcher in its place when they had none; panel.edn is rewritten without
  it. A stale logout.wasm is hidden from Settings > Panel (retired_modules).
- Tests: lib/launcher session row, shell migrate_panel, host input tests for Log out and Reload,
  host-wasm launcher session row; control_test uses inspector.wasm instead of logout.wasm.
- README and docs/reloading.md describe the session row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hjKUnSS3D92ThigvJf
This commit is contained in:
Claude committed 2026-11-25 21:01:17 +00:00
1 parent 68164ff75e
commit 99c6c66726
37 files changed
+420 -827

No files matched your search

+5 -2
View File
@@ -122,10 +122,13 @@ interface modules {
browse: func();
}
/// Ending the login session. A module with this capability is a logout button: the host stops the
/// compositor, and the display manager takes the screen back.
/// The login session. `logout` ends it: the host stops the compositor, and the display manager
/// takes the screen back. `reload` reloads it in place: every loaded panel module is read from
/// disk again (same order, same module settings) and the module list is rescanned; windows and
/// running apps are untouched. The Application Launcher's session row uses both.
interface session {
logout: func();
reload: func();
}
/// The desktop wallpaper. The shell draws a fixed set of wallpapers (from draw ops, coloured by the
+2
View File
@@ -140,6 +140,8 @@ interface plasmoids {
/// The shortcuts capability: action * 1000 + index (0 capture, 1 reset, 2 reset all,
/// 3 cancel the capture).
shortcut(s32),
/// The session capability's `reload`: reload every loaded panel module from disk.
reload-session,
}
/// The next pending request, oldest first.
next-request: func() -> option<request>;
+4 -6
View File
@@ -18,10 +18,14 @@ world configurable {
export module-config;
}
/// The application launcher (and the dock, which uses only the first two). The launcher's popup
/// also ends in a session row: Reload, Log out, Suspend, Restart, Power off.
world launcher-widget {
include widget;
import app-catalog;
import app-launch;
import session;
import power;
}
world panel {
@@ -87,12 +91,6 @@ world plasmoid-host {
export plasmoid;
}
/// Logout button.
world logout-widget {
include widget;
import session;
}
/// The settings module: session switches (restore, window places, dark mode), the wallpaper, the
/// panel's modules (load, unload, browse; the panel menu's "Modules..." opens that tab), and power
/// (idle timeouts, battery, suspend / restart / power off) and keyboard shortcuts (rebind, reset).