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

+3 -1
View File
@@ -52,7 +52,7 @@ static Inst insts[MAX_INST];
enum {
K_OTHER, K_TOKENS, K_CLOCK, K_APPS, K_LAUNCH, K_WINDOWS, K_FOCUS, K_LAYOUTS, K_LAYOUT_CUR, K_SET_LAYOUT,
K_INSPECT_IS_ON, K_INSPECT_SET, K_MOD_AVAILABLE, K_MOD_LOADED, K_MOD_LOAD, K_MOD_UNLOAD, K_MOD_MOVE, K_MOD_BROWSE,
K_SYSTEM_READ, K_WIN_ALL, K_WIN_FOCUS_ID, K_LOGOUT, K_WALLPAPERS, K_WALLPAPER_CUR, K_SET_WALLPAPER,
K_SYSTEM_READ, K_WIN_ALL, K_WIN_FOCUS_ID, K_LOGOUT, K_RELOAD, K_WALLPAPERS, K_WALLPAPER_CUR, K_SET_WALLPAPER,
K_SESSION_SETTINGS, K_SESSION_IS_ON, K_SESSION_SET,
K_APP_ICON,
K_SHOT_TAKE, K_SHOT_RECORD, K_SHOT_STOP, K_SHOT_IS_REC, K_SHOT_PTR, K_SHOT_SET_PTR,
@@ -372,6 +372,7 @@ static wasm_trap_t *host_import(void *env, const wasm_val_vec_t *args, wasm_val_
case K_SET_LAYOUT: push_req(3, a0, NULL); break;
case K_FOCUS: push_req(2, a0, NULL); break;
case K_LOGOUT: push_req(8, 0, NULL); break;
case K_RELOAD: push_req(8, 1, NULL); break; /* 8: session; n 0 log out, 1 reload */
case K_SET_WALLPAPER: push_req(9, a0, NULL); break;
case K_SESSION_SET: push_req(a1 ? 11 : 10, a0, NULL); break; /* 10 off, 11 on */
/* Request 12 carries the screenshot code: 0-3 take, 10-12 record, 20 stop, 30/31 pointer. */
@@ -577,6 +578,7 @@ static int classify_import(const wasm_name_t *m, const wasm_name_t *f) {
if (!strcmp(iface, "battery") && !strcmp(fn, "read")) return K_BAT_READ;
if (!strcmp(iface, "icons") && !strcmp(fn, "app-icon")) return K_APP_ICON;
if (!strcmp(iface, "session") && !strcmp(fn, "logout")) return K_LOGOUT;
if (!strcmp(iface, "session") && !strcmp(fn, "reload")) return K_RELOAD;
if (!strcmp(iface, "wallpaper") && !strcmp(fn, "wallpapers")) return K_WALLPAPERS;
if (!strcmp(iface, "wallpaper") && !strcmp(fn, "current-wallpaper")) return K_WALLPAPER_CUR;
if (!strcmp(iface, "wallpaper") && !strcmp(fn, "set-wallpaper")) return K_SET_WALLPAPER;