Commit Graph
3112 Commits
Author SHA1 Message Date
LGUG2Z fc02fb9c96 fix(mac): resolve check_schema_docs.py root from the script location
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.
2026-10-31 01:37:53 -07:00
LGUG2Z 9d8d36ac8b refactor(protocol): move the Windows-only payload enums and FocusFollowsMouseImplementation into komorebi-protocol (Windows)
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.
2026-10-31 01:37:53 -07:00
LGUG2Z a7dd44c75b chore(repo): merge komorebi-for-kde history
Merges the KDE old repo's history, with its original commit hashes, under komorebi-for-kde/. The subtree is byte-identical to the old tip 7d19fd40 (654/654 renames in the move commit). Verified: tree equality, git blame, git log --follow, cargo metadata, and that no KDE workflow sits outside komorebi-for-kde/.
2026-10-31 01:37:53 -07:00
LGUG2Z c155917d71 build(nix): re-export the KDE and macOS flakes from the root flake
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).
2026-10-31 01:37:53 -07:00
LGUG2Z c41ffc6362 refactor(kde): converge FocusFollowsMouseImplementation to the shared text
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.
2026-10-31 01:37:53 -07:00
LGUG2Z 2e78aa69df build(nix): keep the other platforms' trees out of the Windows build source
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.
2026-10-31 01:37:53 -07:00
LGUG2Z 5d4d2768cc refactor(windows): converge FocusFollowsMouseImplementation to the shared text
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.
2026-10-31 01:37:53 -07:00
LGUG2Z 4712ea3e96 fix(nix): include the pan transcript fixtures in the build source
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.
2026-10-31 01:37:53 -07:00
LGUG2Z 9483f849f8 test(protocol): restore the SubscribeOptions doctest in the protocol crate
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.
2026-10-31 01:37:53 -07:00
LGUG2Z 1f1805f66e fix(e2e): drop the unsafe block nested inside the testwin unsafe block
e2e/guest/testwin/src/main.rs had an unsafe block inside an unsafe block, which clippy -D warnings rejects (unused_unsafe). Removes the inner one without changing behaviour. Verified: Windows clippy passes.
2026-10-31 01:37:53 -07:00
LGUG2Z 6ae2db8389 refactor(protocol): use the seven common payload enums from komorebi-protocol in macOS
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).
2026-10-31 01:37:53 -07:00
LGUG2Z 3e1810e3e9 refactor(protocol): use the seven common payload enums from komorebi-protocol in KDE
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).
2026-10-31 01:37:53 -07:00
LGUG2Z 6149f20193 refactor(protocol): move the seven common payload enums into komorebi-protocol (Windows)
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.
2026-10-31 01:37:53 -07:00
LGUG2Z 3efd1420de refactor(mac): converge the payload enums of core/mod.rs to the shared text
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).
2026-10-31 01:37:53 -07:00
LGUG2Z c586257e57 refactor(kde): converge the payload enums of core/mod.rs to the shared text
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).
2026-10-31 01:37:53 -07:00
LGUG2Z f4a58eb5c7 refactor(windows): converge the payload enums of core/mod.rs to the shared text
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.
2026-10-31 01:37:53 -07:00
LGUG2Z 0137acf26d refactor(protocol): use AnimationStyle and AnimationPrefix from komorebi-protocol in macOS
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).
2026-10-31 01:37:53 -07:00
LGUG2Z 9ab9a723d4 refactor(protocol): use AnimationStyle and AnimationPrefix from komorebi-protocol in KDE
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).
2026-10-31 01:37:53 -07:00
LGUG2Z 574dded05e refactor(protocol): move AnimationStyle and AnimationPrefix into komorebi-protocol (Windows)
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.
2026-10-31 01:37:53 -07:00
LGUG2Z 975f007af2 refactor(mac): converge animation/prefix.rs to the shared AnimationPrefix
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).
2026-10-31 01:37:53 -07:00
LGUG2Z ad2281de19 refactor(kde): converge animation/prefix.rs to the shared AnimationPrefix
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.
2026-10-31 01:37:53 -07:00
LGUG2Z 14a011c537 refactor(kde): converge core/animation.rs to the shared version
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).
2026-10-31 01:37:53 -07:00
LGUG2Z eb903bccc5 refactor(mac): converge core/animation.rs and animation/prefix.rs to the shared version
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).
2026-10-31 01:37:53 -07:00
LGUG2Z 51d7454b10 refactor(windows): converge core/animation.rs and animation/prefix.rs to the shared version
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).
2026-10-31 01:37:53 -07:00
LGUG2Z 163eff4216 refactor(kde): make qt_curve an extension trait
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).
2026-10-31 01:37:53 -07:00
LGUG2Z a617723fea refactor(protocol): use pathext from komorebi-protocol in macOS
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).
2026-10-31 01:37:53 -07:00
LGUG2Z b5f9016a12 refactor(protocol): use pathext from komorebi-protocol in KDE
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.
2026-10-31 01:37:53 -07:00
LGUG2Z c8f79d99d5 refactor(protocol): move core/pathext.rs into komorebi-protocol (Windows)
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).
2026-10-31 01:37:53 -07:00
LGUG2Z d4fc5ba635 refactor(mac): converge core/pathext.rs to the shared version
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).
2026-10-31 01:37:53 -07:00
LGUG2Z 645d843dc7 refactor(kde): converge core/pathext.rs to the shared version
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.
2026-10-31 01:37:53 -07:00
LGUG2Z f7028485d1 refactor(windows): converge core/pathext.rs to the shared version
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).
2026-10-31 01:37:53 -07:00
LGUG2Z 8179aef3e2 test(protocol): check in the per-platform wire goldens and the generator
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.
2026-10-31 01:37:53 -07:00
LGUG2Z 280bbc668b build(protocol): add the komorebi-protocol crate skeleton
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).
2026-10-31 01:37:53 -07:00
LGUG2Z 524074edfd chore(repo): move into komorebi-for-mac/ 2026-10-30 19:28:07 -07:00
LGUG2Z 8b463317b3 chore(repo): move into komorebi-for-kde/ 2026-10-30 19:28:06 -07:00
LGUG2Z ff3711dcb5 docs(e2e): document the Windows guest and what it found
README.md: building the image, running scenarios, the variables, the known
failures. W1.md: the measurements and findings behind them.
2026-10-30 18:59:32 -07:00
LGUG2Z 0aec364345 feat(e2e): no known failure of maximizing.user once kfw has the fix 2026-10-30 18:59:32 -07:00
LGUG2Z 7f6e530b35 feat(e2e): sync the neutral core from kfde 7d19fd40 2026-10-30 18:54:37 -07:00
LGUG2Z 7d19fd4045 test(nix): maximizing.user has toggle-monocle as both ports do
toggle-monocle leaves IGNORED: it turns the monocle of the tiles that
are left on and off while the window stays maximized, as probed on
komorebi for Windows.
2026-10-30 18:54:19 -07:00
LGUG2Z 3e7451f132 feat(process_command): toggle-monocle acts while a window is maximized
komorebi for Windows does not ignore it while a window is maximized: the
monocle of the tiles that are left comes on and goes off, and the window
stays maximized. Match it, and drop toggle-monocle from the commands
that are about the tiles.
2026-10-30 18:54:19 -07:00
LGUG2Z 503ccbc9c6 feat(e2e): add a probe of toggle-monocle under a user's maximize 2026-10-30 18:49:48 -07:00
LGUG2Z 8cf77519a2 fix(e2e): name toggle-monocle as what maximizing.user still fails 2026-10-30 18:45:15 -07:00
LGUG2Z a2ab755352 feat(e2e): sync the neutral core from kfde b3dc2ed9 2026-10-30 18:25:26 -07:00
LGUG2Z e5c1e2fa75 feat(e2e): run the cargo tests of the workspace in the Windows guest
The tests are cross-compiled for Windows, so they run there: cargo_tests.py
uploads each test executable, lists its tests and runs every one in a
process of its own, as nextest does. The nix check never ran them
(doCheck is false).
2026-10-30 18:22:45 -07:00
LGUG2Z 725c95ffc2 feat(nix): OpenSSL for the host build script in the devshell
komorebic's build script (reqwest) runs on the build host and needs
pkg-config and OpenSSL, as in the nix build, so cargo test --workspace works
from nix develop.
2026-10-30 18:22:45 -07:00
LGUG2Z 345ddf30ea feat(e2e): the known difference of maximizing.user after kfw tracks a user's maximize
On a komorebi with 3fa3d429 the step passes its tracking checks; what is
left is that toggle-float and stack left/right are not ignored while a
window is maximized. The marker says so for such a build.
2026-10-30 18:22:45 -07:00
LGUG2Z b1d053b358 perf(nix): build the test window with the constant stamp too
komorebi-testwin-e2e is the e2e build's test window, so a change to it
rebuilds the crate and not its dependencies (86 s instead of minutes);
build-ref.sh uses it.
2026-10-30 18:22:45 -07:00
LGUG2Z 0c21138e25 fix(e2e): make the test window gray, not blue
The pixel checks of the shared scenarios (the ring of a border by hue) take
the window's own color to be neutral. The default was (48, 80, 128), which
is cool by their measure, so a warm ring beside it read as mixed.
2026-10-30 18:22:45 -07:00
LGUG2Z 7e5f956415 feat(e2e): sync the neutral core from kfde 72631512 2026-10-30 18:22:45 -07:00
LGUG2Z f6d877b82d feat(e2e): sync the neutral core from kfde 1383d58a 2026-10-30 18:22:45 -07:00