Commit Graph
2875 Commits
Author SHA1 Message Date
LGUG2Z 348cb7ae96 build(repo): cargo manifests use the final directories
The workspace members and the path dependencies of komorebi-client, komorebic,
komorebi-daemon, komorebi-linux, komorebi-macos and komorebi-hotkeys name the directories
of the previous revision (komorebi-windows, komorebi-linux, komorebi-macos,
komorebi-hotkeys at the top level); the dependencies of the moved crates on the shared
crates are one directory shorter. cargo metadata --offline succeeds with an unchanged
Cargo.lock. Source files that include files by relative path are fixed later in this
stack.
2026-11-05 15:03:27 -08:00
LGUG2Z cd3892de76 refactor(repo): move the platform libraries to their final directories (pure move)
komorebi/                          -> komorebi-windows/
komorebi-for-kde/komorebi/         -> komorebi-linux/
komorebi-for-mac/komorebi/         -> komorebi-macos/
komorebi-for-kde/komorebi-hotkeys/ -> komorebi-hotkeys/

The directories now carry the names of their packages (komorebi-windows, komorebi-linux,
komorebi-macos). Renames only: every file is a 100% rename (270 files); nothing is edited,
so the workspace does not build at this revision. The next revision fixes the paths.
2026-11-05 15:03:27 -08:00
LGUG2Z 170952596f refactor(repo): delete the shim packages
komorebic-linux, komorebi-client-linux, komorebic-macos, komorebi-client-macos and
komorebi-bar-macos were #[path] includes of the unified komorebic, komorebi-client and
komorebi-bar modules, kept only so the old package names kept building. The unified
packages are the only ones now, so the five directories and their workspace members are
gone (Cargo.lock loses their dependency entries).

Things that named the old packages follow: the clarify entries of the two per-tree
deny.toml files, tools/fast-check, tools/mac-check.sh and tools/kde-closure-check (it now
walks komorebic and komorebi-client), and the doc comment of komorebic/src/main.rs.
komorebi-for-kde/nix/root-crates.json gains komorebic, komorebi-client and
crates/komorebi-version, because those are root crates the KDE build depends on now.
komorebi-for-mac/komorebi/src/pan.rs read its transcripts from the deleted
komorebic/fixtures; they are byte-identical to the root komorebic/fixtures, so the three
paths point there.

Not touched here (done in the flake and justfile revisions of this stack): the nix
flakes and justfiles of the trees, which still name the removed packages, and docs/dev.

Verified: Windows cargo clippy --locked --all-targets -D warnings (default members) passes;
KDE cargo test -p komorebi -p komorebic -p komorebi-client -p komorebi-linux passes; macOS
cargo check --target aarch64-apple-darwin (fake CC) of komorebi, komorebi-macos, komorebic,
komorebi-client, komorebi-bar passes; tools/kde-closure-check passes. The nix flakes were
not run.
2026-11-05 15:03:27 -08:00
LGUG2Z cce2886622 refactor(version): one komorebi-version crate for Linux and macOS
version-linux (komorebi-for-kde/version, shadow-rs 2) and version-macos
(komorebi-for-mac/version, shadow-rs 1) had the same build.rs and the same lib.rs. They
are now one package, crates/komorebi-version (lib name version, shadow-rs from the
workspace), and the KDE and macOS daemons, their command lines and the unified komorebic
depend on it under the key version. The extern crate lines of komorebic/src/main.rs that
renamed the two crates are gone, and the two deny.toml clarify entries name the new
package.

komorebi-daemon/tests/linux_version.rs read the version out of the old crate's Cargo.toml
text, which no longer has a number (it is inherited); it now expects the package version,
which is the workspace version.

Verified: cargo test -p komorebi -p komorebic -p komorebi-client -p komorebi-linux (KDE
side, native Linux) all pass, including the version test; cargo check --target
aarch64-apple-darwin of the macOS packages with the fake C compiler passes. Windows and
nix were not run for this revision (Windows does not use the crate; nix runs at the end of
the stack).
2026-11-05 15:03:27 -08:00
LGUG2Z 0180d80fa6 docs(schema): the schema descriptions name v0.2.0
The doc comments that become the description of schema.json and schema.bar.json said
v0.1.42 (Windows), and the macOS views of the schemas said v0.1.0 and linked
komorebi.0.1.0.schema.json. They now say v0.2.0 (the unified release) and link the
0.2.0 file. The macOS site domain in those links is not touched: where the schemas are
published is a release decision.

The checked-in schema.json and schema.bar.json of the Windows tree and of
komorebi-for-mac were edited to match, and the size and hash pins of
crates/komorebi-bar-core/tests/schema_oracle.rs were updated for the two bar schemas
(Windows 248,539 bytes, FNV-1a aaa0fabfb45967b7; macOS 116,925 bytes, a042f6ac063a0cfd).
The KDE schemas carry no version text.

Verified: cargo test -p komorebi-config -p komorebi-bar-core -p komorebi-protocol and
-p komorebi-linux --test schemas pass. The komorebi-config doctest fails to link in
the nix dev shell (it cross-compiles to windows-msvc); that is not caused by this change.
2026-11-05 15:03:27 -08:00
LGUG2Z 87fb8340d0 chore(repo): one workspace version, 0.2.0
Every package of the workspace now takes its version from [workspace.package]
(version.workspace = true) instead of its own number. The numbers before were
0.1.42 (Windows libraries and packages), 0.1.0 (KDE, the macOS version crate,
komorebi-shortcuts and the e2e guest crates) and 0.1.1 (macOS libraries); the
unified release is 0.2.0 for all of them.

