Session settings panel module: switch session restore and window placement on or off
CI / test (push) Failing after 16s

- New 'session-settings' capability (wit/capabilities.wit: settings, is-on, set-setting) and
  'session-settings' panel module: a "Session" button whose popup lists the session settings,
  each with an on/off switch. Clicking a row flips it at once (the list stays open); Up/Down move
  the highlight, Enter or Space flips it, Escape or a click elsewhere closes. In the default
  panel, between Wallpaper and Log out.
- Two settings to start with, kept in state.edn and written only when off (absent means on):
  "Reopen windows at login" (:restore-session, the key session restore already read) and
  "Remember window positions" (:remember-windows; when off, floating windows aren't placed where
  their app was left and new places aren't recorded, but the saved ones are kept).
- Served by both hosts: wasmer stub (native; settings table 6, bit mask in host int 3,
  requests 10/11) and host-wasm (publish-session-settings, set-session-setting request).
- Tests: native end-to-end (open, click both rows, keyboard, Escape), a state.edn round trip
  that checks both settings take effect, and a host-wasm module test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hgxf6exeYrDGcy4WW3
This commit is contained in:
Claude committed 2026-11-25 18:43:27 +00:00
1 parent c169489d44
commit a0b878af23
32 files changed
+1192 -44

No files matched your search

+6
View File
@@ -202,6 +202,10 @@ pub(all) struct DesktopShell {
mut wallpaper_len : Int
/// Which wallpaper is drawn (an index into `@libshell.wallpaper_names`); the wallpaper module sets it.
mut wallpaper_sel : Int
/// Session settings (the session settings module flips them; saved in state.edn): reopen the
/// last session's windows at the next start, and remember where floating windows were left.
mut restore_session : Bool
mut remember_windows : Bool
mut desk_set : Bool
mut desk_x : Int
mut desk_y : Int
@@ -286,6 +290,8 @@ pub fn DesktopShell::new(display : String) -> DesktopShell {
screen_w: 0,
wallpaper_len: 0,
wallpaper_sel: 0,
restore_session: true,
remember_windows: true,
desk_set: false,
desk_x: 0,
desk_y: 0,