Commit Graph
37 Commits
Author SHA1 Message Date
LGUG2Z 415e73a9ac refactor(kde): use asc of komorebi-config
core::asc re-exports ApplicationSpecificConfiguration, AscApplicationRules and AscApplicationRulesOrSchema from komorebi-config; the local copy (60 lines) is removed. AscApplicationRules is now the union with the five Windows-only rule kinds: KDE only reads and writes its own, the others are None and skipped when written.

A derived schema of the union would carry the Windows-only kinds and the x-komorebi-platforms markers, so the places that print or answer the applications schema ask for the KDE view instead: komorebic (application-specific-configuration-schema; komorebic gains the komorebi-config dependency, a two-line change in the arm) and the daemon's socket answer (same view, array form as before). This is the minimum change to komorebic that keeps its output; step 4 owns the rest of the file.

Verified: KDE cargo check --workspace --all-targets: no warnings; cargo test -p komorebi --lib: 289 passed, 0 failed; --test schemas: 5 passed; komorebic regeneration: schema.asc.json byte-identical to the checked-in file (git: no diff against wip-main), schema.json only differs by the earlier description-only converge revisions.
2026-10-31 01:37:54 -07:00
LGUG2Z 89c729e731 refactor(config): move asc and the application configuration data into komorebi-config
ApplicationSpecificConfiguration, AscApplicationRulesOrSchema and AscApplicationRules are code-identical in the trees except that AscApplicationRules differs in its rule kinds: five Windows-only kinds, titleless and tabbed on KDE and macOS. The crate holds the union (declaration order floating-first as before; the platform-only fields carry x-komorebi-platforms, so a view prunes them) and, for the Windows From<Vec<ApplicationConfiguration>> conversion that the orphan rule keeps next to its types, ApplicationOptions and ApplicationConfiguration (data only: the YAML generator stays in the Windows daemon). The crate gains the color-eyre dependency.

The oracle test builds the view of ApplicationSpecificConfiguration for Windows, KDE and macOS and compares it with each tree's checked-in schema.asc.json byte for byte: all three are identical. This is the first proof that per-platform views of one union reproduce the checked-in files exactly (D17/D18); the three trees still use their own copies.

Verified: native cargo test -p komorebi-config: 4 unit + 6 schemas passed, 0 failed (tier 1).
2026-10-31 01:37:54 -07:00
LGUG2Z 4095f45fd3 refactor(kde): use AspectRatio and PerAnimationPrefixConfig of komorebi-config
window and animation re-export the three types from komorebi-config; the local definitions (82 lines) and their imports are removed, so no call site changes.

Verified: KDE cargo check --workspace --all-targets: no warnings; cargo test -p komorebi --lib: 289 passed, 0 failed; --test schemas: 5 passed; komorebic regeneration: schema.json and schema.asc.json byte-identical to the checked-in files.
2026-10-31 01:37:54 -07:00
LGUG2Z cc02f57a7c refactor(kde): converge the docs of AspectRatio to the Windows text
The two variant docs said 'A predefined aspect ratio' and 'A custom W:H aspect ratio' in KDE and macOS and 'Predefined aspect ratio' and 'Custom W:H aspect ratio' in Windows; the code of AspectRatio and PredefinedAspectRatio is identical in all three trees, so the docs are what stops one shared copy.

Schema: komorebi-for-kde/schema.json regenerated with the real komorebic: 2 description lines change, and the file equals the old one after deleting every description (jq walk), so description-only. schema.asc.json unchanged.

Verified: KDE komorebic build and regeneration (tier 1).
2026-10-31 01:37:54 -07:00
LGUG2Z 5dc1fe0b4c refactor(kde): use the behaviour enums of komorebi-config
core re-exports WindowContainerBehaviour, FloatingLayerBehaviour, Placement, CrossBoundaryBehaviour and WindowHidingPosition from komorebi-config; the local definitions and impls are removed, so no call site changes.

Verified: KDE cargo check --workspace --all-targets clean; cargo test -p komorebi --lib: 289 passed, 0 failed; --test schemas: 5 passed; komorebic static-config-schema and application-specific-configuration-schema regenerated: schema.json and schema.asc.json unchanged (byte-identical, no diff).
2026-10-31 01:37:54 -07:00
LGUG2Z 79c9af95d1 refactor(config): move the behaviour enums into komorebi-config
WindowContainerBehaviour, FloatingLayerBehaviour (with should_float), Placement (with should_center and should_resize), CrossBoundaryBehaviour, WindowHidingPosition (KDE and macOS), WindowHandlingBehaviour and ZOrder (with its From<ZOrder> for isize; Windows) in behaviour.rs. The text is the KDE copy for the five that all trees share (identical to the Windows and macOS copies after the previous converge revision) and the Windows copy for the two Windows-only enums. A platform-only enum is defined here without a cfg: the daemon that does not read the key says so at load time. The trees keep their copies until the next revisions. The crate gains the clap dependency (ValueEnum) and the three Cargo.lock files the package entry.