Cargo.lock only changes the version of the workspace's own packages.

Not changed here: the version text in schema doc comments and the generated
schemas (next revision), and the shim packages, which are deleted later and
only pick up the number meanwhile.

Verified: cargo metadata --offline --locked succeeds.
2026-11-05 15:03:27 -08:00
LGUG2Z e1fc1499d4 test(e2e): the bar scenario lists processes with plain tasklist
The bar scenario counted komorebi-bar.exe processes through 'tasklist /fi "imagename eq komorebi-bar.exe" /fo csv /nh' run via the guest agent, which exits with status 1 there (quoting of the filter), so the process checks failed even though the bar was running and drawing (wgpu). 'tasklist /fo csv /nh' lists the process and the existing filter on lines starting with komorebi-bar.exe keeps the result the same. Found by the candidate 8 Windows gate (gate-cand8.md, bar-fix8.diff: with it the scenario ran 23/0). The file is also reflowed by ruff format (the CONFIG dict), which is formatting only. Verified: ruff format and ruff check on the file; the e2e run in the gate with the one-line change.
2026-11-05 15:03:27 -08:00
LGUG2Z 0ae08e823e chore(repo): candidate 9: the extra shared commands, the macOS wm2 batch and the docs on top of candidate 8, plus the KDE nix check fixes
Candidate 9 (final): wip-cand9draft (wip-u-cmd2 with the router gate_message hook and 12 more shared arms, wip-u-mac-wm2, wip-u-docs2) merged with wip-u-kdenix (KDE deny --config order, intra-doc links, two KDE manifests formatted with taplo, KDE fmt check through tools/format-all with the flake's own nightly). Conflicts, if any, are resolved here.
2026-11-05 15:03:27 -08:00
LGUG2Z 9a20844146 chore(repo): combine the extra shared commands, the macOS wm2 batch and the final docs (candidate 9 draft)
Candidate 9 (draft): wip-u-cmd2 (router gate_message hook + 12 more arms through komorebi_core::command; stacked on wip-u-wm2) with wip-u-mac-wm2 (shared push_simple_rule, macOS ignore-rule fix, Minimize/Close/DebugWindow methods) and wip-u-docs2 (MIGRATION-SUMMARY.md, macos-hand-check-plan.md), all on wip-cand8. Conflicts, if any, are resolved here.
2026-11-05 15:03:27 -08:00
LGUG2Z 2544012c2e fix(nix): check the KDE formatting file by file with the flake's nightly rustfmt
The kfde fmt check ran `cargo fmt -p ...` and failed with `failed to resolve
mod windows` for komorebic and komorebi-client: rustfmt follows the
cfg_select! branches of the shared entry files into files the KDE source does
not have. It is now a runCommand running tools/format-all --tree kde with the
rustfmt of the flake's own nightly (fmtToolchain, the toolchain craneLibFmt
already used) over komorebi-for-kde/**/*.rs and the linux modules of the
shared crates, file by file with skip_children and komorebi-for-kde/rustfmt.toml.
tools/format-all now takes the rustfmt of the root dev shell first (the same
pinned nightly) before a nightly on PATH, because a different nightly may
format differently or not follow cfg_select.

