Commit Graph
46 Commits
Author SHA1 Message Date
nandiandClaude Sonnet 5.5 6aba9b6a4f Compile the compositor to a wasm component, run by a small wasmtime host
CI / test (push) Failing after 22s
The whole compositor (Wayland server, window manager, scene, rasteriser, shell) now builds as
build/components/compositor.wasm: a component that imports only moonplasma:host/sys
(wit/host/sys.wit: sockets + SCM_RIGHTS, memfd, poll, spawn, files, clock) and exports run().
host-wasm/ is the native side: a wasmtime program implementing that interface with libc.

- compositor/sys: per-target backends (sys_native.mbt over the C shim, sys_wasm.mbt over the WIT
  imports) behind one API; wayland/nested/host/shell/scene/renderer/gfx build for wasm unchanged.
- compositor/app: the entry point (arg parsing + main loop) as a library for both targets;
  --serve keeps refreshing a PNG so a live compositor can be inspected without a display.
- compositor/font, compositor/wasm: wasm-side placeholders (bitmap font; no panel modules yet,
  since a component can't embed a second wasm runtime: that becomes a host import).
- scripts/gen-native-stubs.py: native stand-ins for wasm-only generated imports.
- just compositor-wasm / host-wasm / run-wasm.

Verified: foot connects to the component's socket and renders into it; native build and
tests unchanged (16/23, the same 7 need unbuilt panel modules).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-25 01:41:31 -08:00
nandiandClaude Sonnet 5.5 92d2b29889 just build no longer builds tcc: use $TCC, an already-built vendored tcc, or tcc on PATH
CI / test (push) Failing after 35s
scripts/tcc/tcc resolves the compiler (and errors with how to get one if none exists);
tcc-build stays as an optional recipe. bench no longer depends on it either.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-25 01:27:00 -08:00
nandiandClaude Sonnet 5.5 1bbdf58372 justfile: add clean (keeps the built tinycc) and clean-all
CI / test (push) Failing after 10m34s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-25 01:24:31 -08:00
nandiandClaude Sonnet 5.5 a0872c9b40 just bench: time the native build (cold / warm / one-file edit), tcc vs system cc
CI / test (push) Failing after 11m6s
scripts/bench-build.sh copies the sources to a temp dir with its own target dir, so it
never touches _build/ or files being edited. just bench [runs] ["tcc cc cc-release"].

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-25 01:13:05 -08:00
nandi 69a1a0738c Merge commits a9417fbccf
CI / test (push) Failing after 28s
2026-11-25 01:04:11 -08:00
nandiandClaude Sonnet 5.5 a9417fbccf Resize floating windows by dragging their corners and side edges
CI / test (push) Failing after 15s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-25 00:44:34 -08:00
nandiandClaude Sonnet 5.5 8a3ea16b1c Drag windows by their title bar
CI / test (push) Failing after 17s
A press on a title bar (outside the buttons) focuses the window, floats it if it was
tiled (WmState::float_window) and starts a move drag; motion moves it, release ends it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-25 00:42:38 -08:00
nandiandClaude Sonnet 5.5 306a7c121e Clipboard: implement wl_data_device selection (copy/paste between clients)
The data-device manager was accepted but ignored. Now set_selection is tracked,
the focused client is offered the selection (data_offer/offer/selection) on focus
change and on update, receive() forwards the fd to the owner as source.send, and
the selection is cleared when its owner goes away. Drag-and-drop is still unsupported.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-25 00:41:44 -08:00
nandiandClaude Sonnet 5.5 f05677178a Panel hover events for modules; spawned apps get default SIGCHLD and keep the real bus for flatpak
CI / test (push) Failing after 16s
- shell: the module under the pointer gets PointerMove, the one it left gets PointerLeave
  (hover feedback, e.g. the dock's magnifying tiles)
- sys: reset SIGCHLD to SIG_DFL in the child before exec (SIG_IGN is inherited and breaks
  apps that wait() on helpers, e.g. terminals); flatpak run keeps the real session bus
- inspector: drop the redundant 'scroll for more' hint next to the scrollbar

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-25 00:41:07 -08:00
nandiandClaude Sonnet 5.5 95a21a0b84 Add layout module: Tile | Float toggle widget for the panel
CI / test (push) Failing after 1m5s
Two-segment switch over the layout-control capability: click flips tiling <-> floating
(monocle goes to floating). Includes generated bindings and an updated wasm test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-25 00:39:32 -08:00
nandiandClaude Sonnet 5.5 82cac8a915 wl_shm: keep a buffer valid after its pool is destroyed
CI / test (push) Failing after 18s
Qt Quick apps (kwi) render through Mesa's software EGL path, which creates a pool,
creates one buffer and destroys the pool at once. We closed the fd and dropped the
pool, so every snapshot returned None and the window stayed blank. The pool now lives
until its last buffer is destroyed (re-keyed so recycled client ids can't collide).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-25 00:24:33 -08:00
nandiandClaude Sonnet 5.5 df1f37ee78 Inspector popup: show module file name and clip the note to the popup width
CI / test (push) Failing after 28s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-25 00:16:27 -08:00
nandiandClaude Sonnet 5.5 6fc921b431 Add dock module: dock-style quick launcher with magnifying app tiles
CI / test (push) Failing after 23s
- lib/dock: tile layout, hit-testing, magnification, per-app colours (tested)
- components/dock: plasmoid module (imports only app-catalog + app-launch)
- shell: panel widgets now get pointer-move / pointer-leave while hovered

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-25 00:14:29 -08:00
nandi 79321790a1 Merge branch 'main' of https://git.site.latha.org/experiments/moon-plasma
CI / test (push) Failing after 20s
2026-11-25 00:10:16 -08:00
nandiandClaude Sonnet 5.5 bf07af2c43 Add the inspector panel module (Interface Explorer toggle): source and bindings
components.txt listed it but no source existed, so the panel had no Interface
Explorer button. Panel button that toggles the shell's inspect mode via the
inspector capability.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-25 00:10:11 -08:00
nandiandClaude Sonnet 5.5 bc1e3dfdbd xdg_popup support: right-click menus in client apps (Konsole etc.)
CI / test (push) Failing after 37s
- server: xdg_positioner state, get_popup placement + configure, popup commits,
  popup_done; popups share the toplevel table so pointer/keyboard routing is reused
- compositor: popups drawn above windows and panel, input goes to the popup under the
  pointer, keyboard focus follows the popup, a click outside dismisses them
- test: a client opens a popup, clicks inside it, and is told to dismiss it

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-25 00:03:49 -08:00
nandi 3b2e19ace5 Merge commits bca69d8c90
CI / test (push) Failing after 54s
2026-11-24 23:47:09 -08:00
nandiandClaude Sonnet 5.5 200b02d0f1 Add the module-manager panel module (source, bindings)
CI / test (push) Failing after 15s
components.txt listed it but no source existed, so just modules skipped it and the
picker said 'Module manager not found'. Panel button + popup: loaded instances
(click to unload), available modules (click to load), Browse...

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 23:42:50 -08:00
nandiandClaude Sonnet 5.5 bca69d8c90 Desktop card: click and drag it around the wallpaper
Press on the card (when no window covers it) to grab it; it follows the pointer,
clamped to the screen, with a hand cursor on hover and grabbing while dragged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 23:41:31 -08:00
nandiandClaude Sonnet 5.5 8724805a72 Right-click Replace only offers modules of the same kind (same WIT world)
CI / test (push) Failing after 16s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 23:41:07 -08:00
nandiandClaude Sonnet 5.5 783618b89f build-modules: skip modules whose source isn't in the tree instead of failing
CI / test (push) Failing after 29s
just run depends on just modules; a component listed in components.txt without a
built core module (pulse, tasks, layout, ...) aborted the whole build. It now warns
and carries on, so the panel loads whichever modules do exist.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 23:38:40 -08:00
nandiandClaude Sonnet 5.5 0145981c6a Wasm panel modules, widget host, merged plasmoid host design, and shell/UI work
Panel and wasm host
- The panel is built from wasm plasmoid modules (compositor/wasm: wasmer-backed host).
  Modules get capabilities by importing host interfaces; the host publishes data tables
  and serves a request queue (launch, focus window, set layout, inspector, load/unload
  modules). New WIT: windows, layout-control, inspector, modules, system.
- Merged two competing host designs: generic tables + requests are the base; the
  `system` snapshot and the id-stable `windows.all/focus` (Desktop Pulse) run on top of it.
- Panel widgets: load a .wasm from a path or file chooser, reorder by dragging,
  right-click replace/remove/add, saved to panel.edn.
- Desktop widget, system sampler (sysinfo), app catalog/humanised names, Interface
  Explorer (inspector), real font rendering (compositor/font, assets/fonts).

Compositor
- Drag the divider between tiled windows; lower tiled rows leave room for the title bar.
- Title-bar buttons, 12-hour clock, truncated titles, task-list/layout menus.
- DRM/KMS session, tcc debug builds (vendored tinycc incl. conftest.c), justfile
  recipes (modules, run, test), pixi.toml.

Known gaps
- The sources for the pulse, tasks, layout, inspector, module-manager, moon-* and
  clock-digital12 modules are not in the tree yet, so `just modules` stops at pulse and
  the host tests that load those modules fail until they land.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 23:38:05 -08:00
nandiandClaude Sonnet 5.5 080377fd79 Wayland: decode UTF-8 strings from clients (titles like 'Session Chooser — Kate' showed as mojibake)
CI / test (push) Failing after 38s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 22:08:34 -08:00
nandiandClaude Sonnet 5.5 50442a7e30 Vendor tinycc's conftest.c (ignored by tinycc's own .gitignore, so ./configure failed)
CI / test (push) Failing after 39s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 21:20:28 -08:00
nandiandClaude Sonnet 5.5 b2557aca52 DRM/KMS + libinput backend and a Moon Plasma login session
compositor/kms: libseat (device access, VT switching), DRM dumb buffers with page
flips and a hardware cursor, libinput keyboard/pointer, xkbcommon keymap and
modifiers. --drm runs the compositor on the real display at the monitor's native
mode. session/ holds the display-manager entry, launcher script and installer
(just install-session). Untested on hardware: refuses to start inside another
session.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 20:59:54 -08:00
nandiandClaude Sonnet 5.5 5b32cf9808 Interface Explorer: compact dialog (14 rows) with mouse-wheel scrolling and scrollbar
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 20:58:06 -08:00
nandiandClaude Sonnet 5.5 7a37039673 Vendor tinycc and build the compositor in debug with it (just build/run)
CI / test (push) Successful in 38s
moon adds -DMOONBIT_NATIVE_NO_SYS_HEADER whenever the C compiler is tcc, which
compiles the system runtime out and breaks linking a standalone exe; the
scripts/tcc/tcc wrapper drops that flag. just tcc-build builds third_party/tinycc
into _build/tcc; build-release keeps the optimised system-cc build.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 20:53:51 -08:00
nandi 49e91b4c01 Merge branch 'main' of https://git.site.latha.org/experiments/moon-plasma
CI / test (push) Successful in 39s
2026-11-24 20:21:54 -08:00
nandiandClaude Sonnet 5.5 57d5376211 Fix launcher search: key_name returned code-unit numbers instead of characters
String indexing yields a UTF-16 code unit, so 'a' became "97" and the launcher
rejected it. Convert to Char first; the input test now types into the search.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 20:21:46 -08:00
nandiandClaude Sonnet 5.5 7154312919 Drag the divider between tiled windows to resize them
CI / test (push) Successful in 37s
- lib/wm: split handles, drag_split, vertical rows now leave room for the lower
  window's title bar (fixes overlapping title bars)
- compositor: pointer press/move/release on a divider resizes the split, with an
  ew/ns-resize cursor; button releases are only forwarded after a forwarded press

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 20:12:13 -08:00
nandiandClaude Sonnet 5.5 ee698c9846 Decorations: truncate window titles so they never draw over the title-bar buttons
CI / test (push) Successful in 25s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 20:08:58 -08:00
nandiandClaude Sonnet 5.5 9e7687bea8 Panel: truncate task-button titles to fit their pill
CI / test (push) Successful in 38s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 20:06:53 -08:00
nandiandClaude Sonnet 5.5 9b31a7c476 Renderer: add punctuation glyphs (~ @ ( ) etc.) to the bitmap font
CI / test (push) Successful in 25s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 19:53:50 -08:00
nandiandClaude Sonnet 5.5 abdc5de8e3 Reserve title-bar height at the top of the work area so tiled windows' title bars aren't cut off
CI / test (push) Successful in 28s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 19:52:29 -08:00
nandiandClaude Sonnet 5.5 59ea224d38 12-hour clock and hover-dependent cursor
CI / test (push) Successful in 45s
- timefmt.hhmm12 + render_digital(hour12=); compositor panel shows '7:51 PM'
  (wasm clock component keeps 24h by default)
- wp_cursor_shape_v1: server lets clients pick their cursor; nested window
  forwards the shape to the host. Launcher button/entries show a hand, the
  search field a text cursor, client windows what the client asked for.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 19:51:16 -08:00
nandiandClaude Sonnet 5.5 a63f65806d Make the desktop interactive: pointer/keyboard routing, launcher popup, app launching
CI / test (push) Successful in 25s
- server: wl_pointer/wl_keyboard events (enter/leave/motion/button/key/modifiers),
  host keymap shared with client keyboards
- nested: receives host pointer + keyboard + keymap, queues InputEvents
- host: routes input to the launcher popup or the window under the pointer;
  click-to-focus moves keyboard focus
- shell: launcher button opens lib/launcher popup; entries start real apps
  (foot, konsole, dolphin, firefox, kate, systemsettings if installed) with
  WAYLAND_DISPLAY pointed at the compositor
- sys: has_exe + spawn
- e2e test for input delivery and the launcher popup

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 19:11:15 -08:00
nandiandClaude Sonnet 5.5 a1b85474f8 Nested window backend: run the compositor in a window on the host Wayland session
CI / test (push) Successful in 26s
The compositor opens an xdg_toplevel on $WAYLAND_DISPLAY, presents frames via
wl_shm with frame-callback pacing and forwards host pointer input to the gfx
surface. just run now uses it (release build); run-headless keeps the old mode.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 19:06:51 -08:00
nandiandClaude Sonnet 5.5 a265eebf02 justfile: add view recipe (one-frame PNG snapshot)
CI / test (push) Successful in 42s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 19:04:24 -08:00
Antigravity 7caadb3f7f feat(gfx): integrate wasi-gfx for loading and presenting GUI
CI / test (push) Successful in 24s
2026-11-25 02:54:03 +00:00
nandiandClaude Sonnet 5.5 ccb809bdc3 Add justfile with build, run, client, test, frame, ci recipes
CI / test (push) Successful in 24s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 18:51:22 -08:00
nandiandClaude Sonnet 5.5 769ab829c8 Load the real desktop shell (lib/shell, panel, launcher, clock) into the native compositor
CI / test (push) Successful in 34s
Replaces the hardcoded build_shell_ops with compositor/shell, which drives the
same pure lib/* logic the wasm components wrap and adapts it to scene ops.
Adds a wall-clock FFI and native stubs for the wasm-only theme bindings.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 18:48:34 -08:00
nandiandClaude Sonnet 5.5 3cb8417699 Compositor: advertise wl_subcompositor and wl_data_device_manager so real clients (foot) load
CI / test (push) Successful in 59s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 18:40:24 -08:00
Antigravity ae4f3fa93c Replace Rust host-native with 100% pure-MoonBit Wayland compositor
CI / test (push) Successful in 36s
2026-11-25 01:18:46 +00:00
Antigravity 17a8a46cfd Spike Wayland compositor, hybrid MoonBit WM, SSD decorations, and wasmtime native host 2026-11-25 00:42:01 +00:00
nandi 880ecd4102 M0: WIT package, MoonBit components, JS host, docs, CI (#1)
CI / test (push) Successful in 19s
2026-11-24 23:51:26 +00:00
nandi e5548fc067 Initial commit 2026-11-24 23:14:29 +00:00