The oracle gains a check that the generated definition of each enum equals the $defs entry of every checked-in schema.json that has it (all three trees for four of them, KDE and macOS for WindowHidingPosition, Windows for the other two).

Verified: native cargo test -p komorebi-config: 4 unit + 4 schemas passed, 0 failed (tier 1).
2026-10-31 01:37:54 -07:00
LGUG2Z aa78347add refactor(kde): converge the docs of the core behaviour enums to the Windows spelling
WindowContainerBehaviour, FloatingLayerBehaviour, Placement, CrossBoundaryBehaviour and WindowPlacement said 'behavior' in KDE and 'behaviour' in Windows and macOS (the doc text is otherwise identical), so one copy in komorebi-config can be moved only after they agree. Same choice as the step 2 payload enums.

Schema: komorebi-for-kde/schema.json regenerated with the real komorebic (5 description lines, 10 changed lines); equal to the old file after deleting every description (jq walk), so description-only. schema.asc.json is unchanged. Windows and macOS schemas are untouched (they already said 'behaviour').

Verified: KDE cargo build -p komorebic and regeneration (tier 1). Not done: komorebi-for-kde/nix/komorebi-options.nix still carries the old text and an old schema-sha256 header (already out of date since step 2); no schemars-nixgen here, refreshed by substitution at the end of the step.
2026-10-31 01:37:54 -07:00
LGUG2Z 6c44f62787 refactor(kde): use the matching types of komorebi-config
komorebi depends on komorebi-config (workspace dependency with the schemars feature, like komorebi-protocol) and core::config_generation re-exports the five matching types from it, so no call site changes. 159 lines are removed: the five types and, with them, the four unit tests that now run in the crate.

Verified: KDE cargo check --workspace --all-targets: clean; cargo test -p komorebi --lib: 289 passed, 0 failed (was 293 before: the 4 tests moved to komorebi-config); --test rules, transparency, rule_commands: 6, 1, 6 passed. Full workspace test run follows at the end of the stage.
2026-10-31 01:37:53 -07:00
LGUG2Z 374ad1bad5 chore(repo): combine step 2 with the integration line
Merge revision: wip-main (history merges, fixes, step 0 path dependencies, step 1 komorebi-collections, KDE A3 fixes, flake phase 2) and wip-step2 (the komorebi-protocol crate, goldens and the unified SocketMessage used by all three trees). Conflicts in the root Cargo.toml members line, the trees' Cargo.toml dependency tables and the Cargo.lock files are resolved in this revision by keeping both sides' additions.
2026-10-31 01:37:53 -07:00
LGUG2Z 68601ced53 build(nix): give the KDE and macOS builds the shared crates directory
The nested flakes cut the repository down to their own tree and the root crates they depend on by path (rootCrates). Step 1 added crates/komorebi-collections, which both trees now depend on, so crates/ must be in that list or the root flake cannot build kfde (and kfm cannot evaluate its sources). Listing the directory rather than each crate means later shared crates (protocol, config, ...) are picked up without another flake change. Verified: see the following progress entry.
2026-10-31 01:37:53 -07:00
LGUG2Z 7483d5837e test(kde): a message of another platform is answered as not supported
Two tests against the fake desktop: ForceFocus, StackbarMode and ToggleTitleBars (Windows only) are answered with 'X is not supported on this platform', and a message KDE handles (Retile) is not.

Verified: cargo test -p komorebi --test unsupported_messages in komorebi-for-kde: 2 passed, 0 failed.
2026-10-31 01:37:53 -07:00
LGUG2Z 8c22a18dce chore(repo): combine the flake phase 2 work with the integration line
Merge revision: wip-main (history merges, fixes, step 0 path dependencies, step 1 komorebi-collections, KDE A3 fixes) and wip-flake (the root flake builds the KDE package with the whole repository as source, the macOS package evaluates the same way, the root flake no longer requires dirtyRev). The root flake.lock pins the content of the nested flakes, so it is relocked in the next revision.
2026-10-31 01:37:53 -07:00
LGUG2Z 2adcced406 refactor(protocol): use SocketMessage from komorebi-protocol in the KDE daemon
Delete KDE's SocketMessage, as_bytes and FromStr and its now unused imports, and re-export the crate's SocketMessage from core. process_command stays an exhaustive match: the 34 variants KDE does not handle (33 Windows only, plus PanGesture which only Windows and macOS have) get one explicit or-pattern arm that writes the 'not supported on this platform' reply and returns before anything else happens (no notification to subscribers). Behaviour change: those variants used to fail to parse on KDE and now parse and are answered that way. The doctest of SocketMessage lives in the crate now.