Verified: with the rustfmt of that very nightly (rust-overlay 19ecdd08,
rustfmt 1.11.0-nightly 2026-10-27, built from the flake's pins)
tools/format-all --check passes for kde, mac and windows on this tree, so the
only failure was the module resolution, not different formatting. The nix
attribute evaluates; not built.
2026-11-05 15:03:27 -08:00
LGUG2Z 2447f7c94b docs(core): section 26, the command seam after D-coord-17 (28 arms moved, what is next)
Records the twelve arms moved in wip-u-cmd2 (28 with the earlier 16), the
two host traits added, and the clusters whose text is identical on all
three routers but still per daemon (rules and padding, animation, lock/save/
load, overrides and work-area offsets, queries) as the next candidates.
Docs only; the list of identical arms comes from comparing the three routers
at wip-cand8.
2026-11-05 15:03:27 -08:00
LGUG2Z 85f8e2af2b docs(core): section 23, the macOS side of the shared router and WindowManagerPlatform
Records, while kfde's gate_message hook and WindowManagerPlatform trait did not exist yet:
macOS gates every message with the same call at the same place as KDE (so the default
gate_message needs no macOS override), the macOS entry points as hooks with their size and
seam note (focus_workspace keeps the pre-existing main-queue dispatch under the lock, no
hook adds one), what was done meanwhile (Minimize, Close, DebugWindow as methods;
push_simple_rule), and that update stays macOS's (D-coord-15).

Verified: documentation only.
2026-11-05 15:03:27 -08:00
LGUG2Z f53060833f docs: macos-hand-check-plan.md, one prioritised runbook for the Mac pass
macos-handcheck.md grew by appending sections from several authors (A-H, the
review checks H1-H12, deep-dedup rows, bar clicks, settings rows), so the owner
had to merge them by hand. The new runbook orders every item by what could
make the daemon unusable first: prerequisites, startup and the command path
(shared transport, shared SocketMessage, lock order), hiding and restoring
(shared Container/Workspace/Monitor, HideSpot), the window registry and leaks,
the pointer preamble, settings reload, the rest of the walk-through, the bar,
then the known issues that are expected to misbehave. Each item has steps, the
expected result, how to stop or roll back, the revision that introduced it, a
mark where a second display, trackpad or cables are needed, and a time
estimate per block (about 5 hours in all).

It opens with the list of commands that must not be run on a Mac that has a
live komorebi (stop, start, quickstart, autostart, pkill, state-changing
komorebic commands, SIGSTOP on pids not just started), with the reasons read
from the code: a second daemon exits when a process named komorebi exists, and
a daemon deletes the socket in the user data directory on exit. The original
document is kept as the source.

Commands were checked against the checked-in macOS docs/cli page list; nothing
was run on a Mac. Not built.
2026-11-05 15:03:27 -08:00
LGUG2Z 87f34317d0 style(kde): format the two KDE manifests with taplo
Pure formatting, no other change: taplo fmt (default configuration) of
komorebi-for-kde/komorebi/Cargo.toml and komorebi-for-kde/komorebic/Cargo.toml,
the two files the kfde toml-fmt check reported. The earlier taplo sweep covered
the Windows and macOS sources only.

Verified: taplo fmt --check over the check's file set (the root Cargo.toml,
every .toml of komorebi-for-kde and of the nine to eleven root crates in
komorebi-for-kde/nix/root-crates.json) passes, it failed on exactly these two.
These two manifests change the KDE derivations (deps included, once); the
Windows and macOS ones do not read them.
2026-11-05 15:03:27 -08:00
LGUG2Z 491707469b refactor(windows): Windows router arms call the shared window, named-workspace and toggle commands
The arms MoveWindow, FocusWindow, CycleFocusWindow, PreselectDirection,
CancelPreselect, PromoteWindow, FocusNamedWorkspace,
MoveContainerToNamedWorkspace, SendContainerToNamedWorkspace,
ToggleWindowContainerBehaviour, ToggleCrossMonitorMoveBehaviour and
ToggleMonocleFocusBehaviour are one call each into komorebi_core::command
(12 arms; the 16 of the earlier batch are already there). The Windows
WindowManager implements WindowCommandHost (thin forwards to its own
direction functions, and Workspace::update) and BehaviourCommandHost (its
three settings). The arm text was identical on all three daemons, so the
same functions are called in the same order. Two small differences: a
missing workspace is reported as "there is no workspace" by the shared
code, and the named lookup is a shared function instead of
WindowManager::monitor_workspace_index_by_name (which stays for its other
callers).

BEHAVIOUR (expected none; marked because arms moved): Windows e2e commands, workspaces, focus, stacking and monocle scenarios (the gated functions are called as before).
Verified: cargo clippy -p komorebi-windows --all-targets -D warnings passes; tools/format-all --check clean. Windows tests and e2e cannot run on Linux.
2026-11-05 15:03:27 -08:00
LGUG2Z 59c19da785 refactor(mac): Minimize, Close and DebugWindow are methods
BEHAVIOUR (a pure move; type-checked and clippy-clean with the fake CC).

The three inline router arms of process_command.rs become minimize_foreground_window,
close_foreground_window and debug_window(window_id, reply), with the bodies the arms had (the
foreground element through AdhocWindow, the CoreGraphics window list walked for the id); the
arms are the same text as KDE's now. The bodies stay macOS's: there is no way to share
them without a window abstraction that hides the element, which is the registry work
of a later step. This is the part of the owner's item (4) that can be done without
changing behaviour.

Verified: fast-check macOS PASS; fake-CC cargo clippy -p komorebi-macos --all-targets -D
warnings clean; tools/format-all --check --tree mac clean. Not verified: any macOS run.
Verified on the Mini: not yet. Hand check row added.
2026-11-05 15:03:27 -08:00
LGUG2Z 5e553a7da4 docs: MIGRATION-SUMMARY.md, the final state of the consolidation
A maintainer who was not here had no one place that says what the repository
is now, what was shared and how, what was kept per platform on purpose, how it
was verified and what was not, what is still open, and how to go on. The page
gives: the four unified packages and how cfg(target_os) selects the platform;
the three trees; the shared crates (protocol, config with the one rule matcher,
collections, transport, backend, core with Container/Workspace/Monitor/
update_shared/command, settings, bar-core, komorebic-core) and the way each was
moved; what stays per platform (WindowManager, router, events, macOS update,
borders and other subsystems, bar rendering) with links into core-model.md,
seam.md, settings.md, bar-unification.md and unified-binaries.md; the oracles
and the gate results per candidate (Windows e2e, KDE VM, Mac Mini compile,
unit and nix) with the flake summary; what is not verified (macOS never ran as
a daemon, bar runtime under software rendering, the KDE slow tier, candidate 8
gates still running at the time of writing); known issues; the cutover list
(shims, version crates, flakes, workflows, docs, tools) with a CI and release
proposal that is not decided; how to continue; and a table of 26 decisions
rewritten without agent names.

Facts were taken from the progress and decisions logs, the revision list
wip-cand4..wip-cand8 and the docs in docs/dev; no host or personal paths are
included. Not built. Gate results are as recorded, not re-run.
2026-11-05 15:03:27 -08:00
LGUG2Z 161ed77f4d docs(kde): fix the intra-doc links that cargo doc -D warnings rejects
The kfde doc check failed (rustdoc exit 101) on eleven links: Backend::hide,
restore, cursor_pos, set_rect, focus, center_cursor_in, current_workspaces and
window_workspace are not items of the trait Backend that the links resolve to
here, [`Window`] and [`TRANSPARENCY_ALPHA`] are not in scope in their modules,
and the public Workspace alias links to the private WorkspaceScrolling. The
brackets are removed (the names stay as code), and the two link definitions in
desktop.rs. Documentation text only, no code change.

