Delete the Windows SocketMessage, its as_bytes and FromStr (now in the crate) and re-export komorebi_protocol::message::SocketMessage from core, so komorebi::SocketMessage and komorebi_client::SocketMessage keep working. process_command stays an exhaustive match: the two KDE-only variants (ReloadHotkeys, HotkeysState) get one explicit arm that writes the 'not supported on this platform' reply (SocketMessage::not_supported_reply) and returns before anything else happens, so subscribers are not notified either. Behaviour change: those two used to fail to parse on Windows and now parse and are answered that way.
Verified: Windows clippy --workspace --locked --all-targets -D warnings clean; native cargo test -p komorebi-protocol passes. Windows unit tests and e2e not run (cannot on Linux).
message.rs holds the one SocketMessage with the 197 variants of the three trees: the Windows enum verbatim (195 variants, in its order, with ApplyState(StateBlob) and DebugWindow(i64) as converged in the previous revisions) plus the two KDE-only variants (ReloadHotkeys, HotkeysState) at the end, as_bytes and FromStr. platforms.rs has Platform, Platforms and SocketMessage::platforms(), one exhaustive match generated from tests/golden/variants-table.tsv (155 on all three, 33 Windows only, 6 Windows and KDE, 1 Windows and macOS, 2 KDE only). No tree uses it yet.
The golden test now runs the real enum: every golden instance of each platform is accepted with identical wire text (path-expansion instances only with STRICT_PATHS=1, which is meaningful on the target platform only; ApplyState on Windows by tag), every variant of every platform is in the unified schema and every generated instance round-trips, and platforms() matches each platform's variant list both ways.
Verified: native cargo test -p komorebi-protocol: 5 unit + 6 golden + 2 doctests passed, 0 failed. Not run: STRICT_PATHS=1 (fails on Linux for the Windows goldens by design).
ApplyState(State) becomes ApplyState(StateBlob) (D15): the handler reads the blob into State with serde_json::from_value and applies it as before. Wire bytes for a valid state are unchanged. Behaviour difference: a state that does not parse used to make the whole message fail to parse at the socket; now it is an error returned by the handler (logged). Nothing in this repository sends ApplyState.
Verified: Windows clippy --workspace --locked --all-targets -D warnings clean.
A transparent wrapper of serde_json::Value with a hand written schema (an object, named State), so that SocketMessage can carry ApplyState without the crate knowing the daemon's State type (D15/D16). On the wire it is exactly the state JSON.
Verified: native cargo test -p komorebi-protocol: 5 unit + 3 golden + 1 doctest passed, 0 failed.
DebugWindow(i64) as in the unified SocketMessage (D15); the comparison with the accessibility window id widens the u32 side, so behaviour for valid ids is unchanged (a negative or oversized id now parses and matches no window).
Verified: fast-check macOS (fake CC) cargo check --workspace --all-targets: PASS.
DebugWindow(i64) as in the unified SocketMessage (D15). An id outside u32 range, which KDE used to refuse at parse time, now parses and is answered like an id of no window (no reply). Existing ids behave as before.
Verified: cargo check --workspace --all-targets in komorebi-for-kde: 0 errors; cargo test -p komorebi --test rule_commands: 6 passed, 0 failed (it sends DebugWindow).
The unified SocketMessage has DebugWindow(i64) (D15): i64 accepts every value any tree accepts (Windows isize, KDE and macOS u32) and writes the same digits. The Windows handler and komorebi-gui convert with as (isize and i64 are the same width on the supported 64-bit targets), so Windows behaviour is unchanged.
Verified: Windows clippy --workspace --locked --all-targets -D warnings clean.
Delete KDE's copy (same text after the converge revision) and re-export the crate's.
Verified: cargo check --workspace --all-targets in komorebi-for-kde: 0 errors, no warnings; komorebic static-config-schema is byte-identical to the checked-in schema.json (the KWin sentence now comes from cfg_attr in the crate).
StackbarMode, StackbarLabel, BorderStyle, BorderImplementation, HidingBehaviour and FocusFollowsMouseImplementation move verbatim from core/mod.rs to the end of crates/komorebi-protocol/src/types.rs, because the unified SocketMessage (stage 2e) carries them; they keep their platform-only status in the support table. The crate allows the deprecated HidingBehaviour::Hide that the derives touch. core re-exports all six.
Verified: Windows clippy --workspace --locked --all-targets -D warnings clean; native cargo test -p komorebi-protocol passes.
The KWin sentence of the description moves into cfg_attr(target_os = "linux", doc = ...) lines so the same text can be shared with Windows. Description unchanged.
Verified: komorebic static-config-schema in komorebi-for-kde is byte-identical to the checked-in schema.json; cargo check passed during the run.
Windows takes the text that KDE and the crate will share: the Windows description is unchanged, KDE's extra sentence about KWin is added only under cfg_attr(target_os = "linux"), so each platform's schema.json keeps its bytes. No code change.
Verified: Windows clippy --workspace --locked --all-targets -D warnings clean.
KDE's SubscribeOptions carried a doctest that used SocketMessage; it was dropped from the shared text so the three trees could converge before the move. The crate now has a doctest that checks the wire form of the options ({"filter_state_changes":true}) and the default. The SocketMessage example returns when SocketMessage moves (2e).
Verified: native cargo test -p komorebi-protocol: 4 + 3 passed, doctest 1 passed, 0 failed.
Delete the seven enums from komorebi-for-mac core/mod.rs (text identical to the crate's) and re-export them from core.
Verified: fast-check macOS (fake CC) cargo check --workspace --all-targets: PASS (type-check only).
Delete the seven enums from komorebi-for-kde core/mod.rs (text identical to the crate's) and re-export them from core, so existing paths stay valid.
Verified: cargo check --workspace --all-targets in komorebi-for-kde: 0 errors, no warnings; cargo test -p komorebi --lib --test schemas --test animation: passed (counts in the stage log).
SubscribeOptions, StateQuery, WindowKind, ApplicationIdentifier, MoveBehaviour, MonocleFocusBehaviour and OperationBehaviour (text identical in the three trees after the converge revisions, checked with a per-item cmp) move from core/mod.rs to crates/komorebi-protocol/src/types.rs; core re-exports them, so komorebi::core::X and komorebi::X paths are unchanged. The five Windows-only payload enums and FocusFollowsMouseImplementation stay until SocketMessage moves (stage 2e).
Verified: Windows clippy --workspace --locked --all-targets -D warnings clean; native cargo test -p komorebi-protocol passes.
The seven payload enums take the shared text (same as the Windows and KDE revisions): WindowKind gets the Windows variant docs, SubscribeOptions and StateQuery get the KDE docs, ApplicationIdentifier::Class gets the cfg_attr doc (macOS keeps 'Role or subrole'). The spelling of Move, MonocleFocus and OperationBehaviour was already the Windows one on macOS.
komorebi-for-mac/schema.json needs no change: none of the changed docs is embedded in it (grep: WindowKind, SubscribeOptions, StateQuery are not in the schema; the four embedded descriptions are unchanged).
Verified: fast-check macOS (fake CC) cargo check --workspace --all-targets: PASS. macOS tests not run (cannot).
The seven payload enums take the shared text (same one as the Windows revision): the Windows docs of WindowKind's variants, the Windows spelling 'behaviour' in MoveBehaviour, MonocleFocusBehaviour and OperationBehaviour, and the cfg_attr doc of ApplicationIdentifier::Class (KDE keeps 'Role or subrole'). The SubscribeOptions doc loses its doctest and its intra-doc links here; the example comes back in the crate when the type moves, and an example with SocketMessage when that moves.
Intentional schema change, description only: komorebi-for-kde/schema.json spells behaviour in three descriptions (monocle focus, move, operation). Regenerated with komorebic static-config-schema and compared with the checked-in file: identical; schema.asc.json also identical to a regeneration.
Verified: cargo test -p komorebi --lib --test schemas in komorebi-for-kde: 302 + 5 passed, 0 failed; --doc: 44 + 2 passed (one doctest fewer: SubscribeOptions).
SubscribeOptions, StateQuery, WindowKind, ApplicationIdentifier, MoveBehaviour, MonocleFocusBehaviour and OperationBehaviour take the shared text (code was already identical in the three trees; only doc comments differ). Windows gains the KDE docs of SubscribeOptions and StateQuery, and the first doc line of WindowKind (replacing 'Window kind'). The one doc that differs in meaning per platform, ApplicationIdentifier::Class (Windows: Class, macOS and KDE: role or subrole), is selected by cfg_attr(target_os = "windows", doc = ...), so the description embedded in schema.json stays 'Class' on Windows.
None of the changed docs is embedded in komorebi's schema.json (checked by grep: only the ApplicationIdentifier, MoveBehaviour, MonocleFocusBehaviour and OperationBehaviour descriptions are, and they are unchanged for Windows). Windows schema.json not regenerated (komorebic cannot run on Linux).
Verified: Windows clippy --workspace --locked --all-targets -D warnings clean.
macOS's core/animation.rs and animation/prefix.rs become the one-line re-exports of the crate's types (same files as the Windows tree), so all existing paths keep working.
Verified: fast-check macOS (fake CC) cargo check --workspace --all-targets: PASS (type-check only).
KDE's core/animation.rs keeps only the module docs, a re-export of AnimationStyle and the KDE-only QtCurve trait; animation/prefix.rs becomes the same one-line re-exports as in the Windows tree. All paths stay valid.
Verified: cargo check --workspace --all-targets in komorebi-for-kde: 0 errors; cargo test -p komorebi --lib --test schemas --test animation: 302 + 1 + 5 passed, 0 failed (the 3 serde tests now run in the protocol crate).
The converged core/animation.rs and animation/prefix.rs (identical in the three trees apart from KDE's QtCurve trait) become crates/komorebi-protocol/src/animation.rs and animation/prefix.rs; the Windows files keep their paths as one-line re-exports, so komorebi::core::AnimationStyle and komorebi::animation::prefix::AnimationPrefix are unchanged. The three serde unit tests now run in the protocol crate.
Verified: Windows clippy --workspace --locked --all-targets -D warnings clean; native cargo test -p komorebi-protocol: 4 + 3 passed, 0 failed.
macOS's AnimationPrefix gains Transparency (it had movement and workspace), so all three trees share the union {movement, transparency, workspace} (D15/D16); the macOS daemon ignores Transparency as before in practice. prefix.rs is now the Windows text plus module docs (this adds new_animation_key to macOS).
Intentional schema change: komorebi-for-mac/schema.json gets the same shape change as the KDE one (per-prefix animation settings become additionalProperties of the value type). Because a macOS komorebic cannot run here, the three PerAnimationPrefixConfig definitions were copied from the schema that the KDE komorebic generated from identical code (jq, the file round-trips byte-identically through jq --indent 2); not regenerated on macOS. The animation CLI docs list the three values.
Verified: fast-check macOS (fake CC) cargo check --workspace --all-targets: PASS. macOS tests and schema generation not run (cannot).
KDE's AnimationPrefix gains the Transparency and Workspace variants, so that all three trees share the union {movement, transparency, workspace} (D15/D16). KDE only ever uses Movement; the new variants are accepted in the configuration and on the command line and ignored by the KDE daemon, as macOS ignores Transparency today.
Intentional schema change, regenerated with komorebic static-config-schema: in komorebi-for-kde/schema.json the per-prefix animation settings (enabled, duration, style) change from properties {movement} with additionalProperties false to additionalProperties of the value type (the same shape as the Windows schema). The animation CLI docs list the three values.
Verified: cargo test -p komorebi --lib --test schemas --test animation in komorebi-for-kde: 305 + 5 + 1 passed, 0 failed.
The enum, its serde impls and tests were already the shared text; the only difference left is the doc of CubicBezier, which now says 'Bezier' (the Windows spelling). That text is a description in schema.json, so schema.json changes in that one line (description only). QtCurve stays in this file until the type moves, then in a KDE-only file.
Verified: cargo test -p komorebi --lib --test schemas in komorebi-for-kde: 305 + 5 passed, 0 failed (the schemas test compares the checked-in schema.json).
core/animation.rs takes the shared copy (module docs, three serde unit tests) and its one doc comment now reads 'Bezier' like the Windows copy; that text is the description of the CubicBezier branch in schema.json, so schema.json changes in that one line (description only; the Windows schema keeps its text). prefix.rs gets the module docs; the macOS-only AnimationPrefix (no Transparency) is converged in the next revision.
Verified: fast-check macOS (fake CC) cargo check --workspace --all-targets: PASS. jj diff of schema.json: the single description line. macOS tests not run (cannot).
core/animation.rs takes the KDE copy's module docs and its three serde unit tests (without KDE's QtCurve trait, which stays KDE-only); prefix.rs gets the module docs. No code change: the enum, the custom serde impls and the doc comments are as before, so schema.json is unchanged.
Verified: Windows clippy --workspace --locked --all-targets -D warnings clean. The new unit tests cannot run on Linux for this tree (the same tests run in KDE and, after the move, in the protocol crate).
AnimationStyle is going to live in komorebi-protocol, and an inherent impl cannot be written outside the crate that defines the type (orphan rule). qt_curve (the only inherent impl on a type that moves in step 2, in any tree) becomes the trait QtCurve in core::animation, implemented for AnimationStyle; callers import it. The method is no longer const (trait methods cannot be); no caller needed that. Doc links to AnimationStyle::qt_curve are updated.
Verified: cargo test -p komorebi --lib every_style: passed; cargo test -p komorebi --doc: 45 + 2 passed, 0 failed (includes the qt_curve doctest).
Delete komorebi-for-mac/komorebi/src/core/pathext.rs (identical to the crate's copy) and re-export komorebi_protocol::pathext from core. komorebi-protocol becomes a workspace dependency of komorebi-for-mac; its Cargo.lock gains the package.
Verified: fast-check macOS (fake CC) cargo check --locked --workspace --all-targets: PASS (type-check only, no macOS tests can run).
Delete komorebi-for-kde/komorebi/src/core/pathext.rs (identical to the crate's copy) and re-export komorebi_protocol::pathext from core, so every existing path keeps working. komorebi-protocol becomes a workspace dependency of komorebi-for-kde (schemars feature on); the crate no longer lists dirs (unused until the client moves), so the root Cargo.lock loses that edge. KDE's Cargo.lock gains komorebi-protocol and cargo re-resolved one windows-sys entry.
Verified: cargo check --workspace --all-targets in komorebi-for-kde: 0 errors; cargo test -p komorebi --lib --test schemas: 305 + 5 passed, 0 failed. Full KDE workspace test run is done at the end of the stage.
Pure move of the converged pathext.rs (identical in all three trees, cmp checked) to crates/komorebi-protocol/src/pathext.rs. The Windows daemon depends on the crate (schemars feature forwarded) and re-exports it as komorebi::core::pathext, so every existing path keeps working. Cargo.lock gains the dependency edge.
Verified: Windows clippy --workspace --locked --all-targets -D warnings clean; native cargo test -p komorebi-protocol: 4 passed 0 failed, including the moved pathext unit test (unix branch). The Windows branch of that test cannot run on Linux (not verified).
The macOS copy gains the module docs, the ~ special case is enabled on every unix (it was target_os = "macos" only, which is a subset) and the test is split by platform. ResolvedPathBuf's schema description is selected by cfg(target_os = "windows"), so macOS keeps its text and schema.json is unchanged.
Verified: fast-check macOS (fake CC) cargo check --workspace --all-targets: PASS, 0 errors. macOS unit tests cannot run on Linux (not verified).
Only the ResolvedPathBuf schema description changes in form: it is now chosen by cfg(target_os = "windows") so the file can be shared; on KDE the text is the same as before, so schema.json is unchanged.
Verified: cargo test -p komorebi --lib pathext in komorebi-for-kde, 1 passed 0 failed.
Take the KDE copy (module docs, ~ handled on unix as well as windows, the platform split in the test) as the common base. The only Windows-visible difference would be the JSON schema description of ResolvedPathBuf, so it is selected by cfg(target_os = "windows") and keeps the Windows text byte for byte (schema.json is the step 3 oracle).
Windows behaviour is unchanged: the cfg(unix) branches do not compile in on this target.
Verified: Windows clippy --workspace --locked --all-targets -D warnings clean. Unit tests cannot run on Linux (not verified).
Add tests/golden/{windows,kde,macos}/{variants.json,schema-variants.txt} (taken from each daemon's own SocketMessage before it moves, oracle D14), the support table variants-table.tsv (197 variants x windows/kde/macos) and the schema-driven generator tests/common/golden_gen.rs.
tests/golden.rs checks, until SocketMessage moves (stage 2e): every golden wire text parses to its golden value; each platform's golden variant set equals its column of the support table; the generator runs on a stand-in enum. Stage 2e swaps in the real enum and compares wire text and schema branches (subset check).
Verified: native cargo test -p komorebi-protocol, 3 passed 0 failed; Windows clippy --workspace --locked --all-targets -D warnings clean.
Add crates/komorebi-protocol (edition 2024, member of the root workspace) with empty modules message, platforms, types, animation and pathext. The client transport stays out of the crate (D16). Cargo.lock gains the new package only.
Verified: native cargo build -p komorebi-protocol succeeds. Windows, KDE and macOS gates not run for this revision (no tree depends on the crate yet).
Empty merge revision joining the step 0 line (path dependencies on the root layouts, scrolling and themes crates) with the KDE A3 line (path-coupling fixes). No file changes of its own, so each parent's content is kept as written. Verified: all three trees type-check on the combined line.
Step 0. KDE depended on komorebi-layouts and komorebi-themes through git revisions (6d862a11 / e8216924) that exist in no komorebi history. It now uses the path crates in the repository root so one copy is built. Cargo.lock is updated. Verified: cargo check --workspace --locked in the KDE tree.
The e2e core was vendored twice (komorebi/e2e/lib and the KDE VM lib), synced by a script. The script now checks the KDE copy against ../e2e/lib in the root, treating the root as the single source, as the plan's A3 requires. Verified: running the script reports the copies in sync.
Step 0 for macOS: replaces the git revision dependencies on komorebi-layouts and komorebi-themes with path dependencies on the root crates, keeping the darwin and schemars features. Verified: macOS type-check with the fake C compiler (check only, nothing linked or run).
window.rs and static_config.rs locked the float, manage and other rule lists in conflicting orders, which deadlocked KDE tests and could in the daemon. Both now take the locks in one order. Found by test hangs during the merge work. The Windows and macOS trees have the same pattern by reading and were not changed. Verified: the KDE test suite no longer hangs; the VM tier was not re-run.
A path-input flake has no dirtyRev attribute, so evaluation failed. Falls back to "unknown" via self.dirtyRev or. An earlier same-derivation comparison was a false positive because both sides printed the same error; this fix came from retracting it. Verified: the KDE package evaluates and builds from the root flake.
The script assumed it ran from the repository root, which is now komorebi-for-mac/ inside a larger repo. It now finds the root from its own path. Verified by running it from two working directories.
Tests in komorebi/tests/schemas.rs shared one socket path and raced when run in parallel. Each test now gets its own. Verified: cargo test --workspace in the KDE tree.
Phase 1 of A3b. The root flake imports the nested flakes' lib.mkOutputs with the whole repository as source and re-exports packages, checks (without vm-*), nixosModules, overlays and darwinModules with kfde-/kfm- prefixes. Windows outputs are untouched. Verified: the KDE package builds; the macOS package evaluates (not built).
compare-gen.py defaulted to sibling checkouts of the old repos. It now defaults to the Windows tree and macOS tree that sit beside komorebi-for-kde/ in this repository. Verified: runs and finds both trees.
Excludes /komorebi-for-kde and /komorebi-for-mac from the Windows crane source filter so their edits do not invalidate Windows builds and their Cargo.lock files are not swept in. Verified: the Windows clippy check still passes.
vm-mac pointed the flake at a repo root that is no longer the KDE directory. It now uses a git+file URL with ?dir=komorebi-for-kde. Verified by evaluation only; the VM was not run for this change.
komorebi/src/pan.rs and komorebic/src/pan.rs include_str! the .txt files in komorebic/fixtures/, which the crane source filter dropped, so the nix build failed. Adds the fixtures to the filter. Verified: nix komorebi-workspace-clippy passes.
git rev-parse --show-toplevel now returns the monorepo root, so scripts/run-kde looked in the wrong place. It now derives the KDE directory from the script path. Verified: the script locates the tree from another working directory.