caelestia-niri/docs/PROGRESS.md
2026-12-03 11:46:03 -06:00

263 lines
48 KiB
Markdown

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Progress
One entry per session, newest last, ≤ 15 lines: done, verified how, not done, later.
## S001 — Visualiser follows the sound (2026-11-13)
- Cause: `pw-record -` writes an AU file (big-endian) to a pipe; we read little-endian, so cava saw noise. Fix: `--raw`, plus `node.passive` like the original. Beat (§1.3) was fed the same noise; fixed with it, and toggling the beat no longer restarts the tap.
- Covered screens now let the visualiser fade (autoHide) before their background stops painting; before, the last bars froze in the gaps.
- Zombies: Restart Shell's `exec` orphaned the old image's children (proved in nested niri: `pw-record`, `pactl`, `swayidle` Z); `services::reap_inherited` reaps them. `pw-play` sounds reaped (live shell had 470 Z). Tap child reaped on any exit (`Rec`).
- Pause (user: bars stick where they were when Mulberry pauses): on pause `playing` flips the beat, which restarted the tap, and a new tap never sent zeros, so the old heights stayed. Now the beat is a flag and a new tap sends zeros first; pause test in nested (fake MPRIS + null sink) falls to rest.
- Test: `audio::tests::sine_lifts_its_own_bar` (peak at the tone's bar, bars change), `records_raw_samples`.
- Verified in nested niri: grim crops differ with a tone, match in silence; 6 forced tap restarts + Restart Shell leave no Z; dashboard toggles keep one tap. Only snapshot/nested-tested, not live.
- Live checks for the batched restart: bars follow a browser video and system sounds on both monitors; dashboard Media ring moves; after Restart Shell, `ps -o stat=,comm= --ppid $(pgrep -x caelestia-shell)` shows no Z.
- Not done: the live shell still holds 470 `pw-play` and 166 `caelestia` zombies until restart.
- Later: `caelestia` (166) and `wpctl` zombies come from `spawn(...)` calls in wl.rs that never wait; old-image `pactl subscribe` etc. still run after an exec restart until they exit (S002 area).
## S002 — Restart side effects: tray and the music player (2026-11-13)
- Cause of both: the tray watcher took its name before serving its object; zbus drops calls in that gap unanswered. ksni items (Mulberry) call RegisterStatusNotifierItem holding their tray lock, so they went missing and Mulberry's UI froze on its next tray update until the shell exited (stand-in: 5.2 s blocks, live: for ever). Fix: serve first, queued name, re-scan item names, dedupe by owner+path, host re-registers with a new watcher; 2 s item / 1 s player call timeouts.
- Chevron: it vanished with the items; hovering an empty tray no longer collapses it, so a list refilled under the pointer comes back expanded.
- Zombies: fire-and-forget commands go through `services::detach` (wpctl, caelestia, udisksctl, autostart, notify-send); Restart Shell stops the last image's helpers (`CAELESTIA_HELPER` mark) and reaps each inherited child on its own thread (a long `ddcutil` held up the rest).
- Verified on a private bus in nested niri, 2 ksni stand-ins (Mulberry-like) + 2 Gio items (one never re-registers) + Position probe: old build lost 1–3 items and froze both ksni stand-ins; new build 5 kill+start and 5 Restart Shell rounds, 4/4 items each, 0 freezes, Position ≤ 35 ms, no zombies. Tests `tray::tests` (4), `cargo test --release` green, fuzz 854 tried, 0 crashed. Not tested live.
- Live checks for the batched restart: after the restart and after a Restart Shell, every tray icon is back (`busctl --user list | grep StatusNotifierItem`: Mulberry, equibop, Claude, ABDownloadManager) and each one's menu opens; Mulberry keeps playing and its window still responds to play/pause; `ps -o stat=,comm= --ppid $(pgrep -x caelestia-shell)` shows no Z and one `pactl`.
- Note: the user has two Mulberry processes running (711560, 712208, started 11 s apart this morning), maybe a second start after a freeze.
- Later: `notifs.rs` serves then requests its name on a plain connection (same race, smaller window: use the builder); `current_exe()` reads " (deleted)" after `install` replaces the binary, so Restart Shell's `exec` likely fails until a real restart; `sync_idle`'s own swayidle kill is now redundant.
## S026 — One motion pace, never under 30 fps; motion mode (2026-11-13)
- Cause of the uneven pace: the bar bars had a 50 ms throttle (13.5 fps), the background waited for the next audio burst after its 25 ms gap (19 fps, so the desktop lyrics' 200 ms slide looked slow), and the lock drew on a 33 ms timer (24 fps). Lyric speeds already match the original.
- `pace.rs` + `appearance.motionMode` (Nexus Appearance, "Motion"): Normal keeps each part's pace with a 25 ms floor, Smooth every frame callback, Performance 15 a second. A held-back part gets one loop wake (`App::paced`, D-021). The lock now draws on frame callbacks; Nexus flick steps by real time; shapes' dt cap 0.1 s; dashboard lyrics carry the position forward.
- Nested niri (AUDIT, "Motion pace"): bars 35, background 33, dashboard 40, lock typing 38 in Normal; Smooth 33/42/65/46; Performance ≤ 14.8. Idle desktop and lock 0 frames; the dashboard Media tab spins its shape by design. CPU desktop with music 13% → 17% Normal (21% Smooth, 9% Performance). Mode reload is live.
- Tests: `pace::tests::modes_bound_each_pace`, `background::tests::bars_ease_alike_at_any_frame_rate`; `cargo test --release` 98 passed; fuzz 857 tried, 0 crashed. Only nested-tested, not live.
- Not proved: Performance-mode lock fps and game mode fps on a visible screen (the nested window kept scrolling out of view; hidden niri sends 1 callback a second). Game mode logic is proved nested: the tap stops and the background paints once in 5 s; one visible run read 38 background fps at 0.3 ms in game mode, not reproduced.
- Live checks for the batched restart (or run `live.sh` in the S026 session scratchpad: it measures on the real screens with config copies and puts validated 17a7774 back): bar bars and the desktop visualiser look even with music on both monitors; desktop lyrics slide smoothly; typing on the lock is smooth; Nexus "Motion" Performance makes motion visibly choppier and Smooth smoother without a restart; game mode on: no visualiser frames (`CAELESTIA_PROF=1` shows no `bg` rows) in all three modes.
- Later: Media.qml's bar bars ease height over 50 ms (OutQuad) and park flat when paused or with animations off; ours draw the raw level, so Smooth gains nothing there. Slider drags apply at most every 40 ms (`slide`), so the knob moves at 25 fps.
## S003 — Sweep: bar items and bar popouts (2026-11-13)
- Compared every bar item and popout with a0bc311 (`modules/bar/**`); logged §3.1–§3.15 in ISSUES, 12 fixed, 3 open.
- Fixed: media bars ease 50 ms OutQuad and park flat with animations off (S026's note); keep awake button pill, colours, `autoHide` read; power/show desktop right-click opens Nexus Session/Desktop; show desktop arrow turns; kb layout right-click menu; shortcuts and clock clicks toggle their popouts, shortcuts icon colour while open; status icons spread on hover; workspaces occupied strip and gap markers; popout inset `padding.large`; menu row hover radius 12.
- Open (Later): §3.9 per-device Bluetooth icons (needs a live device feed), §3.13 cross-fade between popouts (needs an opacity layer), §3.14 `bar.previewScale` rows have no reader.
- Verified: `cargo test --release` 99 passed (new `ui::tests::media_bars_park_flat_without_animations`), fuzz 857 tried, 0 crashed; snapshots of the bar on all four edges (full and user config) and every popout, looked at. Only snapshot-tested: no pointer was used.
- Live checks for the batched restart: bar bars glide with music and lie flat with animations off; hover status icons (they spread), right-click power and show desktop (Nexus opens), right-click the kb layout pill if enabled; click the clock twice (closes, reopens); click shortcuts (toggles); keep awake on/off look.
- Later: the clock's 150 ms hover delay; keep awake chip fade/scale; workspace strip and marker fades; vertical bar with every item on overlaps (too long for 900 px, no clipping).
## S004 — Sweep: dashboard tabs (2026-11-13)
- Compared every tab with a0bc311 (`modules/dashboard/**`, `gpu.cpp`); logged §3.16–§3.27, 8 fixed, 4 open, Wallhaven left out (no tab entry in the original).
- Fixed: tab slide hit areas cut to the view (easing already DefaultSpatial); user card logo (distro logo or Caelestia logo in onPrimaryContainer) and fallback alpha; calendar middle click goes to today (dashboard and clock popout); GPU name from `lspci -Dnn` ("Radeon RX 6400/6500 XT/6500M", was "amdgpu GPU"); Weather tab hourly is the curve HourStrip (EmphasizedLarge glide); Notes audio Play/Pause (`ffplay`, SIGSTOP), Record/Stop (`ffmpeg -f pulse` → `notes/audio/note-<id>.m4a`), Upload for audio and image (copied into `notes/`); Terminal input 36 px with a primary border, mono 12 pt, output inset, plain echoed command.
- New tool: `--snapshot out.png --dashboard --tab A --switch-to B` (frames + panel rect). Pixel check on 7 switches: 0 pixels outside the panel (bar row excluded).
- Verified: `cargo test --release` 101 + 6 passed (new `dashboard::tests::hits_stay_inside_the_view`, `dashdata::tests::lspci_names_the_card`; ignored `dashnotes::tests::audio_player_and_recorder` passed on silence); snapshots of every tab before and after, looked at. No config or Nexus change, so no fuzz. Only snapshot-tested: no pointer, no live shell.
- Live checks for the batched restart: Performance tab shows "GPU Radeon RX 6400/6500 XT/6500M"; dashboard user card shows the Arch logo; middle-click the dashboard calendar on another month (back to today); switch tabs and click just beside the panel during the slide (drawer closes, no hidden button fires); Weather tab: open Hourly, step the arrows (strip glides); Notes: new audio note, Record a few seconds, Stop, Play, Pause, Play (resumes), Upload an audio file and an image (both copied under `~/.local/state/caelestia/notes/`); Terminal tab: border and prompt look.
- Open (Later): §3.18 bubble `slnt` and two-line splash; §3.21 indeterminate bar; §3.23 Weather tab with hourly open is 892 px tall on a 900 px screen (original sizes; needs a decision); §3.25 "Paste image URL…".
- Note: `--notes-demo` / `--notes-kind` snapshots write the real `notes_tab.json` unless `XDG_STATE_HOME` points elsewhere.
## S005 — Sweep: launcher, sidebar, utilities, OSD and session menu (2026-11-14)
- Compared `modules/launcher/**`, `sidebar/**`, `utilities/**`, `osd/**`, `session/**` with a0bc311; logged §3.28–§3.47 in ISSUES: 7 fixed, 9 open, 4 left out or kept on purpose.
- Fixed: launcher empty state (icon beside title and hint, per mode); `>emoji` ported (Unicode `emoji-test.txt`, favourites heart → `launcher.favouriteEmojis`, `emoji-frequencies.json`; `unicode-emoji` added to the installer's Arch/Fedora tools); `>keybinds` ported (niri binds, Enter runs `niri msg action`); recording delete is the original's modal, screenshot delete asks inline; OSD mic slider runs to `maxVolume`; tick on the bar Audio popout's output slider release and the Keep Awake switch; session buttons carry their labels.
- Open (Later): §3.31 `>animations` (curves are built in), §3.32 wallpaper filters/folder tabs, §3.33 window carousel (no thumbnails), §3.34 scheme/variant live preview, §3.35 mode cross-fade, §3.39 sidebar News tab + header, §3.44 OSD hover elevation, §3.45 OSD slider grow/fade; §3.36 `>search` is S017's.
- Verified: `cargo test --release` 103 passed (new `launcher::emoji::tests::{reads_unicode_and_text_lists, ranks_like_emojidb}`); fuzz 857 tried, 0 crashed; snapshots before and after of every launcher mode, utilities (both delete prompts, new `--confirm ROW`), OSD, session, sidebar, looked at. Only snapshot-tested: no pointer, no live shell, no sound heard.
- Live checks for the batched restart: `>emoji` with `unicode-emoji` installed (`sudo pacman -S unicode-emoji`; without it the list is empty), pick one (copied, toast), heart one (shell.json `launcher.favouriteEmojis`), reopen (it leads); `>keybinds`, Enter on a harmless bind (e.g. focus a workspace); `>clipboard` with history empty; utilities: delete a recording (modal, Cancel, then Delete) and a screenshot (inline); Keep Awake switch ticks; bar Audio popout volume drag ticks on release; OSD mic slider (if enabled) matches its level; session menu labels.
## S006 — Sweep: notifications and toasts (2026-11-14)
- §4.3 done but §4.3.3: bodies and toast messages draw StyledText (bold, italics, underline, links; `TextStyle::italic`); popups slide out sideways (`normal` Emphasized) and the rest glide up; `shouldPush` moves the stack below a bar popout over it (floating there); ExtraIndicator "+N" for what does not fit; `general.battery.warnLevels` toasts (BatteryMonitor; no sound, as in the original); the toast stack slides when one closes; Nexus Sound effects gets a Notification sound picker (niri addition, plays the pick); ticks on releasing Nexus Audio output/input and Sound effect volume, the notification sound on Notification volume.
- Sweep (§3.48–§3.55, 5 fixed, 3 open): popup slide in and drag spring-back on DefaultSpatial/emphasizedDecel, card height eases, progress ring radius; toasts grow from 0 (initAnim), StyledText messages.
- Open: §4.3.3 `focusCalendar` (needs calendar sources, §4.7); §3.51 ring sweep easing, §3.52 expand cross-fade (opacity layer), §3.55 toast text scaling.
- Verified: `cargo test --release` 105 + 6 passed (new `notifs::tests::bodies_keep_styledtext_styling`, `toasts::tests::battery_levels_warn_once_until_plugged_in`); fuzz 923 tried, 0 crashed; snapshots before/after of `--popups`, `--popups --expand`, `--popups --popout clock|audio` (push), `--sidebar`, Nexus Sound effects, looked at. Nested niri test shell on a private bus: `notify-send` with `<b>`, `<i>`, `<u>` renders bold, italic, underline (grim crop); +2 indicator with six popups; toasts time out at 5 s and 7 s; `notifs clear` leaves no ghost. Not seen moving: the nested window renders 1 frame/s when hidden, so slides were not watched.
- Live checks for the batched restart: send `notify-send "T" "<b>b</b> <i>i</i> <u>u</u>"` (styled); dismiss a popup by its close button and by dragging (slides out, the rest glide up; a short drag springs back); open the clock popout with popups showing (stack drops below it); several tall popups (+N chip); three toasts, the newest closing first (the others slide); Nexus → Audio → Sound effects → Notification sound, pick one (plays), drag Sound effect volume (tick on release); battery warnings only on a laptop.
## S007 — Sweep: lock screen (2026-11-14)
- User report fixed (§3.56): only Sleep worked because Log Out, Restart, Shut Down and Hibernate went through niri's `spawn`, which niri ignores while locked (proved nested: `niri msg action spawn` while locked does nothing). They now run from the shell; Switch User is gone (D-009).
- §4.4 done: shapes pop in, morph to circles, shrink, and fade out when deleted; pill width eases; the enter button morphs Circle↔Arrow; a refusal keeps the field shut 3 s ("Please wait...", error colours); the error grows in, flashes twice, leaves after 5 s; the portrait layout has the keyboard layout button; Nexus Lock Screen has a "Lock screen wallpaper" row (`lock.wallpaperPath`, shown with Sync off). Also: session button hover/press motion, clicks act on release, random profile shape morphs over 800 ms. §3.56–§3.69 logged: 9 fixed, 2 left out, 3 open.
- Nested niri (lock-test build, stand-in `systemctl`): Sleep, Restart, Shut Down ran `systemctl suspend|reboot|poweroff` from the locked screen by pointer; Log Out quit niri while locked ("quitting as requested"); wrong password stayed locked, right unlocked, a 3 s SIGSTOP stall survived, `locktest cut` re-exec'd and took over the dead lock, then wrong refused and right unlocked. `switch-layout next` works while locked. Release build: `caelestia shell locktest x` is "unknown command".
- Snapshot-tested only: animations (new `--lock --wrong --frames N`), portrait button (snapshots now read niri's layouts), Nexus row. No real pointer or keys on the live lock.
- Tests: `cargo test --release` 107 passed (new `lockscreen::tests::{a_typed_shape_pops_in_then_settles_as_a_small_circle, the_error_flashes_twice_and_leaves_after_five_seconds}`, the typing test now covers grace); fuzz 921 tried, 0 crashed.
- `locktest stall` never existed in the code (HANDOFF said so); HANDOFF now says to use `kill -STOP`.
- Live checks for the batched restart: lock (Mod+Alt+L), type: shapes pop and turn into dots, Backspace fades one; a wrong password: shake, red lock and arrow, "Please wait..." 3 s, red message flashes twice and goes after 5 s; hover the power buttons (glow, label); Restart or Log Out only if the user wants to try it for real; Nexus → Lock Screen: turn Sync off, pick a picture, lock (it shows), turn Sync back on.
- Later: §3.67 resources wave ease, §3.68 notification dock motion, §3.69 media card fade.
## S008 — Sweep: desktop, widgets and desktop icons (2026-11-14)
- Desktop icons (§4.5): arrows (LayoutEngine.navigate), Home, End, Shift ranges from the anchor (keys and clicks), type-ahead, Ctrl+plus/minus, Menu/Shift+F10, focus ring; live drop preview (cells, others moved aside, held tiles faded); drop on a folder moves the files in; drag onto the other monitor (`desk_point` maps the held pointer through niri's outputs); Pin to dock on launchers; the monochrome set's lookup (set not bundled: theme tint stands in).
- Widgets (§4.8): edit mode click/Ctrl+click select, Ctrl+A, Ctrl+C/V (new cards beside the selection), Delete, Escape closes the gallery or leaves edit mode. Pill gets Elevation and `border.thickness`.
- Sweep §3.70–§3.82: 10 fixed, 3 open (§3.78 pill motion, §3.79 edit keyboard grab, §3.80 shapes fade).
- Incident: `cargo test` (an old deskicons test, and mine) saved into the user's real `~/.local/share/caelestia/desktop_layout.json`; parallel tests left it as broken JSON. Backed up (`desktop_layout.json.broken-2026-11-14` beside it), repaired to the valid part minus test keys (no widgets were in it), and tests now use a temp file (§3.82). Widget saves had silently stopped while it was broken; the live shell's next widget change writes its cards back.
- Open: groups and large folders (a feature of its own), drag to/from other apps (needs wl_data_device), bundling yet-another-monochrome-icon-set (download needs the user's OK).
- Verified: `cargo test --release` (new `deskicons::tests::{arrows_move_to_the_nearest_icon_that_way, shift_selects_the_range_from_the_anchor_in_fill_order, typing_jumps_to_the_next_name, a_drag_plans_its_drop_before_letting_go}`, `background::tests::pasted_widgets_are_new_copies_beside_the_original`); no config/Nexus change, no fuzz. Snapshots (test HOME, new `--icon-drag`, `--widget-edit`, icons now synced in `--background`) before/after, looked at. Not tested with a real pointer or keys.
- Live checks for the batched restart: click the desktop, arrows/Shift+arrows/Home/End/typing a letter (ring, selection); Shift+click range; drag an icon (cells show, others shift when arranging), onto a folder (moves in), onto the other monitor; right-click a launcher → Pin to dock; edit widgets: click a card, Ctrl+C, Ctrl+V (copy beside it), Delete, Escape leaves.
## S009 — Sweep: Nexus personalisation pages (2026-11-14)
- Appearance, Desktop and Panels pages against `PageDictionary.qml` and the page files at a0bc311; §3.83–§3.96 logged: 10 fixed, §3.88 left out (KDE only), §3.94/§3.95/§3.96 open.
- Fixed: reset buttons on every toggle/stepper/slider (D-023), rows grey out where the original has `enabled:`, Theme & Effects header buttons (Restart Shell, Reset settings), Theme header and Animations section, opacity steppers, Icon Vibrancy, visualizer labels, Tray Icons list (order, Always visible/Collapse/Hidden, Forget; the bar follows it), ListEditor look, and a barpage save that wrote `"bar": {"panels": null}` (the user's file has `[]`, unaffected).
- Tests: `cargo test --release` 119 passed; new nexus tests for status icons, quick toggles, tray list, bar items and context menu (add, remove, switch, drag), app pin/favourite/hidden, reset buttons; `ui::tests::tray_keys_states_and_order`. Fuzz: 924 tried, 0 crashed.
- Snapshots before/after of every Appearance, Desktop and Panels sub-page (test config copy), looked at. Nothing tested live.
- Rows with no reader, for S020 (name check, not behaviour): AdvancedColors `services.smartScheme`; BarDock `bar.dock.previewOnDesktop`; BarPreviewScales `bar.perElementPreviewScale`; BarScreenCapture `bar.screencapture.showShots/showRecord/showFolders`; BarWorkspaces `bar.workspaces.showWindowsOnSpecialWorkspaces`, `perMonitor`; TaskbarPanel `bar.previewScale`, `livePreviews`, `previewScaleWithBar`, `fontScaleOffset`; UtilitiesPanel `utilities.showQuickShare`. Outside these pages the same check also lists Overview/Alt+Tab, lock fprint, toast events, game mode and video wallpaper keys.
- Live checks for the batched restart: Nexus → Taskbar → Tray: drag a row, set one Hidden (gone from the bar) and one Always visible (stays while compact); Theme & Effects: Restart Shell (Nexus comes back), Reset settings twice; a reset button on a changed row.
## S010 — Sweep: the other Nexus pages (2026-11-14)
- Network, Connected devices, Audio, Notifications, Utilities, Session, Apps, Services, Language, About and Displays against the page files at a0bc311; §3.97–§3.123 logged: 21 fixed (some with parts left out or open), Quick Share left out, Proxy and Show inactive devices open (Later), VPN → S015, Bluetooth/input → S011, shell language → S018.
- Fixed: Wi-Fi rows (security, active opens details, lock/settings), Show all networks past `maxNetworksShown`, Hotspot SSID, Ethernet section and detail (Connect/Disconnect), captive portal sign-in (niri: curl + xdg-open, toast result); audio slider icons and rest while muted, device chips/check/sort/placeholders, App volumes count, note and Muted label (mute switches removed); Sound effects and Toasts rows rest; Related settings; Focus "Running until"; Apps defaults rest under Force; All apps icons/heart; App info hero, subtexts, regex-held switches; GPU Generic; About logo card + version; Displays Enabled subtitle.
- Rich Presence: a row for every `arpc*` key except `arpcClientId` (the original has none either).
- Tests: `cargo test --release` 124 + 6 passed (new `nexus::tests::{network_rows_follow_networklist, audio_rows_mark_the_current_device_and_rest_while_muted, app_info_rests_switches_a_regex_holds}`, `popdata::tests::data_usage_reads_like_nmqt`, `notifs::tests::a_running_focus_session_ends_on_its_schedule`); fuzz 925 tried, 0 crashed. New snapshot flag `--detail ID` (CLAUDE.md §5).
- Snapshots before/after of every page and sub-page above (test config copy), looked at. Nothing tested live; Wi-Fi, portal, Ethernet Connect and audio rows were not pressed against real state.
- Rows with no reader, for S020 (name check): `audio.sounds.lowBattery`; `utilities.toasts.kbLimit`, `nightLightChanged`, `vpnChanged`; `utilities.gameMode.disableDesktopLyrics`, `disableVisualizer`; `general.apps.editor`, `playback`; `nexus.networkRescanInterval`; `general.debugLogs`.
- Live checks for the batched restart: Nexus → Network (Wi-Fi rows, the connected one opens details; Ethernet row → details); Audio (mute output: slider greys; device check); App volumes with music playing (icon, slider); Apps → All apps (hearts) → an app (hero, switches); About (logo card).
## S011 — Connected devices: Bluetooth pairing and input settings (2026-11-18)
- §4.10: the iPhone and AirPods were `Trusted`, not `Paired`/`Bonded`, with the adapter `Pairable: no` (not bondable, so a pairing keeps no keys). The page listed only Paired devices, so they sat in the pairing list with no way to drop them. Now: saved list = bonded (`BluetoothPage.qml`), connected first, "Connected • N%"/"Saved", chips; pairing list = the rest with address, Forget × (niri addition), back to the list once paired; `pair` turns Pairable on first; Wake allowed row; clearer refusal sentences. Fixed pending the user's live check.
- §4.2: Keyboard and Mouse & touchpad pages (`nexus/inputpage.rs`), opened from Connected devices and Displays → Input (DisplayPage.qml's section). They write `~/.config/niri/caelestia-input.kdl`, `niri validate` it, then `niri msg action load-config-file`; a refused file is put back. `caelestia.kdl` includes it after the recommended file. niri replaces `mouse`/`touchpad` blocks whole and merges `keyboard` (so `numlock false`).
- Installer note for S021: `assets/niri/caelestia.kdl` now has `include optional=true "caelestia-input.kdl"`; the user's installed `caelestia.kdl` gets it only when `caelestia niri install` runs again.
- Verified: `cargo test --release` 128 + 6 passed (new `inputpage::tests::*`, `nexus::tests::bluetooth_rows_follow_the_original_and_stale_devices_can_go`, `popdata::tests::saved_devices_list_connected_first_then_by_name`); fuzz 925 tried, 0 crashed. Nested niri (test shell, private bus, copy config): Repeat rate + wrote `repeat-rate` and niri logged a reload; Layout `us,de` → `niri msg -j keyboard-layouts` listed English (US), German; Tap off dropped `tap`. That run was before the rows moved to their own pages (same save path). Snapshots of every page looked at.
- Slip: a test click in the nested shell hit the Pairable row, which drives the real adapter; it was set back to `Pairable: no` at once. Nothing was paired or removed.
- Not done: pairing a real device (🧑 live check, steps in the orchestrator's notes folder, `S011-live-checks.md`); Connecting/Disconnecting state.
- Later: test shells' Bluetooth rows act on the real adapter (a test-mode guard would help).
## S012 — Popouts: keyboard layouts and Night Light (2026-11-18)
- Keyboard layouts popout (`KbLayout.qml`): other layouts as "US - English (US)" from the XKB rules file, divider, active one; a click runs niri `SwitchLayout { Index }`. The `kbLayout` status icon (mono "us") opens it; KbLayoutIndicator now shows the XKB code ("DE", was "GER"). kbLimit toast on open (niri lists at most four layouts).
- Night Light: package chosen **wlsunset** (Arch extra). Shell helper restarted on settings change, reaped if it quits (toast). New `services.nightLight*` keys (enabled, auto, day/night temperature, sunrise/sunset); Auto uses the weather location's sun, else the times; Manual holds the night temperature. NightLight.qml popout (Auto/Manual, sliders set on release), quick toggle, status icon, on/off toast. Displays → Night Light rows; Toast events show Night light changes and Keyboard layout limit.
- Verified: `cargo test --release` 130 + 6 passed (new `popdata::tests::layout_names_come_from_the_xkb_rules`, `services::tests::night_light_runs_wlsunset_on_its_schedule`); fuzz 929 tried, 0 crashed. Nested niri: German clicked → `niri msg -j keyboard-layouts` current_idx 0 → 1, bar "de". Stand-in wlsunset: on/off by reload, Auto and slider restart it with new args, none left after SIGTERM or SIGKILL. Real wlsunset quits nested (no gamma control): reaped, toast. Snapshots of both popouts and the Nexus rows looked at.
- Not done: real colour change (live only: 🧑 turn Night Light on from the utilities drawer or Displays, check the screen warms and `pgrep -x wlsunset`; Manual and a slider drag; off). Quick toggle not clicked in a test (same path as the settings). No slider preview or wheel steps.
- Installer note for S021: add `wlsunset` to the package lists (HANDOFF installer section).
- Later: Nexus `listedit::label` names the status icon "Night Light" (the original's status list says "Night light").
## S013 — Popouts: Privacy and Greeter (2026-11-18)
- Privacy (`Privacy.qml`, `PipewireStreamWatcher.cpp`): **subscriber** = the existing `pactl subscribe` (one per shell, `services::spawn_audio_watch`); its `source-output` events wake the old video-stream thread, now `services::watch_streams`, which reads `pw-dump Node` (also every 5 s) and classifies mic apps and screen shares (5 s grace). No new long-lived process. Status icon `mic`/`videocam` while in use, popout with a card per kind. `privacy` added to the default `bar.statusIcons`; the user's list lacks it (Nexus → Status icons → Add). The visualiser's `pw-record` is now named `caelestia-shell` so it is left out.
- Greeter popout: 400 px picture or GIF, shape reveal (1800 ms OutCubic), slideshow from picked files and folders (`popdata::Greeter`, state in `~/.local/state/caelestia/greeter.json`), timer only while open. Hover needs `bar.popouts.greeter` (off by default) and `greeter.showOnHover`; with hover off a click opens it. Nexus Greeter: only the chosen mode's rows, media pickers, add folder/file with × lists.
- Left out: greeter videos (no video player), TIFF/SVG. Folder paths elide at the end.
- Verified: `cargo test --release` 133 + 6 passed (new `services::tests::capture_streams_name_the_apps_and_shares_wait_out_their_grace`, `popdata::tests::the_greeter_slideshow_lists_files_then_folders_and_keeps_its_place`, `nexus::tests::greeter_rows_follow_the_mode_and_list_the_slideshow`); fuzz 929 tried, 0 crashed. Nested niri test shell: a `pw-record` TestRecorder showed in the popout within 1 s and left within 1 s of exiting; one `pactl subscribe` per shell, no `pw-dump` left running; greeter hovered with `vptr`: slides every 5 s, reveal over a playing GIF. Snapshots of both popouts and the Greeter page (both modes) looked at.
- Not verified: the bar icon going away. The live shell (old binary) captures as "pw-record", which counts until it is replaced, so the icon stayed on in the nested test; its removal is covered by the classify test. Live check after the restart: no app recording → no privacy icon (once Privacy is added in Status icons); start `pw-record /tmp/x.wav` → mic icon, hover shows "pw-record"; stop it → icon gone.
- Later: a slideshow list that refreshes while the popout is open (the original watches the folders).
## S014 — Video wallpapers through mpvpaper (2026-11-18)
- A video wallpaper plays through `mpvpaper` (niri addition, AUDIT "Video wallpapers"): one per output, a helper child on the background layer under the shell's, IPC socket in `$XDG_RUNTIME_DIR`; the shell leaves its picture out once mpv answers. Pause rules (paused, fullscreen, tiled, all displays, game mode) and sound (first output only, mute while media plays) go over the socket. Wallpaper Settings shows the six rows under "Video Wallpapers", then "Playlists & Automation"; the Pause Wallpaper quick toggle is back.
- Colours: from a **frame** (`ffmpeg -vf thumbnail -frames:v 1`, cached in `~/.cache/caelestia-niri/wallpapers/<hash>/first_frame_hifi.png`), used by the CLI, the wallpaper under the video, the lock and Nexus thumbnails. mpvpaper missing or quitting: the frame stays, with a toast.
- Verified: `cargo test --release` green (new `services::tests::video_wallpapers_pause_*`, `mpvpaper_draws_under_*`); fuzz 929 tried, 0 crashed. Nested niri with a **stand-in mpvpaper** (real mpv headless, same options and socket): fullscreen → `pause` true, back → false; tiled rule follows the active workspace; sound on restarts it; a fake MPRIS player → `mute` true, gone → false; grim showed the shell's wallpaper left out, and the frame plus toast when it quit or was missing; no mpv left after SIGTERM or SIGKILL of the shell.
- Not done: the **real mpvpaper was not run** (AUR only, not installed; the orchestrator asked the user to `yay -S mpvpaper`), so "video moving behind the bar" is unproven. Live check after install and restart: pick a video wallpaper, see it play, fullscreen a window with the rule on.
- Installer note for S021: `mpvpaper` (AUR package) and `ffmpeg` (HANDOFF installer section).
- Later: Wallpaper scaling shows "2" instead of a name (already so before S014); Greeter and launcher video playback.
## S028 — Default apps are honoured everywhere (2026-11-26)
- Cause: the page wrote the choice fine (the user's shell.json holds kitty, tunal, nacre…), but every open spawned a hard-coded `xdg-open`; also the Force toggle turning off overwrote audio/playback/explorer with pavucontrol/mpv/thunar.
- Fix: `config::Apps::open(kind, target)` (xdg-open or empty → `xdg-open target`); links and portal page → browser, recordings → playback, folders → explorer (utilities, screenshot notification, desktop icons and widgets, recent files, Nexus wallpaper folder). Force off restores the stashed choices. Kinds with no setting listed in AUDIT.
- Verified: `cargo test --release` 136 + 7 passed (new `a_chosen_app_opens_the_target_and_xdg_open_is_the_fallback`, `default_apps_are_kept_through_the_force_toggle`); fuzz 929 tried, 0 crashed; Apps page snapshot with thunar/mpv chosen looked at. Not run live: checks in docs/tests/S028-default-apps.md. Tests need `TMPDIR` off /tmp while /tmp is at its quota.
- Later: Browser row shows "xdg-open about:blank" instead of "System Default" for the default value.
## S025 — A standard colour scheme apps can read (2026-11-26)
- New app target "KDE / Qt apps" (`enableKde`, on by default, niri addition in AUDIT): matugen renders `~/.local/share/color-schemes/Caelestia.colors`; then `themes::merge_kdeglobals` replaces only `[Colors:*]` and sets `[General] ColorScheme=Caelestia` + `AccentColor` in `~/.config/kdeglobals` (rest byte-for-byte, atomic, mode kept), and gsettings `color-scheme` + nearest `accent-color` are set for the portal. scheme.json stays at `~/.local/state/caelestia/scheme.json` (S019 not done).
- What each app reads: Mulberry: kdeglobals only (`[General] AccentColor`, else `[Colors:Selection] BackgroundNormal`; dark from `[Colors:Window] BackgroundNormal`), so it had nothing before. Damson and Medlar: scheme.json (`colours.primary`, `mode`) first, then the same kdeglobals keys. Nacre: scheme.json primary, then kdeglobals AccentColor, then gsettings accent-color; dark from GTK/gsettings. Tunal: only the settings portal (`org.freedesktop.appearance` accent-color, color-scheme), served by portal-gnome from gsettings. Common ground: kdeglobals `r,g,b` keys + scheme.json; Tunal needs gsettings. Medlar reads nothing wrong.
- Verified: `cargo test --release` 136 + 10 passed, fuzz 929 tried, 0 crashed; core tests incl. `kdeglobals_gets_the_colour_groups_and_keeps_everything_else`; temp HOME `scheme set` dark and light, each twice: identical, diff only additions, 0600. Incident: one accidental real `caelestia scheme set` (no args, re-applied the current dynamic scheme) merged the real kdeglobals and set accent blue; reverted to the original 464 bytes and accent red, Caelestia.colors removed.
- Not done: live check (docs/tests/S025-kde-colour-scheme.md 5-10) after the approved install.
- Later: Damson reads scheme.json first, so its not following colours is likely its own refresh, not the shell.
## S031 — Visualiser follows the system output (2026-12-01)
- Cause (by reading, not reproduced): a stalled or mislinked `pw-record` was never restarted. Fix: the audio thread restarts it when the default sink changes or after 4 s without data on a RUNNING sink (`audio::must_restart`, test `the_tap_restarts_on_a_sink_change_or_a_stall_on_a_running_sink`). Bar bars no longer need a playing player.
- Verified: build only. Not done: test shell runs, grim crops, zombie check (docs/tests/S031). Live check after the approved restart: game mode on/off and a sink switch, bars keep moving.
## Later
- S004: dashboard §3.18 (bubble slant, two-line splash), §3.21 (indeterminate bar), §3.23 (Weather tab height with hourly open on 900 px screens), §3.25 (image URL field).
- S005: launcher §3.31 (animation presets need token-driven curves), §3.32 (wallpaper filters and folder tabs), §3.33 (window card carousel), §3.34 (scheme/variant preview), §3.35 (mode cross-fade); sidebar §3.39 (News tab and tab header); OSD §3.44 (hover elevation), §3.45 (slider grow/fade).
- S007: lock §3.67 (resources wave ease), §3.68 (notification dock motion), §3.69 (media card fade).
- S006: §4.3.3 `notifs.focusCalendar` (after calendar sources, §4.7); §3.51 popup ring sweep easing; §3.52 popup expand cross-fade (opacity layer, with §3.13); §3.55 toast text scaling.
- S008: §4.5 groups and large folders, drag and drop with other apps (wl_data_device), bundling the monochrome icon set; §3.78 edit pill motion, §3.79 edit mode keyboard grab, §3.80 desktop shapes fade; AppContextMenu "Add to desktop" (comment in `open_app_menu` says icons are not ported; they are now).
- S009: §3.92 ListEditor drop animation, §3.94 dodge windows (needs window geometry over the bar), §3.95 eight-page navigation (orchestrator and user decide), §3.96 status icons Add dialog.
- S010: §3.100 Ethernet link button and IP/DNS columns, §3.104 Proxy page (gsettings `org.gnome.system.proxy`), §3.109 Show inactive audio devices; §3.95 still decides the page grouping.
## S015 — Network VPN and IPv4 (2026-12-01)
- Done: `netcmd.rs` builds and parses the nmcli calls (4 unit tests); Add VPN page (file import, rename), VPN connect/disconnect toasts gated by `utilities.toasts.vpnChanged`, IPv4 section on Ethernet and saved-network detail pages; saved Wi-Fi connect no longer says "VPN".
- Verified: `cargo test --release` green. Not done: fuzz, snapshots, stand-in nmcli runs (docs/tests/S015). Original QML not read (clone unfinished). Later: file picker button for the VPN file.
## S016 — Calendar sources and agenda (2026-12-01)
- Done: `calendar.rs` (ICS files/URLs, recurrence, all-day, cache off the UI thread), agenda in the clock popout, Services > Calendar sources page, `notifs.focusCalendar` toggle and Focus hold. 5 unit tests pass; release build ok.
- Not done: fuzz, snapshots, live runs (docs/tests/S016). The original clone was empty, so `calendar_events.py` and the agenda/page QML were not read: layout and wording are guesses (AUDIT). No redraw wake when a load ends.
- Installer note S021: needs `curl` only.
## S019 — Config paths into the niri folder (2026-12-01)
- Paths: settings `~/.config/niri/caelestia/`, state `~/.local/state/niri-caelestia/`, user data `~/.local/share/niri-caelestia/`, cache `~/.cache/niri-caelestia/`. niri include files stay in `~/.config/niri/` (D-026). Table in AUDIT.
- `paths::migrate()` (shell start, CLI start) copies old folders once, never overwrites, never touches the old; old folder read while the new is missing. CLI still writes `scheme.json` to the old state folder too (D-012). Installer 05-extras, uninstall.sh, README follow.
- Verified: `cargo build --release` and `cargo test --release --no-run` compile. Not run: unit tests, temp-HOME proof, fuzz (docs/tests/S019, checks 1-13).
- Live check after the approved restart: new folders exist, lock still the shell's (`lock-proved` copied; if lost, swaylock returns, which is safe), wallpaper, colours, lyrics and Nexus settings as before; Mulberry/Damson still follow colours.
## S017 — Launcher web search and File Types (2026-12-01)
- Done: `>search` mode with engine row (opens with `xdg-open`), `launcher.webSearch` + Apps page Search section, File types sub page over `mimeapps.list` and `xdg-mime default`; 5 unit tests written.
- Verified: `cargo build --release` only. Not done: tests run, fuzz, snapshots, stand-in runs (docs/tests/S017). Engine list and File Types are niri additions (AUDIT); File Types app menu lists all apps.
## S018 — Shell language (2026-12-01)
- Done: original had 24 `.ts` catalogues; 22 flattened to `assets/translations/*.tsv` (`tools/ts-to-tsv.py`), `translate.rs` looks text up at shaping time, Shell language row on the Language page, `general.language` default "system". 3 unit tests written.
- Verified: `cargo build --release` only. Not done: tests run, fuzz, snapshots, wrapping check on busy panels (docs/tests/S018).
- Limits: strings built with `format!` and Rust-only labels stay English; the original's strings only match where our wording is the same. Later: sr/vi when finished upstream.
## S020 — Dead rows and overview corners (2026-12-01)
- Done: test `no_dead_rows` lists visible `shell:` rows without a reader; hot corners toggle niri's overview (`overview_corner`, `config::Overview`, Overview page kept with corner rows only); game mode visualiser and lyrics rows read; screen capture show-buttons hidden.
- Verified: build and the new test only. Not done: full tests, fuzz, nested-niri corner check (docs/tests/S020). Later: other rows pass by name match only.
## S029 — Reorder favourites (2026-12-01)
- Done: favourites follow `favouriteApps` order (picker, Favorites category, launcher list); drag a favourite tile to reorder (`move_favourite`, outline + ghost, saved via config write); Nexus All apps "Favourite order" card, click moves up. AUDIT niri addition.
- Verified: `cargo build --release` only. Not done: tests run, fuzz, snapshots, live drag (docs/tests/S029). Later: Nexus drag or move down.
## S030 — Dock running and close (2026-12-01)
- Done: dot (open) / pill (focused) indicator on every dock item with windows; dock menu "Close window"/"Close all windows"; End task now arms then SIGTERMs the windows' pids (`procs::pids_of_windows`). Unit test written. AUDIT niri addition.
- Verified: `cargo build --release` only (before the test was appended). Not done: tests run, fuzz, snapshot (docs/tests/S030). Original Dock.qml not read.
## S021 — Installer options and package lists (2026-12-01)
- Options (default): nightlight (on), clipboard (on), video/mpvpaper (off), tray now installs and autostarts xembedsniproxy (on); existing portals, keyring, qt, automount, lock (on). `--yes` = defaults minus login screen. Lock preview offered at the end; 03-niri moves the include below later outputs includes and XF86 binds (backup, `niri validate`).
- Packages added for Arch/Fedora/Debian (pam dev, pipewire tools, util-linux, aubio, libcava on Arch); 02 checks the assets and `CAELESTIA_DATA_DIR`. README and AUDIT updated.
- Pruned: `upower.service` enable (unused); `pkgconf` relabelled (wayland-sys, not libcava). Rest in use (AUDIT).
- Verified: `bash -n` on every script; `./install.sh --dry-run` through a pty reached the Install screen with every ticked option listed. shellcheck not installed here. Not run: a real install, the include move, 05 extras (docs/tests/S021).
## S027 — Installer own apps (2026-12-01)
- Done: Damson (editor), Nacre (browser), Mulberry and Audiphi (music) first on their page, "(recommended)", ticked while not installed; latest release via Forgejo API with known-release fallback; `install_own` runs each archive's `install.sh --user`. Islet (iPhone only) and Dezio (Discord bot, no release) left out.
- Verified: `bash -n`; `--dry-run` text walks with own apps hidden from PATH, installed, and with a dead `HUB_URL` (own apps gone). HEAD timeout raised 3 s → 8 s (hub answers in 1.5–2.7 s).
- Not done: temp-HOME real install and start of each app (plan step 5 second half; docs/tests/S027 checks 2-3). Later: cache the API lookup.
## S023 — Clean-install check (2026-12-01)
- Temp-HOME install on a pty with logging stand-ins, rerun, nested-niri boot: exit 0, `niri validate` ok, bar drawn, assets identical; S027 checks 2, 3, 11 pass.
- Fixed: stray config.kdl backup, starship.toml backup on rerun, App colours page skipped from a bundle, Audiphi pre-ticked (now only Mulberry, user's choice; in tui.sh).
- Not seen: PAM file write in the sudo log; not run: real sudo/packages, Fedora/Debian, sounds played.
- Later: slow hub hides own apps (8 s), terminal-sequences in old `~/.cache/caelestia`, "GoogleSansFlex" font family match.
## S032 — Workspace window menu (2026-12-01)
- Done: right-click a workspace pill lists its windows, then live actions per window via niri IPC (focus, floating, fullscreen, maximize, widths, move workspace/monitor, close). Only MaximizeColumn needed focus-first. Nothing written to config. AUDIT niri addition.
- Verified: `cargo build --release` only. Unit tests written, not run. Not done: snapshots, nested-niri check (docs/tests/S032).
- Later: height presets, column actions (consume/expel, center), hover highlight on menu rows.
## S033 — It runs (2026-12-02)
- Build green, `cargo test --release` green after fixing one wrong test (translate escapes). Fuzz: 969 arrangements, 0 crashed.
- 29 snapshots (all surfaces, dashboard tabs 0-5, 14 Nexus pages) viewed on two contact sheets: none blank or cut. `docs/TEST-REPORT.md` created.
- Not done: live-only things (audio, icons, tray) belong to S036/S038.
## S034 — Test: network, calendar, search, language (2026-12-02)
- Unit tests pass. Fixed AddVpnPage missing from `is_live`; snapshots now apply the language.
- Snapshots of VPN, IPv4, calendar sources, File types, launcher search, 6 languages seen. Known bug: stray "Style" label at sidebar edge when translated.
- Not run: every check needing clicks or a running test shell. Results in docs/tests/S015-S018.
## S035 — Test: config rows, colours, apps (2026-12-02)
- Unit suite green. Temp-HOME old-layout migration, scheme set, kdeglobals merge checked by CLI: pass.
- Nested niri: overview corners and default-app clicks pass; fixed corner re-entry (wl.rs). Not run: S028 5,6,10,11, app colours, live. Later: launcher web search should honour Browser.
## S036 — Test: dock, workspace menu, visualiser (partial)
- Suite green. Nested niri checks for dock and workspace menu done; visualiser and favourites drag not run. Bug: S032 check 8.
- Later: finish S029, S031, rest of S032, then fix check 8.
## S039 — Apps follow the desktop colours (2026-12-03)
- Done: after every colour change the CLI adds the missing load line/key to enabled apps' own configs (kitty include, GTK import, qt5ct/qt6ct palette keys, btop/cava theme), backup first; adw-gtk3 follows dark/light; kitty/cava reload; GTK template gains libadwaita names; wallpaper schemes now copy scheme.json to the old place for own apps. Audit table in docs/tests/S039.
- Verified on a temp HOME with copies (dark, light, wallpaper; files change, user keys kept); core and syslook unit tests. Not seen in a running app.
- User: tick Qt in Nexus → App themes (`enableQt` is off); in Equibop tick midnight-discord.css. Live check after the approved install.
- Later: Spicetify needs `current_theme = Sleek` (user has Marketplace); btop has no live reload; qtct template's fixed grey roles in light mode.
## S036 — round 2 (2026-12-03)
- Fixed S032 8: `keep_press` in ui.rs followed the wrong control when a row and a chip share an action. Nested checks S032 2, 3, 8, 10, 11 pass.
- Not done: S029 2-13 (favourites drag), S031 2-9 (default sink was muted; null-sink default refused), S032 9, 12, 13.
- User: sink `alsa_output.pci-0000_00_1b.0.analog-stereo` was found muted; check it. Later: finish S029 and S031 with approval.
## Orchestrator — S036 rest moved (2026-12-03)
- S036 stopped twice. Left: favourites drag (S029 2-13), visualiser with a test sink (S031 2-9: needs a null sink made default, user OK), S032 9/12/13. Folded into S038 (whole-shell, with the user). Real default sink was found muted; not touched.
## S040 — Apps page choices become system defaults (2026-12-03)
- Done: explorer/browser/playback choices written to mimeapps.list via xdg-mime on change and at shell start; backup once; System Default and unmatched commands write nothing (row status line). `caelestia-shell --sync-default-apps` added.
- Verified on a temp HOME with a debug build: Tunal → inode/directory, other lines kept, backup, idempotent. Unit tests and fuzz not written/run (worker rules); see docs/tests/S040.
- User: first start of the new shell rewrites ~/.config/mimeapps.list (backup kept). Later: FileManager1 D-Bus (nautilus) may still catch browser "open folder".
## S037 — Test: installer (2026-12-03)
- Temp-HOME installs on a pty with stand-ins (defaults, every option, `--yes`): exit 0, niri config valid, sudo calls match the options; lock PAM file written once each run (check 16 was skipped only because this machine already has it); real `visudo -cf` passes the sudoers rule.
- Fixed: slow hub hid own apps (now listed unticked), visudo off PATH skipped the rule silently, font value "GoogleSansFlex" matched no family. Own apps install into temp HOMEs and start in nested niri. S039 and S040 installer bits pass on temp HOMEs.
- Not run: real sudo/packages, Fedora/Debian, S027 10 (TUI keys). Later: kitty.conf backup taken after 04 added our include line, so it is not byte-identical to the user's file.
## S041 — Visualiser bars on the live desktop (2026-12-03)
- Cause: libcava 1.0.0 wants libsndio.so.7, system has .9; dlopen failed, no bars ever (beat still worked). Fixed in audio.rs: soname-patched copy of libsndio in ~/.cache/caelestia, `CAELESTIA_AUDIO_DEBUG=1` print. Real music via the tap now gives bars up to 1.0 (was 0.000). Unit tests green.
- Not done: grim frame proof, bass shape size, dashboard tab (no shell started), live check. Steps 3-4 boxes stay open.
- User/orchestrator: approved restart to install; real fix is rebuilding libcava (`yay -S libcava --rebuild`). Later: installer could rebuild libcava on soname drift.