Verified: RUSTDOCFLAGS='-D warnings' cargo doc --locked -p komorebi -p
komorebi-linux -p komorebic -p komorebi-client -p komorebi-hotkeys --no-deps
(the flake's package set) finishes without errors, before it reproduced
exactly these eleven; local stable rustc is 1.99.1, the toolchain of the flake.
2026-11-05 15:03:27 -08:00
LGUG2Z 596271c38b refactor(mac): macOS router arms call the shared window, named-workspace and toggle commands
The arms MoveWindow, FocusWindow, CycleFocusWindow, PreselectDirection,
CancelPreselect, PromoteWindow, FocusNamedWorkspace,
MoveContainerToNamedWorkspace, SendContainerToNamedWorkspace,
ToggleWindowContainerBehaviour, ToggleCrossMonitorMoveBehaviour and
ToggleMonocleFocusBehaviour are one call each into komorebi_core::command
(12 arms; the 16 of the earlier batch are already there). The macOS
WindowManager implements WindowCommandHost (thin forwards to its own
direction functions, and Workspace::update) and BehaviourCommandHost (its
three settings). The arm text was identical on all three daemons, so the
same functions are called in the same order. Two small differences: a
missing workspace is reported as "there is no workspace" by the shared
code, and the named lookup is a shared function instead of
WindowManager::monitor_workspace_index_by_name (which stays for its other
callers).

BEHAVIOUR (expected none; marked because arms moved): macOS hand check: focus, move and promote by direction, named workspaces, the three toggles.
Verified: fake-CC cargo clippy --all-targets -D warnings for the four macOS packages passes; tools/format-all --check clean. Nothing ran on a Mac.
2026-11-05 15:03:27 -08:00
LGUG2Z 4811a056e9 refactor(kde): Minimize, Close and DebugWindow are methods with the macOS names
The inline router arms become minimize_foreground_window, close_foreground_window and
debug_window(window_id, reply) with the bodies they had, so that the three arms are the
same text as macOS's (the bodies differ by the platform: the backend and Window::from here,
the foreground element and the Accessibility window list there). Pure move, no behaviour
change.

