git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commit821b6b66dba5e06181df6f36c2a0fdb4c2ee31ad
parent48c0710f53
authorLucas Galante <[email protected]>
date2026-09-19 07:47
docs: eight test modules, not six; window_manager.rs and window.rs resized

Three counts checked against the tree.

`xwayland_window.rs` and `window.rs` grew `#[cfg(test)]` blocks since the
"Six modules" sentence was written, making it eight. The list is now ordered
by how many tests each carries, so `backdrop.rs` having the most — which the
sentence already claimed, and which is still true at 16 — is visible rather
than asserted.

The two size figures had drifted hard: window_manager.rs is 7511 lines, not
~5.7k, and window.rs is 5777, not ~4.9k. These numbers exist to set
expectations before opening a file, so a third off is enough to mislead.

Co-Authored-By: Claude Opus 5 <[email protected]>

 CLAUDE.md | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/CLAUDE.md b/CLAUDE.md
index 0d89bc9..c173054 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -206,9 +206,10 @@ Native libs via `pkg-config`: `wlroots-0.20`, `wayland-server`, `xkbcommon`,
 
 ## Tests
 
-Six modules carry unit tests — `backdrop.rs` (the most of any, covering the
-measurement and the desktop/window blend), `config.rs`, `window_manager.rs`,
-`screenshot.rs`, `migrate_input.rs`, `text.rs`. They cluster where the logic is
+Eight modules carry unit tests — `backdrop.rs` (the most of any, covering the
+measurement and the desktop/window blend), `window_manager.rs`, `config.rs`,
+`xwayland_window.rs`, `screenshot.rs`, `window.rs`, `migrate_input.rs`,
+`text.rs`. They cluster where the logic is
 pure and the FFI is not, which is the only kind of thing testable in a crate
 this deep in wlroots. The arrange/slotmap tests live in the sibling
 `cce-window-manager` crate — run them with `cargo test -p cce-window-manager`.
@@ -306,7 +307,7 @@ treats them as opaque.
   server, loads config + persisted state, adds the wayland socket, spawns the init
   program (`~/.config/cce/init` via `sh -c`) and the IPC + status servers, then
   `wl_display_run`.
-- **`window_manager.rs`** (~5.7k lines) — the heart of the mechanism side. Holds the
+- **`window_manager.rs`** (~7.5k lines) — the heart of the mechanism side. Holds the
   WM state, the camera fields, window lists, the IPC command dispatcher
   `process_ipc_command()`, the `Policy::action` snapshot builder
   (`build_action_ctx`) and the `Compositor` command applier. IPC requests arrive on
@@ -318,7 +319,7 @@ treats them as opaque.
   now `poll()`s its sockets plus a wake eventfd. Nothing in the compositor should
   tick while idle: a timer that re-arms itself unconditionally is a bug.) Decision logic (camera math, action
   dispatch, snapping, refocus, grid geometry) lives in `cce-window-manager`.
-- **`window.rs`** (~4.9k lines) — per-window model and rendering (borders, blur,
+- **`window.rs`** (~5.8k lines) — per-window model and rendering (borders, blur,
   viewport transforms).
 - **`crate::tiling`** (from `cce-window-manager`) — `TilingMode` enum: `Floating`,
   `Tiled` (grid-aligned; the window reports xdg maximized), `Fullscreen`,