Logout button for the session, and a dev install that symlinks into the checkout
CI / test (push) Failing after 28s

- New 'session' capability (wit/capabilities.wit) and 'logout' panel module: a button whose popup
  asks 'Log out | Cancel' (Enter confirms, Escape cancels). Confirming makes the compositor exit,
  which ends the login session; works in the wasm host and the native build. In the default panel.
- session/install.py --link (just install-session-dev): symlink the host, component, modules,
  fonts and config into this checkout, so after one root install a rebuild is just
  'just compositor-wasm host-wasm modules' for the next login. Plain installs still copy.
- Tests: host runtime test for the module, native end-to-end test (click, cancel, confirm).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
nandiandClaude Sonnet 5.5 committed 2026-11-25 02:44:44 -08:00
1 parent c03d4c6c17
commit 0ba975da67
42 files changed
+1033 -152

No files matched your search

+2
View File
@@ -268,6 +268,7 @@ pub(all) enum HostRequest {
LoadModule(String)
UnloadInstance(String)
Browse
Logout
} derive(Eq, Debug)
///|
@@ -281,6 +282,7 @@ pub fn next_request() -> HostRequest? {
Some(LoadModule(p)) => Some(LoadModule(p))
Some(UnloadInstance(s)) => Some(UnloadInstance(s))
Some(Browse) => Some(Browse)
Some(Logout) => Some(Logout)
}
}
+2
View File
@@ -643,6 +643,7 @@ pub(all) enum HostRequest {
LoadModule(String)
UnloadInstance(String)
Browse
Logout
} derive(Eq, Debug)
///|
@@ -662,6 +663,7 @@ pub fn next_request() -> HostRequest? {
5 => Some(LoadModule(req_str()))
6 => Some(UnloadInstance(req_str()))
7 => Some(Browse)
8 => Some(Logout)
_ => None
}
}
+3 -1
View File
@@ -47,7 +47,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_BROWSE,
K_SYSTEM_READ, K_WIN_ALL, K_WIN_FOCUS_ID
K_SYSTEM_READ, K_WIN_ALL, K_WIN_FOCUS_ID, K_LOGOUT
};
typedef struct Env { Inst *inst; int kind; } Env;
@@ -274,6 +274,7 @@ static wasm_trap_t *host_import(void *env, const wasm_val_vec_t *args, wasm_val_
break;
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_INSPECT_SET: push_req(4, a0, NULL); break;
case K_MOD_BROWSE: push_req(7, 0, NULL); break;
case K_MOD_LOAD: { char *s = guest_str(in, a0, a1); push_req(5, 0, s); free(s); break; }
@@ -401,6 +402,7 @@ static int classify_import(const wasm_name_t *m, const wasm_name_t *f) {
if (!strcmp(iface, "windows") && !strcmp(fn, "all")) return K_WIN_ALL;
if (!strcmp(iface, "windows") && !strcmp(fn, "focus")) return K_WIN_FOCUS_ID;
if (!strcmp(iface, "system") && !strcmp(fn, "read")) return K_SYSTEM_READ;
if (!strcmp(iface, "session") && !strcmp(fn, "logout")) return K_LOGOUT;
if (!strcmp(iface, "layout-control") && !strcmp(fn, "layout-modes")) return K_LAYOUTS;
if (!strcmp(iface, "layout-control") && !strcmp(fn, "current-layout")) return K_LAYOUT_CUR;
if (!strcmp(iface, "layout-control") && !strcmp(fn, "set-layout")) return K_SET_LAYOUT;