Verified: KDE cargo check --all-targets and lib tests PASS; tools/format-all --apply
--tree kde ran.
2026-11-05 15:03:27 -08:00
LGUG2Z 2ba338347c style(mac): format with the project's rustfmt settings (tools/format-all --apply --tree mac)
Pure formatting by the same nightly rustfmt invocation the nix fmt check uses (tools/format-all, edition 2024, the tree's rustfmt.toml). No code change. Applied last on the candidate because it touches many files other agents were editing. Verified: tools/format-all --check --tree mac passes afterwards; light gates (fast-check) after all three.
2026-11-05 15:03:27 -08:00
LGUG2Z 1fe07c6736 fix(nix): pass --config before check in the KDE deny check
The KDE deny check failed with `error: unexpected argument '--config'
found`: the flake wrote `cargo deny ... check --config <deny.toml> bans
licenses sources`, and in cargo-deny 0.20.2 (the one of the pinned
kfde-nixpkgs) --config is an option of `cargo deny` itself, not of
`check`. It now goes into cargoDenyExtraArgs, before `check`.

Verified: cargo deny 0.20.2 from nixpkgs f05535a0 (the flake's pin) with the
flake's --exclude list, `--config komorebi-for-kde/deny.toml check bans
licenses sources`: bans ok, licenses ok, sources ok (the clarify entries
and the komorebi-bar-core exclusion of the previous fix are enough, also for
komorebi-daemon, komorebi-settings and the wgpu stack). Not built in nix.
2026-11-05 15:03:27 -08:00
LGUG2Z 4c5396a435 refactor(kde): KDE router arms call the shared window, named-workspace and toggle commands
The arms MoveWindow, FocusWindow, CycleFocusWindow, PreselectDirection,
CancelPreselect, PromoteWindow, FocusNamedWorkspace,
MoveContainerToNamedWorkspace, SendContainerToNamedWorkspace,
ToggleWindowContainerBehaviour, ToggleCrossMonitorMoveBehaviour and
ToggleMonocleFocusBehaviour are one call each into komorebi_core::command
(12 arms; the 16 of the earlier batch are already there). The KDE
WindowManager implements WindowCommandHost (thin forwards to its own
direction functions, and Workspace::update) and BehaviourCommandHost (its
three settings). The arm text was identical on all three daemons, so the
same functions are called in the same order. Two small differences: a
missing workspace is reported as "there is no workspace" by the shared
code, and the named lookup is a shared function instead of
WindowManager::monitor_workspace_index_by_name (which stays for its other
callers).

BEHAVIOUR (expected none; marked because arms moved): KDE VM commands and focus/move scenarios.
Verified: cargo clippy -p komorebi-linux --all-targets -D warnings passes; cargo test -p komorebi-linux 670 passed, 0 failed; tools/format-all --check clean.
2026-11-05 15:03:27 -08:00
LGUG2Z fe65256659 refactor(kde): the ignore and manage rules use the shared push_simple_rule
The KDE copy of push_simple_rule and its test moved to komorebi_config::matching (the
config revision of this stack); the daemon imports it. No behaviour change: the function is
the same text.

Verified: KDE cargo check --all-targets and lib tests (fast-check) PASS; native
cargo test -p komorebi-config has the moved test; tools/format-all --apply --tree kde ran.
2026-11-05 15:03:27 -08:00
LGUG2Z 6e9800751b style(kde): format with the project's rustfmt settings (tools/format-all --apply --tree kde)
Pure formatting by the same nightly rustfmt invocation the nix fmt check uses (tools/format-all, edition 2024, the tree's rustfmt.toml). No code change. Applied last on the candidate because it touches many files other agents were editing. Verified: tools/format-all --check --tree kde passes afterwards; light gates (fast-check) after all three.
2026-11-05 15:03:27 -08:00
LGUG2Z f4b4d0ff05 feat(core): the window, named-workspace and behaviour-toggle commands as shared functions
Adds to komorebi_core::command: move_window, focus_window,
cycle_focus_window (layer dispatch: tiling or floating function of the
host), preselect_direction, cancel_preselect, promote_window,
monitor_workspace_index_by_name, focus_named_workspace,
move_container_to_named_workspace(follow), and the three behaviour toggles
(toggle_window_container_behaviour, toggle_cross_monitor_move_behaviour,
toggle_monocle_focus_behaviour). The host traits are WindowCommandHost
(thin forwards to each daemon's direction functions plus
update_focused_workspace_layout) and BehaviourCommandHost (get and set of
three settings). The bodies are the text the router arms have on all three
daemons today. Nothing calls them yet: the daemons converge in the next
three revisions. No behaviour change.

Native tests on the recording stub host, each naming its commands.py
check (mirrors: commands / ...): 5 new tests, komorebi-core commands
test file 23 passed (was 18).
Verified: cargo test -p komorebi-core --features schemars all pass;
clippy -D warnings on komorebi-core all targets passes; format-all
--check clean.
2026-11-05 15:03:27 -08:00
LGUG2Z 544767c863 refactor(mac): ignore and manage rules go through the shared push_simple_rule
BEHAVIOUR (a small fix, KDE's behaviour). Router arm ManageRule and the method
add_ignore_rule used an inline loop that skipped a rule when any simple rule had the same
id, whatever its kind: 'ignore-rule class foo' after 'ignore-rule exe foo' was dropped.
They now call komorebi_config::matching::push_simple_rule (kind and id), as KDE does
(its test pins it), and the ManageRule arm is the KDE text.

Verified: fast-check macOS PASS; fake-CC cargo clippy -p komorebi-macos --all-targets
-D warnings clean; tools/format-all --check --tree mac clean. Not verified: any macOS
run. Verified on the Mini: not yet. Hand check row added.
2026-11-05 15:03:27 -08:00
LGUG2Z e70a0e4921 style(windows): format with the project's rustfmt settings (tools/format-all --apply --tree windows)
Pure formatting by the same nightly rustfmt invocation the nix fmt check uses (tools/format-all, edition 2024, the tree's rustfmt.toml). No code change. Applied last on the candidate because it touches many files other agents were editing. Verified: tools/format-all --check --tree windows passes afterwards; light gates (fast-check) after all three.
2026-11-05 15:03:27 -08:00
LGUG2Z 0f8a160ee3 docs(core): section 25, why WindowManager<P> still does not move (measured on cand8)
Repeats the function comparison of sections 17/18/20 on the three
window_manager.rs files at wip-cand8: identical on all three is 43
functions and 696 lines (15.6% of Windows, 18.5% of KDE, 15.3% of macOS),
at most four lines apart 81 functions (46% of KDE at best), identical on
KDE and macOS 102 functions (64% of KDE). The all-three threshold of 60%
is not met even with every near-identical function converged. Records the
struct analysis (event type, platform field types, daemon-only methods)
and why the struct move is not taken unattended, and the KDE+macOS subset
as the owner's option. Docs only. Verified: counts from the fnsplit and
cmp3 scripts at the cand8 tree; claims about field types read from the
three WindowManager struct definitions.
2026-11-05 15:03:27 -08:00
LGUG2Z f3b9d926fb refactor(config): push_simple_rule, adding a simple rule once per kind and id
Moves KDE's push_simple_rule (and its test) to komorebi_config::matching: add a simple
rule that matches id as a kind with the legacy strategy unless a simple rule of that
kind and id is there already; a rule of another kind with the same id and a composite
rule do not stop it. The KDE daemon and, next, the macOS daemon use it for the ignore and
manage rules. Nothing calls it yet.

Verified: native cargo test -p komorebi-config 5 + 16 + 9 + 1 passed.
2026-11-05 15:03:27 -08:00
LGUG2Z c670ab35c8 fix(tools): format-all passes its own arguments on when it re-runs inside the dev shell
format-all re-executes itself under 'nix develop' to get the nightly rustfmt, but it did so after its argument loop had shifted every argument away, so the re-run always used the defaults (--check, all trees): '--apply' silently only checked. The original arguments are now saved before parsing and passed on. Found when applying the final formatting of candidate 8: '--apply --tree windows' printed diffs and changed nothing. Verified: bash -n; the revisions after this one are the result of running --apply.
2026-11-05 15:03:27 -08:00
LGUG2Z fab53bd1f8 refactor(core,kde,mac): the unmanaged-window gate of the router is the CommandHost::gate_message hook
Section 22.1 of core-model.md: KDE and macOS refuse every message before
the router's match while the focused window is not managed
(handle_unmanaged_window_behaviour); Windows gates inside 18 functions.
CommandHost gets a defaulted gate_message(&mut self, &SocketMessage)
that lets everything through (the Windows form, its impl is untouched);
the KDE and macOS impls call handle_unmanaged_window_behaviour and their
routers call the hook where they called the method, so behaviour is
identical per daemon. komorebi-core now depends on komorebi-protocol
(for SocketMessage; Cargo.lock gains that one edge).

This is the groundwork only: the router itself is still per daemon,
because a shared router needs WindowManager<P> in core (see the
struct-move analysis in core-model.md). No BEHAVIOUR change.
Verified: KDE cargo test -p komorebi-linux 670 passed, 0 failed; fake-CC
clippy -D warnings for the four macOS packages passes; cargo clippy -p
komorebi-windows -p komorebi-core --all-targets -D warnings passes;
tools/format-all --check clean. Not verified: KDE VM, macOS hand check
(no behaviour change expected).
2026-11-05 15:03:27 -08:00
LGUG2Z 6686273bee chore(repo): combine the candidate 8 draft with the KDE clippy fixes
Candidate 8: the second draft (cand7 + pointer-picks-monitor + thin-events note + bar wgpu fallback + macOS deep dedup + kfw's PlatformMonitorId/promote hook + the nix fmt/deny fixes) merged with wip-u-kdeclippy (two KDE clippy fixes). Textually clean.
2026-11-05 15:03:27 -08:00
LGUG2Z 4263bf4793 chore(repo): combine the candidate 8 draft with kfw's Windows deep dedup and the nix fmt/deny fixes
Candidate 8 (second draft): cbc40c03 (cand7 + pointer-picks-monitor + thin-events note + bar wgpu fallback + macOS deep dedup) plus wip-u-win-deep (PlatformMonitorId alias, promote_focus_container_idx hook, the WindowManager hook list) and wip-u-fmt (tools/format-all, nix fmt over the nightly rustfmt, deny clarify entries for Windows and KDE). Conflicts, if any, are resolved here.
2026-11-05 15:03:26 -08:00
LGUG2Z b778cea2d4 fix(kde): drop three useless .into() on MonitorId in kwin tests
clippy::useless_conversion: the values are already komorebi_backend::MonitorId
since the Backend id-type change, so .into() converts to the same type.
One line is joined where the shorter call now fits, so rustfmt stays happy
for the touched lines. Test code only, no behaviour change.
Verified: native clippy --all-targets -D warnings over komorebi-linux,
komorebic, komorebi-client, komorebi-hotkeys, komorebi-core, the shared
crates the KDE flake sees and version-linux/komorebic-linux passes.
2026-11-05 15:03:26 -08:00
LGUG2Z 7a69f692ba chore(repo): combine candidate 7 with the pointer-picks-monitor change, the bar wgpu fallback and the macOS deep dedup (candidate 8, before kfw's Windows deep dedup)
Candidate 8 (draft): wip-cand7 plus wip-u-deep (which contains wip-u-ptr: shared focus_workspace_number(s), KDE and macOS get the pointer-picks-monitor preamble, the const removed, and the thin-events design note), wip-u-bar4 (eframe wgpu fallback for the Windows bar, scenario rules) and wip-u-mac-deep (ContainerExt removed, nine shared window_manager functions identical on KDE and macOS, five macOS router arms as named methods). Conflicts, if any, are resolved here.
2026-11-05 15:03:26 -08:00
LGUG2Z e5f9351621 docs(core-model): what Windows keeps platform-specific for a shared WindowManager<P> (section 22)
Section 22 of docs/dev/core-model.md, the hook list for kfde: why the
unmanaged-window gate was NOT moved from 18 Windows functions to the router (the
router form refuses every message, an arm that works before its gated call, the
layer split of FocusWindow/MoveWindow/CycleFocusWindow, and callers that bypass
the router), with the defaulted gate_message hook that expresses both shapes; the
WindowManagerPlatform hooks (new, init, stop, restore_all_windows, resize_window,
focus_workspace plan/execute, enforce_workspace_rules, the cross-monitor DPI
check, the floating-window functions); a BorderPlatform hook for the border calls
and the monocle floating hide/restore; wallpaper, window handling behaviour,
workspace names and custom layouts; the result of the cosmetic re-read (nothing
left); and an order for the implementation with the Windows gates.

Docs only.
2026-11-05 15:03:26 -08:00
LGUG2Z c0ca0a83ad fix(nix): check the Windows formatting with the nightly rustfmt over the Windows files; add tools/format-all
The Windows fmt check ran the stable `cargo fmt` over the stubbed workspace
source: it failed on the empty stub lib.rs files of the other platforms, on
`mod linux;`/`mod macos;` of the shared entry files (the Windows source does
not have those modules), and its stable rustfmt ignores the nightly options of
rustfmt.toml. It is now a runCommand running tools/format-all --tree windows
with the nightly rustfmt over the files of the Windows source (build.real, no
stubs), file by file with skip_children.

tools/format-all runs the same check locally (--check, or --apply to format;
--tree windows|mac|kde|all; the nightly rustfmt from $RUSTFMT, PATH or the
root dev shell). mac is the explicit-file invocation of the kfm check, kde is
`cargo fmt -p ...` as the KDE check does.

Verified: in a throwaway copy of wip-cand7, --apply formats 17 Windows files
(+211 -88; crates/ komorebi-backend, bar-core, core, protocol, bar windows
modules, client windows.rs, komorebi-gui, testwin) and 12 KDE files
(+22 -29); afterwards --check passes for windows, mac and kde. The formatting
itself is not in this revision (other agents are editing those files). The nix
attribute evaluates; not built.
2026-11-05 15:03:26 -08:00
LGUG2Z 842660720f fix(kde): replace_configuration takes &Path, not &PathBuf
clippy::ptr_arg (rustc 1.99 in the nix KDE clippy check) rejects &PathBuf
where &Path will do. Callers passing &PathBuf still compile by deref. No
behaviour change. Verified: native clippy --all-targets -D warnings over
the KDE packages passes (see the next revision for the exact set).
2026-11-05 15:03:26 -08:00
LGUG2Z 176dc0a8ba test(core): make the command tests clean under clippy -D warnings
komorebi-core is in the workspace default-members since the review fixes, so a bare clippy --all-targets -D warnings now covers its test files. crates/komorebi-core/tests/commands.rs (wip-u-cmd) had two findings that only show there: an unused Result of new_container_for_window (now unwrap()ed: the stub window cannot fail) and a never-read field pointer_for_all (removed: the Windows switch is tested through the associated const in its own host type). No behaviour change; verified: cargo test -p komorebi-core and the Windows clippy (bare, default-members).
2026-11-05 15:03:26 -08:00
LGUG2Z ea996a9171 docs(core): section 23, design note for thin events (a common event vocabulary)
Design only, nothing implemented (D-coord-13 (c)). Lists the three
event vocabularies read from the window_manager_event.rs files (only
Destroy, Show and Minimize share a name on all three), proposes a small
CoreEvent<W> produced by the platform adapters, sketches the shared
handlers for Gone, Appeared and Minimized with platform hooks, orders
the prerequisites (unmanaged check converged, shared WindowManager
state, PlatformMonitorId, border hooks) and names the risks (side-effect
order per arm, macOS FocusChange without a Window). Verified: docs only;
claims about handler arms rest on section 17 and were not re-measured.
2026-11-05 15:03:26 -08:00
LGUG2Z d9da877134 docs(bar): the wgpu fallback, the scenario's new rules, cost and risks
docs/dev/bar-e2e.md: why the golden guest cannot use glow, how the bar falls
back to wgpu (WARP), what the scenario now counts as real and as a skip (both
renderers failing, naming both errors), the log level kept in bar.out, the
measured cost (622 -> 664 crate versions in the Windows bar tree, one new lock
entry; build time and exe size not measured) and the risks.

Verified: not applicable (docs). The checks of the stack: see the other
revisions.
2026-11-05 15:03:26 -08:00
LGUG2Z 730f12e719 docs(core): section 22, what the macOS deep dedup did and why update is not adopted
Records the container API unification (ContainerExt gone, Workspace::hide_spot), the nine
window manager functions that are now identical on KDE and macOS (76 of 92 shared
function names identical, 1521 of KDE's 2713 stripped lines: 56%), the five router arms
that became methods, the four that stay macOS's, and the exact differences between
the macOS update and update_shared (a scrolling workspace returns early and skips the
resize-dimensions fix-up and places the windows itself; the SkyLight batch is wider; the
rest folds with hooks), which is why update is not adopted without the owner's decision.

Verified: documentation only.
2026-11-05 15:03:26 -08:00
LGUG2Z 1944fd67c4 refactor(windows): promote-focus on a custom layout is a hook of WorkspacePlatform
The Windows promote_focus_to_front focused the first column of a custom layout
that has no primary column (first_container_idx(primary_idx().unwrap_or(0)))
where the shared primary_container_idx fails for it; this was one of the
Layout::Custom differences of core-model.md section 18. WorkspacePlatform gets
promote_focus_container_idx(layout) -> usize, defaulting to
primary_container_idx(layout).unwrap_or(0), so a shared promote_focus_to_front
can call it on every platform; the Windows platform overrides it with the exact
expression it had (default layouts 0, custom layouts the first container of the
primary column, else of column 0). window_manager.rs calls the hook. A core test
pins the default for the default layouts.

Not a behaviour change on Windows (the same expression, moved). KDE and macOS
see a new defaulted trait method only. Verified: tools/fast-check native (core
tests), bare Windows clippy -D warnings, KDE check + lib tests, macOS fake-CC
type-check PASS; e2e: commands (promote-focus), layouts (custom layout).
2026-11-05 15:03:26 -08:00
LGUG2Z 911ce46ce1 fix(deny): clarify the license of the workspace crates the Windows and KDE deny checks see
The root and KDE deny.toml only clarified the old crate names, so
cargo deny failed with unlicensed for the crates of the unified workspace.
The root deny.toml gets entries (LicenseRef-Komorebi-2.0, as for the
existing ones) for komorebi-backend, -bar-core, -collections, -config, -core,
-protocol, -settings, -transport, komorebic-core, komorebi-e2e-agent and
komorebi-testwin; the KDE one for the same crates that it sees. The KDE deny
check also excludes komorebi-bar-core, which is not a KDE dependency and
brings the git egui-phosphor source that the KDE policy does not allow.

Verified: cargo deny --offline --workspace with the flake's --exclude lists
and `check --config <deny.toml> bans licenses sources` (nix shell
nixpkgs#cargo-deny): root, KDE and macOS: bans ok, licenses ok, sources ok
(before: licenses FAILED for root and KDE, sources FAILED for KDE); taplo
--check passes on both files. Not built in nix.
2026-11-05 15:03:26 -08:00
LGUG2Z e870eca239 chore(repo): combine candidate 6 with the shared rule matcher, the stall fixes, the bar scenario fix and the shared commands (candidate 7)
Candidate 7: wip-cand6 plus wip-u-rulematch (one window-rule matcher in komorebi-config), wip-u-stall2 (lock-holder guard, should_manage before the lock, reaper unlock, heartbeat), wip-u-bar3 (bar e2e scenario fix, skip when the guest cannot draw, bar config tests) and wip-u-cmd (komorebi_core::command: 16 shared router arms). Conflicts, if any, are resolved here.
2026-11-05 15:03:26 -08:00
LGUG2Z 3e5475e7ef refactor(core,kde,windows,mac): remove CommandHost::POINTER_PICKS_THE_MONITOR_FOR_ALL
All three daemons now let the pointer pick the monitor for every shared
command that has the preamble, so the const has no reason left. The
shared functions always call focus_the_monitor_under_the_pointer; the
three CommandHost impls lose the const (Windows had it true already, so
nothing changes there). The core test of the switch becomes
the_pointer_picks_the_monitor_..._on_all_platforms. known-issues item 1
is marked resolved and core-model.md section 18 text is updated.

No behaviour change in this revision beyond the previous two.
Verified: komorebi-core tests all pass (command tests 18); KDE cargo test
-p komorebi-linux 670 passed, 0 failed; fake-CC clippy for the four macOS
packages passes; cargo clippy -p komorebi-windows --all-targets -D warnings
passes. Not verified: Windows tests or e2e (cannot run on Linux).
2026-11-05 15:03:26 -08:00
LGUG2Z 0a315a61bc test(e2e): the bar scenario's window checks are real again when wgpu draws the bar
The bar now falls back to wgpu (Direct3D 12, WARP) when glow has no OpenGL
context, so in the OpenGL-less golden guest the bar can open a window and the
window, stays-alive, daemon-restart and notify checks run for real. They are
skipped only when BOTH renderers fail, and the skip names both errors
(`skip ...: guest cannot draw: glow: ...; wgpu: ...`, taken from the bar's
"Error: glow: ...; wgpu: ..." line); any other early exit still fails. The
scenario starts the bar with RUST_LOG=info,wgpu_hal=debug,wgpu_core=warn so
bar.out keeps what wgpu says about its adapters on the first run, and prints
which renderer drew the window ("the bar draws with wgpu").

Unit tests: both renderers failing (classify + the error line), a bar that fell
back and runs (the glow warning is not an "Error:"), plus the earlier ones.

Verified: runner and library tests 163 passed; ruff clean on the scenario and
its test. NOT run: needs the win-e2e `bar` gate.
2026-11-05 15:03:26 -08:00
LGUG2Z 008c112964 refactor(mac): five router arms are methods with the KDE names
Deep dedup D-coord-13 (3), the part that is a move. BEHAVIOUR (a pure move; type-checked
and clippy-clean with the fake CC).

The inline arms of ToggleWorkspaceLayer (88 lines), ResizeWindowAxis (59),
SessionFloatRule, IgnoreRule and ReplaceConfiguration in process_command.rs become the
methods toggle_workspace_layer, resize_window_axis, add_session_float_rule,
add_ignore_rule(identifier, &str) and replace_configuration(&Path) (KDE's is &PathBuf, which clippy::ptr_arg flags) of the same
names as KDE's, with the bodies the arms had (de-indented, ending in Ok(())); the router
arms are now the same text as KDE's. Two spellings changed because the KDE
signature has them: the ignore rule's id is a &str (compared with ==, copied with
to_string()), and replace_configuration takes the run loop from self as the arm did.

What stays macOS's own and is not moved, because the body is the platform's:
Minimize and Close (AdhocWindow on the foreground element), DebugWindow and
ManageRule (role against class; no KDE method to match yet), and the macOS
bodies of the five moved methods (the role in the session float rule, the run loop in
replace_configuration, the animation suspension in resize_window_axis): they are
the methods' own differences now, behind the same names.

Verified: fast-check macOS PASS; fake-CC cargo clippy -p komorebi-macos
--all-targets -D warnings clean. Not verified: any macOS test or run. Verified on the
Mini: not yet. Hand check row added to docs/dev/macos-handcheck.md.
2026-11-05 15:03:26 -08:00
LGUG2Z 96332b2578 refactor(windows): PlatformMonitorId next to PlatformWindowId; monitor_idx_from_current_pos has KDE's text
komorebi-core gets pub type PlatformMonitorId<P> = <P as MonitorPlatform>::Id,
the monitor counterpart of PlatformWindowId (blocker 5 of core-model.md
section 18). The Windows daemon aliases it (window::PlatformMonitorId, the
shared MonitorId) and gets window::monitor_id_at_cursor() like KDE's, so
monitor_idx_from_current_pos reads: ask the monitor id at the cursor, compare
monitor.id == monitor_id, and only then the Windows-only stale-handle fallback
(WindowsApi::monitor(monitor_id.to_hmonitor())). Same calls as before
(cursor_pos, monitor_from_point), in the same order.

Not a behaviour change. kfde: the alias is generic over MonitorPlatform; KDE and
macOS can alias it the same way. Verified: tools/fast-check native (core
tests), bare Windows clippy -D warnings, KDE check + lib tests, macOS fake-CC
type-check PASS; e2e: commands (monitor-from-cursor commands), hotplug scenarios
if any.
2026-11-05 15:03:26 -08:00