docs: what a running session can reload after an install (panel modules yes, host/compositor no)
CI / test (push) Failing after 17s
CI / test (push) Failing after 17s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hjq2YbDd5zJXXKWqSR
This commit is contained in:
1 parent
34885bfdda
commit
10659e7655
2 files changed
+39
-2
No files matched your search
@@ -0,0 +1,37 @@
|
||||
# Picking up a new build in a running session
|
||||
|
||||
After `just install-session` the files under `/usr/local` are new, but the running session keeps
|
||||
what it loaded at startup. What can be swapped without logging out:
|
||||
|
||||
| Part | Reload without logout? | How |
|
||||
|---|---|---|
|
||||
| Panel modules (`/usr/local/share/chandra/modules/*.wasm`) | yes | Settings → Panel: remove the module, add it again |
|
||||
| `compositor.wasm` (shell, WM, portal backend) | no | restart the session |
|
||||
| `chandra-host` (`wasmhost`) | no | restart the session |
|
||||
| `config/`, themes, assets | not checked | restart the session to be sure |
|
||||
|
||||
## Panel modules
|
||||
|
||||
Modules are loaded by path. The shell's `load_path` reads the `.wasm` from disk each time, and
|
||||
the host's `plasmoids` `load`/`unload` instantiate and drop it (`wasmhost/bin/plasmoids.mbt`).
|
||||
A module asks for this through the `LoadModule` and `UnloadInstance` requests, handled in
|
||||
`DesktopShell::process_requests` (`compositor/shell/widgets.mbt`). Settings → Panel (the module
|
||||
selector, with reordering) and the "Add widget" file chooser are the UI for it. The loaded set and
|
||||
its order are kept in `~/.config/chandra/panel.edn`.
|
||||
|
||||
So after reinstalling, a module that changed is picked up by unloading and loading it again. A
|
||||
module that imports no new host capability needs nothing else.
|
||||
|
||||
## Not reloadable
|
||||
|
||||
`chandra-host` and `compositor.wasm` are read once when `chandra-session` starts them. There is no
|
||||
signal handler, reload request or file watcher for them. `docs/ARCHITECTURE.md` says so
|
||||
("no hot reload on file change"), and the WM hot-swap in `docs/compositor-design.md` (replaying
|
||||
`list<window-state>` into a new WM component's `sync-windows`) is a design: nothing triggers it
|
||||
yet. Changes to the compositor, WM, portal backend or host need a new session: log out and back
|
||||
in.
|
||||
|
||||
## Status
|
||||
|
||||
Written from reading the code, not from a run: the Panel reload path has not been exercised
|
||||
against an installed build. Correct this page if it behaves differently.
|
||||
Reference in new issue
Block a user