Verified: cargo check --workspace --all-targets in komorebi-for-kde: 0 errors, no warnings; cargo test -p komorebi --lib --test schemas --test rule_commands: 302 + 5 + 6 passed, 0 failed; komorebic static-config-schema byte-identical to schema.json. Full workspace run at the end of the stage.
2026-10-31 01:37:53 -07:00
LGUG2Z 412f380ce7 chore(repo): combine the step 1 crate with the KDE A3 fixes
Merge revision on the integration line: wip-step1 (the komorebi-collections crate and its wiring in all three trees, on top of the step 0 path dependencies) and wip-a3-kde (the KDE path-coupling, test-isolation, dirtyRev and lock-order fixes). No file needed manual resolution. Verification of this merge: not run separately; each side passed its own gates (step 1: Windows clippy, KDE 885 tests, macOS type-check; KDE A3: 895 tests three times).
2026-10-31 01:37:53 -07:00
LGUG2Z 9b8be3ea70 refactor(kde): take ring and lockable_sequence from the komorebi-collections crate
Deletes the KDE copies, adds the komorebi-collections path dependency via the workspace table, re-exports ring and lockable_sequence from lib.rs, #[macro_use] extern crate for impl_ring_elements!, and forwards the schemars feature. Cargo.lock updated.

Verified: fast-check KDE cargo check, --lib tests and schemas test: PASS.
2026-10-31 01:37:53 -07:00
LGUG2Z 3a8176875e fix(kde): sync-e2e-core checks against the root e2e/lib, which is the source of truth
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.
2026-10-31 01:37:53 -07:00
LGUG2Z ef1d3ef096 fix(kde): take the rule locks in one order, so a rule check and a config load cannot deadlock
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.
2026-10-31 01:37:53 -07:00
LGUG2Z b38a26f289 fix(kde): build without self.dirtyRev when the flake is a nested path input
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.
2026-10-31 01:37:53 -07:00
LGUG2Z 8c6714ccaf build(nix): let the KDE flake take the repository as its source
The KDE flake's outputs become a function (lib.mkOutputs) of inputs, self, the repository source and the tree's directory in it. The flake's own outputs still call it with ./. and no directory, so everything evaluates standalone, but the Rust workspace can no longer be built from the nested flake alone: since step 0 it depends on ../komorebi-layouts, -scrolling and -themes, which a nested path input cannot see.

The crane source is now the repository cut down to the KDE tree, those three root crates and the root Cargo.toml (their inherited workspace dependencies come from it). cargoLock and cargoToml point into the tree and postUnpack enters it.

Verified: nix eval of packages.x86_64-linux.komorebic.drvPath on the nested flake prints a .drv; the real build is verified through the root flake (see the revision that wires it). Reindentation by nixfmt makes the diff large; the logic change is the mkOutputs wrapper, the src filter and three commonArgs attributes.
2026-10-31 01:37:53 -07:00
LGUG2Z c3dc3a8e49 fix(kde): give each schemas test its own socket
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.
2026-10-31 01:37:53 -07:00
LGUG2Z 52b8d2df63 chore(repo): combine the step 0 and KDE A3 work
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.
2026-10-31 01:37:53 -07:00
LGUG2Z eaf7228a75 fix(kde): default compare-gen to the komorebi and komorebi-for-mac trees around it
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.
2026-10-31 01:37:53 -07:00
LGUG2Z 79ffe8b7a1 refactor(kde): depend on the layouts, scrolling and themes crates of this repository by path
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.
2026-10-31 01:37:53 -07:00
LGUG2Z 573f48ad78 refactor(kde): carry DebugWindow as i64
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).
2026-10-31 01:37:53 -07:00
LGUG2Z 29457262bb fix(kde): make vm-mac use git+file from a subdirectory of a bigger repository
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.
2026-10-31 01:37:53 -07:00
LGUG2Z 6f6292805d fix(kde): find the KDE tree from run-kde's own location, not git toplevel
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.
2026-10-31 01:37:53 -07:00
LGUG2Z b769f166d3 refactor(protocol): use FocusFollowsMouseImplementation from komorebi-protocol in KDE
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).
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 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 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 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 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 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 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 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 8b463317b3 chore(repo): move into komorebi-for-kde/ 2026-10-30 19:28:06 -07:00