- Scan the photo viewfinder with OpenCV's QR detectors (aruco, then plain), off the preview thread, not while recording or in the gallery
- A card shows the code's text: Open for web links, Join for Wi-Fi codes (NetworkManager over D-Bus), Copy; nothing happens before a tap
- QR pill turns scanning off
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Read the app catalog again when the Applications menu opens if .desktop files were added or removed (and on Reload); it was only read at login, so a PWA installed during the session was missing from the menu and its search
- List a Chromium browser's web apps in their own category ("Chrome Apps", "Chromium Apps", ...), as Plasma does; don't take one for the default browser
- Category column and a scrollable list (wheel, scrollbar) when the catalog doesn't fit the menu
- Show menu-spec main category names instead of the first Categories= entry; sort apps A-Z (they were sorted shortest name first)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Drop text-input and keyboard focus references when a client destroys a wl_surface, without sending leave for it
- Skip wl_keyboard.leave and zwp_text_input_v3.leave/enter for surfaces the client no longer has
- Skip pointer enter/leave for missing subsurfaces or toplevels
- Add a regression test: closing a second toplevel (e.g. OAuth popup) must return focus to the main window without leaving stale events
- Map VolumeUp, VolumeDown, and Mute keys to wpctl (PipeWire) or pactl, run asynchronously so the compositor never blocks
- Hold a volume key to repeat it; volume keys also work while the screen is off, without waking it
- Keep volume keys as the shutter when chandra-camera has focus; Mute still toggles system audio
- Add `chandra-ctl volume [up|down|mute|unmute|toggle|PCT|status]` and a transient Volume OSD
- Add volume-up, volume-down, and volume-mute entries to the shortcut table
- Reuse per-state scratch buffers in the Quad Bayer ISP path to cut per-frame allocations; never return an alias to the scratch output
- Release memoryviews and run gc before closing mmaps
- Seed recording from latest_frame() and emit it on stop if no fresh frame arrived, so short clips still produce a valid MP4
- Drop the initial push of the start frame
- Lower H.264 CRF from 20 to 23
- Compute ISP stats on a coarser subsample (//96 instead of //160)
- Pass -enc_time_base demux to ffmpeg so VFR video keeps the source timing
- Read the encoder's stderr only on failure, and always close the pipe
- Mirror the same ffmpeg flag and stderr close in test_camera.py
- Add chandra-camera-isp.c (C/OpenMP) for Quad-Bayer unpack, CCM, and tone mapping, with a NumPy fallback when it is not built
- Add non-blocking contrast-detection VCM autofocus, with lens subdev discovery on the sensor's I2C bus
- Tune Quad-Bayer AE: a video-mode vblank cap, damped steps, and full analog gain before extending blanking
- Record variable-frame-rate video through a streaming Matroska muxer, and count dropped frames
- Ship libcamera IPA tuning files for imx376, imx519, and uncalibrated sensors
- Map camera buffers by fd and sync them with dma-buf ioctls
- Show the on-screen keyboard when the password dialog opens or reopens, and hide it on submit. Tapping the password field reopens it after a manual Hide.
- Route Chandra Remote text commits (including Enter, Tab, and Backspace) into the password dialog while it is up.
- Keymap: read hex keysyms (`0x31`, `0x20ac`, `0xffb7`) from libxkbcommon text-v1 keymaps, and accept `0x01000000`-range Unicode keysyms.
- Keymap: keypad keys produce digits when NumLock (Mod2) is active.
- Tests cover hex keysym parsing, NumLock keypad mapping, and the OSK/remote-text flow.
- Boost the backlight to 90% while enrolling with the light on or while sign-in is scanning, then restore the previous level when that ends or the window closes.
- Add a Light: On/Off toggle (L key) to the Face window; the backdrop turns soft white while the light is on.
- Quad-Bayer AE: compute the low-light gain once and cap it by the highlight limit, so ramp-up and highlight back-off agree.
- Tests: backlight round-trip through the Face window, Quad-Bayer debayer color/low-light/dark-frame cases, and the AE ramp, back-off and restore order.
- Camera: on imx371, configure a Raw-only stream and drive exposure, vblank, analogue gain and digital gain through the sensor subdev (QuadSensorAE). Falls back to the viewfinder+raw configuration if the subdev is not found or setup fails.
- Camera: debayer 2x2-binned high-quality Quad-Bayer frames with an auto black level, a tone LUT, and CLAHE on strongly boosted frames.
- Face: add detect_score (default 0.65) and lower the default dark threshold from 25 to 12.
- Face: retry detection and embedding on gamma-lifted, CLAHE-enhanced frames when the image is dark.
- remote/: shared-memory framebuffer mirror served as RFB 3.8 (VNC, port 5900) and an HTTP/WebSocket PWA (port 6080), bound to the Tailscale interface and loopback by default
- Compositor: remote pointer, button, scroll, modifier, key, key-tap, text and clipboard input, routed past OLED blanking
- chandra-ctl: add status, refresh and osk commands; add input-* and clipboard-set for remote control
- Camera: debayer 10-bit CSI-2 Quad-Bayer frames for imx371 and high-quality still capture
- Camera: rotate frames by the libcamera mounting angle (CCW for 90), fix the expected test values, and restyle the UI for a dark theme
- Replace the in-process GTK3 run_gui() with run_worker(), which owns the camera engine.
- Worker streams downscaled Cairo BGRA frames to stdout, with a length header per frame.
- Worker reads UI commands from stdin (switch, snap, snap_full, rec_start, quit) and emits state lines (info, active, flash, toast, saved_photo, rec_state).
- SIGINT/SIGTERM set a stop flag so the worker shuts down cleanly.
- Discover libcamera cameras, falling back to V4L2; label them Back, Front or External and pick the rear sensor first
- Photo mode: JPEG saves to ~/Pictures/Camera, with an optional high-res still capture
- Video mode: H.264 MP4 recording through ffmpeg, saved to ~/Videos/Camera
- Rear torch LED toggle via sysfs, falling back to logind SetBrightness
- GTK3 + Cairo Wayland UI with a viewfinder, timer, grid, camera switch and gallery view
- Add the desktop entry, icon and camera tests
- Add compositor/shell/backlight.mbt for backlight control in the shell
- Update wit/capabilities.wit and wit/host/plasmoids.wit, then regenerate the component and interface ffi.mbt bindings (mostly export reordering)
- Add world/launcher-widget/README.md
- Rotate the display 0/90/180/270 degrees in the KMS host, with scanout and libinput touch/pointer coordinates transformed to match
- Add a touch "Rot" pill beside "KB": tap turns 90 CW, long-press or right-click flips 180
- Add `chandra-ctl rotate [cw|ccw|flip|0|90|180|270|status]`; CHANDRA_ROTATE sets the initial orientation
- Add session/chandra-auto-rotate, which follows iio-sensor-proxy orientation (disable with CHANDRA_AUTO_ROTATE=0)
- Advertise window_menu, maximize, fullscreen and minimize via xdg_toplevel.wm_capabilities (xdg_wm_base v5+)
- Add docs/handset.md covering handset touch, scaling, OSK and rotation
- Opens for text-input-v3 fields, terminals, launcher search, Network password, emoji picker and the password dialog; a KB pill summons it manually.
- Enabled on CHASSIS=handset; CHANDRA_OSK=1|0 overrides, and it stays off under CHANDRA_TEST_CONFIG.
- Work area and panel popups shrink above the keyboard so focused content stays visible.
- Keys send evdev codes with Shift, Ctrl and Alt modifiers.
- chandra-ctl: `screenshot [PATH]` saves a PNG without opening the editor.
- Key names cover the full punctuation set and shifted symbols.
- Launcher plasmoid min width drops from 60 to 36.
- kms: touch down, move and up drive the pointer and send BTN_LEFT, so touchscreens work without a mouse. Only the first finger (tracked by seat slot) controls the pointer.
- A held touch is released on VT switch and on close, so the button is never left stuck down.
- setup-toolchain.sh: fetch wasm-tools, wit-bindgen, wasmtime and the wasmer C API for aarch64 as well as x86_64. Other architectures still fail with an error.
- Add favicon.svg: a crescent moon on a dark rounded tile
- Link it from host/web/index.html as the page icon
- serve.mjs: allow /favicon.svg through the path filter and serve it as image/svg+xml
Under --x11 with a host EWMH window manager (e.g. Openbox in Gamerig),
Chandra is one top-level X11 client while other apps run directly on Xorg,
so the dock only saw Chandra's Wayland windows.
- compositor/x11: intern EWMH/ICCCM atoms and track _NET_CLIENT_LIST,
_NET_ACTIVE_WINDOW, titles, and window states via PropertyChangeMask,
filtering non-taskbar/child windows and adding focus, close, minimize,
and toggle-maximize EWMH/ICCCM actions.
- compositor/shell: add resolve_external_app_id (matching WM_CLASS and
StartupWMClass against installed .desktop files) and publish_windows.
- compositor/host: bridge ExternalWindow entries with bit-30 tagged IDs
into shell.windows/win_list while keeping Wayland wm.windows and session
snapshots untouched, and route activate_task / window_command actions.
- compositor/app, compositor/bin, docs/x11.md: wire external window sync
before X11 input handling and register ExternalWindowHandler.
Verified: moon test --target native compositor/x11 compositor/shell (38/38),
external_windows_test.mbt + dock_test.mbt (3/3), build-compositor-wasm.sh,
and moon build --target native compositor/bin.
wasmhost leaked the arguments of every host call. wt_stub.c handed them to
the MoonBit dispatcher expecting it to own them, but the compiler borrowed
the parameter, so nothing released them (about 600 kB/s in a test with one
busy terminal; a long session reached over 16 GB resident plus swap).
MoonBit now allocates the buffer and C copies into it.
Also:
- Unannotated pointer FFI parameters default to #owned, and none of these C
functions released theirs, including the native KMS present (a whole frame
each). Annotated #borrow; the wasmhost build now fails on that warning,
which --warn-list -a had hidden.
- Watched launches forked the whole compositor, and each monitor kept a
snapshot of its heap for the app's lifetime. It now posix_spawns a fresh
copy of the binary that takes over before main.
- The host logs memory, window buffers and images once a minute.
- chandra-session keeps the previous log as session.log.1.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hj5m35Lj6Rt9vwwLGZ
The fetch script downloaded through mktemp (0600) and the installer kept
that mode, so the session couldn't read the root-owned font and reported
it missing. The failure was also cached until the next session.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
AppImage managers write icons as extensionless files, so those apps got the
generic icon. Any absolute path is now tried, and the loaders tell PNG and SVG
apart from the contents.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Compositor-drawn Win+. style picker. The focused app keeps keyboard focus so
its text-input-v3 field stays enabled; the emoji goes in with commit_string,
or onto the clipboard with a visible notice when the app has no text field.
Shortcut lives in the shortcut table (rebindable in Settings > Shortcuts).
- compositor/wayland/text_input.mbt: zwp_text_input_manager_v3 (global 12)
- compositor/emoji: Emoji 18.0 + CLDR 49 data (Unicode License), search,
picker model, CBDT/CBLC + GSUB reader for Noto Color Emoji
- Chandra's own pinned bitmap Noto Color Emoji (scripts/fetch-emoji-font.sh,
just emoji-font); Fedora's COLRv1 copy can't be drawn. Missing font shows
an error panel.
- raster WIT: emoji-font, emoji-has, emoji-image; served by wasmhost
- state.edn :emoji {:recent [...] :skin-tone n}
- tests incl. a fake text-input client; docs/emoji-picker.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hkABDGJixotaqFv2X2
polkit 126+ runs the password dialog's PAM stack in polkit-agent-helper@.service,
whose PrivateDevices=yes leaves no cameras in /dev, so the dialog reported "no
camera" while sudo and enrolling worked. Install a drop-in that allows only V4L2
devices and keeps the capability and syscall limits PrivateDevices= added.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
V's session.log had kwi (a Flatpak) failing with "bwrap: Can't find source path
/run/user/1000/doc/by-app/org.kde.kwi". At login chandra-session restarts
xdg-desktop-portal, and xdg-document-portal stopped and started with it in the
same second (V's journal, 21:36:12); a Flatpak started in that gap, such as one
session restore reopens, finds no FUSE mount to bind into its sandbox.
When flatpak is installed, chandra-session now asks the document portal for its
mount point (which also starts it), waits up to 5 s for the FUSE mount and
checks it answers. If it doesn't, the reason goes to the log and into
CHANDRA_SESSION_ERRORS, which the shell shows as an error notice once the desktop
is up (DesktopShell::show_session_errors). A missing dbus-send is reported too.
Tested: the snippet against a real xdg-document-portal on a dbus-run-session bus
(mounted after 0 waits) and with an unreachable bus (error text); the notice in
compositor/host/launch_test.mbt and headless with build/wasmhost.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hiGJWeuHiTgtoyB4kb
A nested compositor's private D-Bus kept the session's XDG_RUNTIME_DIR, so
an xdg-document-portal activated on it mounted over $XDG_RUNTIME_DIR/doc and
removed the mount when the bus exited. The session's portal kept running
without it, and flatpak apps stopped starting.
The bus now has its own config that starts the document portal with a runtime
directory per compositor. scripts/test-private-bus.sh covers it. The KDE
colors test gets its own runtime directory for the same reason.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
V: "kwi not starting from app menu or dock". Kwi is a Flatpak, and bwrap died
before it opened a window ("Can't find source path /run/user/1000/doc/by-app/
org.kde.kwi"); Chandra forked apps and forgot them, so the failure only reached
the session log and the click did nothing visible.
Every app the Applications menu, the dock, Super+1..9 and session restore start
now runs under a small monitor (sys spawn-watch, compositor/sys/sys_stub.c): it
copies the app's output to the session log as before, keeps its last 2 KiB,
and reports how sh -c CMD exited on a socket the main loop wakes on. The shell
(compositor/shell/launch.mbt) shows a red error notice for 15 s, and logs it,
when the app exits non-zero or by a signal within 30 s, or exits 0 without ever
opening a window here (after a 2 s grace for single-instance hand-offs): the
first line says what happened, then the command and the last lines it printed,
repeats folded ("(3 times)"). Status 127/126 say "command not found" / "not
executable". Launched apps no longer inherit the compositor's fds.
chandra-ctl launch ID starts a desktop app exactly as the dock does.
Tests: compositor/host/launch_test.mbt (bwrap-style failure incl. drawn notice,
127, SIGSEGV, exit 0 without a window, an app that keeps running), unit tests
in launch.mbt. Checked end to end with build/wasmhost + compositor.wasm
headless and a Flatpak-style kwi desktop file: chandra-ctl launch org.kde.kwi
shows the notice.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hiGJWeuHiTgtoyB4kb
Every screenshot now opens in an editor after KDE Spectacle's annotation mode:
Arrow, Line, Rectangle, Ellipse, Pen, Highlighter, Text, Number markers, Blur,
Pixelate, Redact and Crop, 8 colours, 3 sizes, undo/redo. Enter saves and
copies, Ctrl+C copies only, Esc discards.
- Drawn by the compositor (shot_editor.mbt), keyboard owned by it while up.
- Annotations are drawn into the picture's pixels at full size (annotate.mbt),
so what is shown is what is saved. Blur = 6x6 block average + 3 box-blur
passes; redact is opaque; both touch only their box (pixel tests).
- The picture goes to the renderer as <=2 MB strips: one 8 MB image-pixels
call exhausts wasmtime's hostcall fuel and killed the wasm host.
- Frame callbacks are held while the overlay/editor freeze the screen, so apps
behind stop drawing (0% CPU vs 52% with a full-screen animating app).
- wasmhost: error buffer 16 KB so trap causes aren't cut off; image-pixels
limit 1024 -> 16384 a side (both hosts).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hh3TaFJh7nhCxAjV4Q
The compositor ignored wl_data_device.start_drag, so no drag ever reached a
window: Dolphin, GNOME Files, Chrome tabs and text could not be dropped
anywhere, not even inside the window they started in.
Now (compositor/wayland/dnd.mbt, compositor/host/dnd.mbt):
- start_drag while a button is held on the client turns the pointer into the
drag (the origin gets wl_pointer.leave); a request that arrives after the
release is cancelled at once.
- The surface under the pointer (windows, subsurfaces, menus) gets
data_offer + offer + source_actions + enter, then motion and leave; a drag
without a source stays inside its own client.
- accept -> source.target, set_actions -> copy/move/ask agreed and sent as
offer.action and source.action (version 3), version 1/2 clients copy.
- Release drops when the target accepted a type and an action: drop,
dnd_drop_performed, and finish -> dnd_finished; otherwise cancelled + leave.
Escape cancels. The window dropped on becomes active, so Dolphin's
Copy/Move Here menu opens as a menu of a focused window.
- The drag icon is drawn under the pointer at its hotspot (attach offsets and
wl_surface.offset), above windows and menus.
- A source, icon or client going away ends or updates the drag.
Tests: compositor/host/dnd_test.mbt (fail on the previous commit). Checked
headless with real Dolphin 23.08 (Qt 5.15) and GNOME Files 46 on both the
native build and the wasm build: Files -> Dolphin, Dolphin -> Files,
Dolphin -> Dolphin (Move/Copy/Link menu) and a move into a folder inside Files.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hjWb2dWbR1K7qoMgWP
The first version ran polkit registration, polkit-agent-helper-1, the PAM
conversation and the drawing inside the compositor's frame loop, with
overlapping state in two layers. A helper that quit before asking was taken
for a wrong password and restarted in a loop that wiped the field (typing
seemed dead), a refused registration quietly started a third-party agent,
and the dialog and the Face unlock window each grabbed the keyboard.
Now:
- chandra-polkit-agent (compositor/authagent, /usr/local/lib/chandra) does
polkit and PAM. Each request runs one state machine (polkit/machine.mbt:
starting, asking, checking, failed, done). A check that quits or can't
start is Failed with the reason and waits for Try again; only a wrong
password starts the next check by itself. It logs each step to stderr
(the session log), never the typed text.
- The compositor starts it on a socket pair and only draws what it says
(host/auth.mbt, auth_draw.mbt; line protocol in polkit/wire.mbt). One
input owner (grab_input): the dialog, else the Face unlock window.
- No silent fallback: if the agent can't run, polkit refuses it, polkit
doesn't answer in 10 s, or it dies, a notice on screen says why (a crash
after it ran restarts it, up to 3 times, and says so). The third-party
agent runs only when the Settings switch is off.
- chandra-ctl auth-demo [password|face|face-ok|die|slow|users] shows the
real dialog with a pretend check (password "demo"), no root needed;
chandra-ctl auth-status says whether the agent is registered.
- just install builds and installs the agent (just auth-agent).
Tests: polkit_test (link, machine, view, helper Gone) and auth_test end to
end through handle_input: the agent loop in-process against a mock polkit
on a private dbus-daemon plus a mock helper, and the real agent program
spawned by the compositor (demo, and registered with the mock polkit).
Typing on a real xkb keymap, wrong password, cancel, withdrawal, helper
quitting early or missing, polkit refusing, agent not starting or crashing,
demo modes, Face unlock Apply. 170/170 host and 20/20 polkit tests pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hgkRPrAzXECBUGmNEE
V: "kwi is having problems selecting text". Two compositor gaps:
- No implicit pointer grab. A drag that started in a window lost it as soon as the pointer
crossed its edge (onto the frame, the panel, a divider or another window): the client got
wl_pointer.leave mid-drag (Qt then forgets the held button), and the release went to the
other window or nowhere, so the terminal's selection never ended and kept following the
pointer. Selecting past the top/bottom edge to scroll, which Kwi and Konsole autoscroll on,
could not work. Now a press forwarded to a client grabs the pointer: motion (in that
surface's coordinates, also outside it), the wheel and every button go to it until the last
button is up; then the pointer goes to whatever is under it. Anything that takes the pointer
(a window move or resize, the overview, a screenshot) ends the grab as before.
- No primary selection. zwp_primary_selection_device_manager_v1 was not offered, so Qt's
QClipboard::supportsSelection() was false: selected text was never put on the primary
selection and a middle click pasted nothing. Now offered (v1), with the offer sent to the
focused client like the clipboard.
Checked headless with Konsole (Qt 5 Wayland): a selection dragged out of the window keeps
extending, is set as the primary selection on release, and a middle click in another Konsole
window pastes it. Tests in selection_test.mbt (both grab tests fail without the fix).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5himKXPLcfCZN6BXByd
"no camera at PATH" now says why (not there or a broken link, permission
denied, not a V4L2 device, a metadata node rather than the picture node,
OpenCV couldn't start it or it gives no picture: another app using it) and
lists the cameras found (VIDIOC_QUERYCAP on /dev/v4l/by-id/* and /dev/video*).
New commands: `chandra-face cameras`, `chandra-face set-camera PATH` (root,
edits device in face.conf after checking it is a capture node). The Face
unlock window shows the cameras found with a Use button (one password), then
opens again. just install prints NOT READY with the reason when the
configured camera can't be used.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hhiJfJNAYqWzQiuKMf
For "this window won't resize" reports (V's Gajim still not resizing on real hardware,
while a libadwaita window built like Gajim's resizes headless on both hosts): one line per
window with its frame kind (client-frame / chandra-frame), layout state (floating, tiled,
maximized, fullscreen), box, buffer, the client's shadow per side, min/max size and title,
then the pointer position and what it's over (a resize grip and which edge, a window, a
title bar, a tiling divider, the panel, the desktop).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hiu4r7mEXBdKY6cgv6
Chrome draws the bubbles of its toolbar buttons (bookmark star, downloads, extensions) as
wl_subsurfaces of the window, not xdg_popups. Chandra accepted wl_subcompositor.get_subsurface
but never drew a subsurface or sent it input, so those buttons seemed to do nothing (the
bookmark was even added, with no bubble). Menus (xdg_popup) were unaffected.
- Server: subsurface state (parent, position) per child surface; a child commit or
set_position reports SubsurfaceCommitted(window, child, x, y, buffer) with the position
added up to the window's surface, and a null buffer or destroy reports SubsurfaceUnmapped.
- Host: HostWindow.subs, drawn above the window as undecorated scene nodes (no change to any
renderer); the pointer enters the topmost subsurface under it (ptr_sub) with its own
coordinates, so clicks reach the bubble.
Checked headless with Chromium 158 on Ozone Wayland, in both frame modes: the star bubble
opens and its Remove button works. Test in csd_test.mbt.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hkfW5ttNd831XmdsC5
The MoonBit host (wasmhost/, build/wasmhost) is the only host now. Gone:
host-wasm/ (Rust on the wasmtime crate, ~5,700 lines incl. Cargo.lock),
the run-rust, run-drm-rust and host-wasm recipes, and `just install --rust`
(both the recipe and session/install.py now stop with an error naming the
removal instead of quietly ignoring the flag). remote-build.sh builds and
pulls build/wasmhost. README, wasmhost/README and docs no longer describe a
second host, apart from short history notes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hiBxpbLoeUM9xfZayq
A recording of an animation looked choppy because frames barely reached ffmpeg: each 8 MB
1080p frame went out only as far as the socket buffer took it on each main loop pass, so a
new frame could be taken only every few hundred ms (V's recording changed picture ~12 times a
second; headless, 2 a second). Frames were also stamped when ffmpeg read them, not when drawn,
and every grab forced a full redraw.
Now:
- Both hosts (wasmhost raster_stub.c, host-wasm main.rs) copy a frame into a 3-slot queue and
a writer thread sends it, so a frame never waits on the main loop. A full queue (ffmpeg
behind) means that frame is not taken; the next one is, with its own time.
- The stream is uncompressed RGBA in Matroska (recorder.mbt mkv_stream_header /
mkv_frame_header; the hosts write the same 42-byte cluster header), each frame stamped
with the time it was drawn. ffmpeg makes constant 60 fps H.264 from it, under nice -n 10.
- A frame is taken when the desktop draws a changed frame (app.mbt draw_frame,
compose_frame), at most 60 a second, or when the pointer moves. A still screen sends
nothing; the REC pill redraws only its own rectangle when its seconds turn.
- ffmpeg going away mid-recording says so in the notification.
- Tests: the cluster header bytes, ffprobe reading the stream with each frame's own time,
and the recording test now checks a 60 fps file as long as the recording ran. The
recording tests fail with a clear message when ffmpeg/ffprobe are missing instead of
returning early; CI installs ffmpeg.
Headless 1080p, one window redrawing at 60 fps (rec-bench.sh in project files
recorder-smooth/): distinct frames in the video 2.1/s -> 58.9/s (MoonBit host), 59.1/s
(Rust host); overview open/close 1.8/s -> 38.7/s (its previews refresh at 5-10/s live).
Compositor kept drawing 57 fps while recording; still screen: compositor 8% CPU.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hjEUQq16Te1LPYMinT
The default frame now follows codegod100/kde aurorae (Flatkit / Flatkit Dark): the kit's
neutral title bar, a 1px outline with 10px top corners, a hairline under the title, a soft
16px shadow all round, a centred title and 24px flat buttons with hover and pressed fills
(close turns red). 38px title bar, 1px border. Maximized: no shadow, square corners.
- scene: WindowStyle (frame sizes, button layout, hit test) and build_window_decoration;
the shadow is part of the decoration ops, so the three rasterisers lost their own offset
shadow and redraw 18px around a changed window.
- host: the frame size follows the style (work area, wm title-bar room, CSD client boxes,
hit zones, screenshots); title-bar buttons track hover, show pressed, act on release.
- Settings > Session > Flat window frames (off: the old Breeze-like frame), saved as
:window-style :breeze; an unknown value is logged.
- docs/window-frames.md; tests for both styles' pixels, button states and switching.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hmKDDLLES2aBrrnPxT
After Apply the window kept the keyboard and the pointer and its dimmed card
covered the screen, so a password dialog that isn't Chandra's own (another
polkit agent's window) couldn't be reached. While Apply waits, the window now
shows only a note at the top and takes no input. A refused or cancelled
password brings it back with the snaps and marks kept (chandra-face camera
restarts the camera instead of exiting) and says so.
Test: snaps, Enter, the password dialog gets typing (Space no longer snaps
underneath) and the Authenticate click, then the root step finishes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hhiJfJNAYqWzQiuKMf
The desktop wallpaper's logo showing through the cards looked like a glitch. Background
now offers Gradient (default: 4 px bands with faint amber and blue glows), Wallpaper and Solid.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hgvjzw8hHirxRsXSsE
Tested on a Vast GTX 1650 rig (8-core Xeon E5-2620 v4, NVIDIA Xorg, --x11 --fullscreen):
GPU detection says hardware (nvidia), CHANDRA_RENDER=software switches.
- Frame pacing: at most one frame is drawn ahead of the output instead of waiting until the
output is ready. Waiting serialised drawing with the X server's copy of the last frame; overview
on Xorg went from 24-27 fps to 41-48 fps (before the first round: 16-17 fps).
- MoonBit host: a backdrop whose ops change every frame but begin the same (a desktop module:
Live Starfield's sky and nebulae under moving stars) keeps that common start as cached pixels
and draws only the rest over a copy of it. Starfield raster 13 -> 1.7 ms a frame and CPU 46% ->
11% in the cloud; it no longer clears, redraws and re-saves the whole backdrop every frame.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hkTQp5uN5FtwpzrXUA
The grid picks the roomiest card density that fits (fewer description and hint lines, narrower
cards, then name and buttons only) before it would scroll. The module now draws over the
desktop wallpaper with glassy panels and cards; Background setting Wallpaper (default) or Solid.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hgvjzw8hHirxRsXSsE
- New desktop module gamerig-library (components/gamerig-library, logic in lib/gamelib): the
layout of gamerig's web library (desktop/ui) in draw ops. Top bar with the Gamerig mark, app
count and search; sidebar with categories and counts, running apps (switch to, stop) and rig
status (GPU, display, audio); card grid with featured games two columns wide, icon tiles,
category and status badges, description, install hint, Launch / Big Picture / Switch to / Stop.
Typing filters, arrows + Enter launch, the wheel scrolls. Colours: follow desktop, dark, light.
- New game-library capability: tables 26-28 (status, games, launch modes), request 45, in the
wasmer/wasmtime stub, the MoonBit wasmhost and the Rust host-wasm.
- compositor/shell/gamelib.mbt polls GET $GAMERIG_DESKTOP_API/api/state (default
http://127.0.0.1:8091) every 2 s with curl on a socket and POSTs launch/stop/focus; a file://
base reads a state file (tests).
- --desktop NAME picks what fills the desktop at start. scripts/gamerig-kiosk.sh now runs a
hybrid kiosk with the library as the desktop (CHANDRA_KIOSK_MODE=strict for the old one).
- Tests: lib/gamelib, compositor/host/gamelib_test.mbt, a host-wasm test; docs/gamerig-library.md
with a screenshot.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hgvjzw8hHirxRsXSsE
GTK draws no border, only a shadow, and resizes only from a press in that
shadow, which Chandra never hands to the client. Chandra's own zones were
~4px wide around the visible edge and there was none on the top edge, so
Gajim (GTK 4) looked unresizable. Client-decorated windows now get zones
that reach up to 12px into the shadow (GTK's own handle size, at least 6px)
plus 3px over their edge, with 16px corners, top edge included.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hiu4r7mEXBdKY6cgv6