Commit Graph
142 Commits
Author SHA1 Message Date
LGUG2Z fa4752a514 fix(repo): sources and tests read files from the final directories
The include_str! and test paths of komorebic (Linux and macOS modules and tests),
komorebi-bar (macOS), komorebi-linux, komorebi-macos, komorebic-core, komorebi-config and
komorebi-bar-core named the old trees (komorebi-for-kde/docs, komorebi-for-mac/docs, the
schema.json files at the roots of the trees, komorebic/fixtures of the macOS tree). They
now read docs/linux, docs/macos, schemas/{windows,linux,macos} and the byte-identical
komorebic/fixtures at the root; the macOS pan tests point at the root fixtures, and
komorebi-linux's config_parity test takes the example config from docs/linux. Comments
that named the old paths were updated with them.

Not touched: markdown docs, justfiles, scripts, tools and nix files that name the old
paths (next revisions of the stack).

Verified: Windows clippy --locked --all-targets -D warnings (default members) passes; on
Linux cargo test -p komorebi -p komorebic -p komorebi-client -p komorebi-linux -p
komorebi-hotkeys -p komorebi-config -p komorebi-bar-core -p komorebic-core -p
komorebi-protocol (one test thread) passes, 96 test binaries ok after config_parity was
fixed; macOS cargo check --target aarch64-apple-darwin (fake CC) passes. Nix 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 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 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 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 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 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 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 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 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 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 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 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
LGUG2Z a1e59871c1 test(config): rule matching tests for the Windows input shape
Adds four tests to crates/komorebi-config/tests/rule_matching.rs next to
the KDE/macOS ones moved there: a Windows exe rule names the program with
its extension (mirrors rules_exe, where platform.exe_id adds `.exe` on
Windows) and the id without it does not match; a regex id is looked up as
written on Windows and with `.exe` removed elsewhere; the whole grid of
kinds x strategies x ids agrees between RuleQuirks::WINDOWS and UNIX for a
window with one class (mirrors rules_class); a negated class rule for a
window of another class and for one with no class. Each names the e2e
check it mirrors. docs/dev/e2e-to-unit.md points at the shared file.

Verified: cargo test -p komorebi-config --test rule_matching (16 passed);
bare cargo clippy --locked --all-targets -D warnings clean.
2026-11-05 15:03:26 -08:00
LGUG2Z fa2d630701 test(e2e): the bar scenario says when the guest cannot draw, and the bar config is tested
The Windows gate showed that the bar cannot open a window in the golden
guest (no OpenGL 2.0: "egui_glow requires opengl 2.0+"). The scenario now
reads the bar's own output (`classify`): that exact failure turns the
window, stays-alive and daemon-restart checks into visible
`skipped: guest has no OpenGL 2.0` lines (counted in `result.json` and
printed as `skipped: N` by the runner); the schema equality, "the bar reads
its configuration" (real: the configuration is parsed before the window),
`komorebic state` and `stop --bar` stay checks; any other early exit of
the bar (a configuration error, a panic) is a failure with the bar's
output in the message, and a bar that opens its window gets the full walk as
before. Unit tests for `classify` run with the runner tests.

komorebi-bar-core gets tests/config.rs: windows-only widgets and the `mouse`
block are accepted on every platform, `supported()/unsupported()/enabled()`
name and skip what the platform cannot run (D-coord-1), a Command mouse
message is a plain string and the tagged form is rejected (the e2e finding),
the network widget accepts `default_interface_options` and the old key
names, layouts read from their names, `KomobarConfig::read` fills the frame
and refuses a non-json file. The warning text itself is not asserted (no
tracing subscriber in the core).

docs/dev/bar-e2e.md records the limitation and an analysis of getting
rendering into the guest (wgpu with the WARP adapter recommended; a mingw
Mesa is not offered by nixpkgs); nothing was added.

Verified: runner and library tests (161 passed), ruff clean on the scenario
(three older findings in other files are not mine), bar-core native tests 3
unit + 7 oracle + 6 config. Windows clippy and the macOS check: see the
report. The scenario itself was not run.
2026-11-05 15:03:26 -08:00
LGUG2Z 97c21b9360 merge: wip-cand6
Merge of wip-cand5, wip-u-bugfix, wip-u-wm, wip-u-settings3, wip-u-repotools,
wip-u-nix3 and wip-u-e2e2unit.

Resolutions:
- docs/dev/macos-handcheck.md: every section is kept, in order. The bugfix
  agent's section F (bar clicks) and the settings agent's section (also
  headed F) both appended after E; the settings one is renamed G, text
  unchanged.
- komorebi-for-mac/komorebi/src/animation/mod.rs and static_config.rs: the
  formatting-only revision of wip-u-nix3 (76ab52da, import order) conflicts
  with the semantic edits of wip-u-settings3 (S4/S5). The files are taken
  from wip-u-settings3 as they are; the following style(macos) revision
  formats them again with the check's rustfmt invocation.

Verified: see the following revisions and the report.
2026-11-05 15:03:26 -08:00
LGUG2Z 4c15358f7b refactor(core,kde,windows,mac): FocusWorkspaceNumber and FocusWorkspaceNumbers are komorebi-core commands
komorebi_core::command gets focus_workspace_number (show a workspace unless
it is in front) and focus_workspace_numbers (show it on every other monitor,
then on the focused one), both with the pointer preamble when the host's
POINTER_PICKS_THE_MONITOR_FOR_ALL says so, over a new CommandHost method
show_workspace_on (focus the workspace of a monitor and load it, which the
daemons already did inline). The three daemons' arms call them (Windows keeps
its focus_workspace_numbers method as a wrapper) and implement
show_workspace_on. The const is unchanged: true for Windows, false for KDE and
macOS, so nothing changes yet; the next revisions flip it. Tests: the
Windows-switch test becomes a test of all five commands with the switch off and
on, and focus_workspace_number(s) are tested on the stub host (commands.py:
focus-workspace, focus-workspaces).

Verified: cargo test -p komorebi-core --features schemars --test commands: 18
passed; KDE cargo test -p komorebi-linux (lite env): 666 passed, 0 failed; fake-CC cargo
clippy -D warnings on the macOS packages: PASS; Windows cargo clippy -p
komorebi-windows --locked --all-targets -D warnings: PASS. Not run: Windows
tests, VM and Mac.
2026-11-05 15:03:26 -08:00
LGUG2Z 401ce9112a refactor(core): Workspace::hide_spot and hide_spot_on_display as methods
Convenience for the callers that have a workspace and no platform type to name
(the window manager functions, which are the same text on KDE and macOS): the
same as P::hide_spot(self) and P::hide_spot_on_display(self). Nothing calls them
yet in the KDE and Windows daemons; no behaviour change.

Verified: native cargo test -p komorebi-core passes; fast-check all trees PASS.
2026-11-05 15:03:26 -08:00
LGUG2Z acbe816fb4 test(core): follow the rename of the floating-window hook to before_floating_removed
wip-u-coretests (written against the hook's old name after_floating_removed) and wip-u-core4 (which renamed it to before_floating_removed because it runs before the window leaves the ring) were merged in candidate 5; the stub platform and the expected hook logs now use the new name. No behaviour change: the order test already pinned 'before the removal'. Verified: cargo test -p komorebi-core (with and without the schemars feature).
2026-11-05 15:03:26 -08:00
LGUG2Z ac168c9657 refactor(kde): match window rules with the shared komorebi-config::rules
KDE's should_act and should_act_individual become thin wrappers over
komorebi_config::rules (RuleQuirks::UNIX: a `.exe` in a rule id is
ignored, as before); their signatures and the should_act_window wrappers
are unchanged, so no call site moves. The 12 pure matching tests of
komorebi-for-kde/komorebi/tests/rule_matching.rs move to
crates/komorebi-config/tests/rule_matching.rs with their assertions
untouched (they call same-signature local wrappers over the shared
function); the manage-rule rescue test, which needs the fake backend, stays
in the KDE file.

No behaviour change: the function bodies were identical (docs/dev/
rule-matching.md). Verified: cargo test -p komorebi-config --test
rule_matching (12 passed); KDE cargo test -p komorebi-linux --lib (292
passed) and --test rule_matching (1 passed), command_sweep, rules; cargo
check --all-targets clean. KDE clippy -D warnings fails on 4 pre-existing
lints in process_command.rs and kwin/mod.rs (not touched here). Not run:
VM suites.
2026-11-05 15:03:26 -08:00
LGUG2Z ba094355d4 chore(repo): combine the review fixes, new tests and docs (candidate 5)
Candidate 5: wip-cand4 plus kfw's review fixes (wip-u-fix5: revert of the subscriber write timeout and the hwnd writer thread, BAR_RUNNING tied to the message, dead-window HIDDEN_HWNDS cleanup, core in default-members), kfm's macOS registry fixes (wip-u-kfm3), kfde's hook rename and per-pass title-bar snapshot (wip-u-core4), the komorebi-core characterization tests (wip-u-coretests) and the docs (wip-u-docs). Conflicts, if any, are resolved here.
2026-11-05 15:03:26 -08:00
LGUG2Z 231e50b3fc test(core): tiling arithmetic of update_shared as native checks of the e2e layouts
The Windows e2e scenarios layouts (111 checks), flipping, layout_flip, padding,
closing, minimizing, floating, stacks, tiling and tiling_off assert where the
tiles of a workspace are. Since the consolidation every daemon gets those tiles
from komorebi-core's Workspace::update_shared, so they can be checked on the
stub platform on Linux (and on the Mac Mini for macOS) instead of in a guest.

crates/komorebi-core/tests/e2e_layouts.rs (6 tests) runs update_shared on a
StubPlatform workspace for the 8 layouts of the scenario, 1 to 8 containers and
three padding settings: one tile per container, inside the work area, not on
each other; workspace padding moves tiles 40 px in, container padding shrinks
every tile, and back as it was; each of the three flips equals the plain tiles
mirrored (as a set); removing a container (what a closed, minimized or floated
window does) leaves the others at least as much room; two containers, one a
stack of two, are two tiles; with tiling off nothing is placed in any layout.
Each test names the e2e checks it mirrors. They protect Windows, KDE and macOS
alike. Platform dependent: the stub adds no border and no frame adjustment, so
the Windows border of 7 px (windows_padding) and each daemon's own
adjust_layout stay e2e only, as does the OS frame matching the tile.

Verified: cargo test -p komorebi-core --test e2e_layouts, 6 passed (native
Linux; macOS crates run later on the Mini). No source change, no bug found.
2026-11-05 15:03:26 -08:00
LGUG2Z b3bcf4a2c3 refactor(config): add the shared window-rule matching
komorebi_config::rules holds should_act and should_act_individual, the
evaluation of MatchingRule/MatchingStrategy against a window
(RuleSubject: title, exe_name, classes, path). The body is the KDE/macOS
copy moved verbatim; the single difference of the Windows copy (a rule id
is compared as written, no `.exe` stripping) is RuleQuirks::WINDOWS vs
RuleQuirks::UNIX, and Windows' single class is a one-element slice. The
regex cache is passed in (the daemons keep REGEX_IDENTIFIERS and its lock
order). regex 1 becomes a dependency of komorebi-config (already in the
lock; one Cargo.lock line).

Nothing calls it yet, so no daemon behaviour changes. Verified: cargo
clippy -p komorebi-config --all-targets -D warnings, fmt check.
2026-11-05 15:03:26 -08:00
LGUG2Z 0bf26a6d14 feat(core): lock and unlock a container by index, with native tests
komorebi_core::set_container_locked is the body of the
LockMonitorWorkspaceContainer and UnlockMonitorWorkspaceContainer arms
(the two differ by the flag; the text is the same on all three daemons),
over a third small host trait ContainerCommandHost: CommandHost that has
monitors_mut. Tests: lock then unlock, a container index that is not there
is ignored and a missing monitor or workspace is an error.

Verified: cargo test -p komorebi-core --features schemars --test commands
(native): 16 passed, 0 failed. Not run: the daemons.
2026-11-05 15:03:26 -08:00
LGUG2Z fa3ec1ba2e test(core): add the review's gaps: floating hook order, placement rules, hook defaults, key sets
Follow-up to the review of komorebi-core (S/review/core.md, F2 and F4 and its
untested-behaviours list); most of the list was already pinned, this adds the rest:
- the after_floating_removed hook is pinned to run BEFORE the window is taken out
  (it sees both windows and the old focus index), today's KDE/macOS order, although
  the trait doc says after; the stub now logs len and focus for the hook.
- resolve_placement_index with Rules maps (Single and Many matching, Secondary,
  no match falls back after the focused container); the stub gained a match id and a
  path (a window without a path never matches Rules: it falls back).
- the JSON key set of a default workspace, and of Windows and macOS monitors per extra.
- the documented defaults of every optional hook on a platform that overrides nothing
  (the KDE-shaped test platform), and that the default place hooks make update_shared fail.
- Monitor remove_workspace_by_idx at the length, and an old monitor file with a
  non-empty ring of workspaces missing optional keys.

Verified: cargo test -p komorebi-core 215 passed, 1 ignored (the known bug), and with
--features schemars 217 passed, 1 ignored; clippy --all-targets has no warning in the
crate. No non-test source changed.
2026-11-05 15:03:26 -08:00
LGUG2Z d7673d436f fix(bar): the update widget asks the platform for its release URLs
The update widget's refresh thread polled the Windows repository's GitHub
API on every platform (a hard-coded second URL, while the first fetch went
through BarPlatform::latest_release_api_url), and the page the click opens
was built for the Windows repository, so on macOS the widget compared the
mac version against Windows releases after the first refresh and linked to
the wrong project.

The refresh now uses latest_release_api_url, and a new
BarPlatform::release_page_url(version) builds the click target: Windows
keeps https://github.com/LGUG2Z/komorebi/releases/v{version} exactly,
macOS gets https://github.com/LGUG2Z/komorebi-for-mac/releases/tag/v{version}.

BEHAVIOUR (macOS): the update widget compares against and links to the
komorebi-for-mac releases. Windows output is unchanged (same URLs). Gate:
macOS hand-check (see docs/dev/macos-handcheck.md); Windows needs no e2e.
Verified: see the following revisions' fast-check results; not run on a Mac.
2026-11-05 15:03:26 -08:00
LGUG2Z e3c1702aa6 style(manifests): format six Cargo.toml files with taplo
Pure formatting, no other change: taplo fmt (default configuration, taplo
0.10.0) over the manifests that the kfm toml-fmt check reported as not
properly formatted: crates/komorebi-bar-core, crates/komorebi-protocol,
komorebi-client, komorebi-daemon, komorebi-for-mac/komorebi and
komorebi-for-mac/komorebic. The other 19 files that check lists were
already clean.

Effect on other platforms: the first four are Windows manifests and
komorebi-protocol is also in the KDE closure. crane's dependency derivation
contains the manifests, so the Windows and KDE dependency derivations and
checks change once with this revision (one cold rebuild of the
dependencies, then stable again).

Verified: taplo fmt --check over the 25 files of the check passes after it
(it failed on exactly these six before).
2026-11-05 15:03:26 -08:00
LGUG2Z ddc4b95b8d test(komorebic-core): the commands of the e2e sweep are commands of the command lines
The commands e2e scenario learns that a command does not exist in a platform only
by running it in a guest (error: unrecognized subcommand, skipped with its name),
about 7.6 minutes per Windows run.

crates/komorebic-core/tests/e2e_sweep.rs reads SWEEP and PRINTED out of
e2e/lib/komorebi_vm/core/scenarios/commands.py (skipped when the e2e library is not
in the source tree) and parses each line with the platform's clap command: every
one is a command of the Windows komorebic, and the macOS one lacks exactly the
eight the scenario would skip there (focus-follows-mouse enable/disable, the
Windows implementation of toggle-focus-follows-mouse, toggle-maximize, the
transparency commands). 3 tests. mirrors: commands / <command> (the command is
understood, for the command line only).

Stays e2e only: that the daemon then answers; the KDE komorebic's own command set.

Verified: cargo test -p komorebic-core --test e2e_sweep, 3 passed (native Linux;
platform independent). No source change.
2026-11-05 15:03:26 -08:00
LGUG2Z 1a20d58eec test(backend): registering drops nothing; a replaced handle is dropped by the caller
Pins the cost rule the macOS fix depends on: Registry::insert of a new id runs no
handle's drop, a replaced handle is handed back and dropped only when the
caller drops it, get drops nothing, and remove hands the handle back. A probe
handle counts its drops.

Verified: native cargo test -p komorebi-backend: 40 unit, 7 doc, 1 compile_fail
passed, 0 failed.
2026-11-05 15:03:26 -08:00
LGUG2Z 38f1295251 test(core): pin the state JSON of the three daemons from real fixtures
tests/state_roundtrip.rs (15 tests) reads the monitors of the e2e fixtures
(Windows kfw-tiled, kfw-stack, kfw-float; KDE kfde-tiled, kfde-stack) into the
shared Monitor<P> with a platform shaped like each daemon (Windows: isize id,
optional serial number, the name/device_id/workspace_names extra; KDE: u32 id,
string serial number, no extra; macOS: window_hiding_position extra), writes
them again and compares the parsed JSON: every fixture is written as it was
read. Also pins that the corner is the last macOS monitor key and cannot be
omitted, that the workspace keys are the same whatever the platform, the exact
set of KDE monitor keys, and which keys an old state file may omit (23 optional
keys at monitor, workspace and container level, e.g. container locked and
workspace layout_options_rules) and which it may not (18 required keys,
including layer, work_area_offset_rules and apply_window_based_work_area_offset:
a file from before those existed does not load; pinned, not judged).

The fixtures are copied into tests/common/fixtures.rs as Rust text because the
nix source filters keep .rs files and drop .json; a test compares the copies with
e2e/lib/tests/fixtures when the checkout has them. The macOS fixture is NOT real
macOS output: it is kfde-tiled reshaped with jq to the macOS window and monitor
shape of the state_pin tests (no Mac here), and says so in its comment; replace
it with 'komorebic state' from a Mac when one is at hand.

Verified: cargo test -p komorebi-core (27 unit + 179 integration passed, 1
ignored) with and without --features schemars; cargo clippy -p komorebi-core
--all-targets has no warning in the crate. Windows clippy and macOS check not run:
the tests are portable crate tests and no platform source changed.
2026-11-05 15:03:26 -08:00
LGUG2Z 66fb7ef585 feat(core): update_shared has a begin_pass hook whose answer the hooks of the pass see
WorkspacePlatform::begin_pass(workspace) is called once per placement
pass, after the layout is computed and before the containers are placed,
and what it returns is handed to adjust_layout and place_container as
Placement::pass (Placement now carries that borrow). A platform that has
something to read once for the whole pass takes it here, so that two
containers of a pass cannot see two different values. The default returns
None. A test with the stub platform pins the order (once per pass, before
the placements) and that the hooks see the answer.

For reviewer finding F3 (S/review/core.md): the Windows title-bar tables
were read once per pass and the shared update read them once per
container; the Windows revision that follows uses this hook.

Verified: cargo test -p komorebi-core --features schemars (native): 30
passed, 0 failed. Not run: the daemons (the next revision builds them).
2026-11-05 15:03:26 -08:00
LGUG2Z f74e201f64 test(core): pin Monitor workspace management
tests/monitor_workspaces.rs (22 tests) over the recording stub platform:
ensure_workspace_count (grows with default workspaces, never shrinks, leaves
the focus), focus_workspace (last_focused_workspace bookkeeping including
focusing the focused one, creating every workspace up to a focused index past
the end, the empty monitor), the known workspace name (without a known name
names stay; with one only the focused workspace takes it, and an EXISTING
workspace's name is overwritten at every focus although the comment says
only at creation: pinned as it is, inherited from the Windows tree),
remove_workspace_by_idx (index not moved, past-the-end focuses idx-1 creating
workspaces, empty monitor gets a default one), remove_workspaces, add_container
with and without a workspace index and the error cases, the focused layout
only while tiling, and the JSON of last_focused_workspace and a round trip.

Verified: cargo test -p komorebi-core --test monitor_workspaces, 22 passed.
No non-test source changed.
2026-11-05 15:03:26 -08:00
LGUG2Z 3cc8ff63b3 fix(core): constrain the main container of the right-main vertical stack at index 0
enforce_resize_for_right_vertical_stack said "Zero is actually on the right"
but locked top, bottom and right of resize_dimensions[1], so the main
container (index 0, drawn on the right: arrangement.rs primary_left =
area.right - primary_width) was never constrained and the first stack
container could not be resized at all. Index 0 now loses top, bottom and
right (it can only grow to the left); the stack loop over [1..] is unchanged
(nothing in it goes left, first not up, last not down).

The test that pinned the buggy result is replaced by the previously ignored
test of the intended behaviour, un-ignored and extended to 1 to 4 tiles:
[l, rb], [l, rb, tr], [l, rb, trb, tr].

BEHAVIOUR (all three daemons share this function): resizing in the
right-main-vertical-stack layout changes. Gate: Windows e2e resize
scenarios; the ones that run in right-main-vertical-stack are none by name
(resize_commands uses the default layout; layouts.py and commands.py only
tile and cycle through right-main-vertical-stack), so a pointer or
resize-edge scenario in that layout would need adding.

Verified: cargo test -p komorebi-core, with and without --features schemars,
all pass; no e2e run.
2026-11-05 15:03:26 -08:00
LGUG2Z 04af7fcbbf test(settings): pin the transparency and animation load rules
tests/reload.rs: transparency is kept by a load without the key when the
daemon passes the keys as they are (Windows) and reset to false and 200 when
it passes unwrap_or (KDE); an animation block with a per-kind map replaces
the map and leaves the global flag, a load with no block keeps everything, a
global flag clears the map and a block without fps resets fps to 60. Test
only.

Verified: native cargo test -p komorebi-settings: 18 unit + 5 integration
passed.
2026-11-05 15:03:26 -08:00
LGUG2Z af501d2eb7 refactor(core): the floating-window hook is called before_floating_removed
Workspace::remove_floating_window calls the hook before it takes the
window out of the ring (the KDE and macOS originals move the focus to the
previous floating window first, and the focus index moves back by one
whatever the length), but the hook was named after_floating_removed and its
doc said after. Name and doc now say before; the behaviour is the one KDE
and macOS had. KDE's and macOS's implementations are renamed with it (the
only users; Windows keeps the no-op default). A stub test pins the order:
the hook sees both floating windows when one is removed.

Reviewer finding F2 (S/review/core.md). No behaviour change.

Verified: cargo test -p komorebi-core --features schemars (native): 30
passed, 0 failed; KDE cargo test -p komorebi-linux (lite env): 664
passed, 0 failed; Windows clippy --locked --all-targets -D warnings:
PASS; macOS fake-CC check: PASS. Not run: VM suites, Windows e2e.
2026-11-05 15:03:26 -08:00
LGUG2Z a1a18a7afc test(core): pin the hook order and arguments of Workspace::update_shared
tests/update_shared.rs (34 tests) over the recording stub: the exact call log
for plain tiling (begin_update, containers_pruned with the old focus index,
adjust_layout then place_container per container, end_update with the around
and viewport arguments, guard dropped last), monocle (place_monocle with the
work area less workspace, container, border offset and border width padding;
no end_update), maximized, monocle beating maximized, scrolling (adopt widths,
scrolling_layouts, hidden flags into place_container, again), empty, tile off,
a skipped begin_update, end_update returning Again (pass numbers, the places
repeated, begin and prune once). Error policy per hook: begin_update,
place_container, place_monocle, maximize_in_layout and end_update errors all
propagate; the guard is still dropped; a failing place_container leaves
latest_layout and the resize vector untouched while a failing end_update has
already kept the layout. Also the layout rules (highest threshold wins and
sticks), container behaviour rules (none reached clears it), work area offset
priority (rule, workspace, monitor; monocle counts as one), the window-based
offset limit, paddings (workspace Some(0) wins over the monitor), resize vector
resizing (not while monocle) and constraint enforcement before layout.

Verified: cargo test -p komorebi-core --test update_shared, 34 passed. No
non-test source changed.
2026-11-05 15:03:26 -08:00
LGUG2Z 6e38ddc1f8 feat(core): the commands that move across workspaces and monitors, with native tests
Eight arms' worth of the router as functions of komorebi_core::command:
cycle_move_container_to_workspace (the move and the send arm, by follow),
cycle_focus_monitor, cycle_move_container_to_monitor (move and send),
focus_monitor_workspace_number and move_container_to_monitor_workspace_number
(move and send). They need five more operations of the window manager, in
a second trait MonitorCommandHost: CommandHost (mouse_follows_focus,
update_focused_workspace, direction_from_monitor_idx,
move_container_to_monitor, focused_workspace_idx), so the daemons that
implement only the first trait still compile. The text is the KDE text,
which Windows and macOS have byte for byte. tests/commands.rs mirrors the
e2e checks of commands.py: cycle-move-to-workspace and cycle-send-to-workspace,
cycle-monitor (the wrap), cycle-move-to-monitor and cycle-send-to-monitor,
focus-monitor-workspace, move-to-monitor-workspace and
send-to-monitor-workspace.

Verified: cargo test -p komorebi-core --features schemars (native): the
commands test file 14 passed, 0 failed (the rest of the crate unchanged).
Not run: the daemons (nothing calls the functions yet).
2026-11-05 15:03:26 -08:00
LGUG2Z b4935701a8 revert: the 1 s write timeout on subscriber sockets
Reverts 4bdda86f. A write timeout can deliver a truncated JSON document: part
of the notification is written, the write then fails with TimedOut, and the
subscriber, which stays subscribed, reads the prefix followed by the next
notification. It also does not bound the stall: nothing evicts the subscriber
(each push to it waits another second under the window manager lock), the
connect has no timeout (uds_windows offers none), and that Winsock honours
SO_SNDTIMEO on AF_UNIX sockets is unverified. The transport change and the
Windows connect closure are both reverted, including the skip-on-timeout test
(the connect parameter of notify_sockets was already there and is unchanged).

Follow-up, not done: an eviction policy for a subscriber that does not take a
notification, together with a timeout that was verified on Windows (or a
non-blocking write with a per-subscriber queue). Decision D-coord-10.

Behaviour is back to cand4's predecessor (no timeout). Verified: tools/fast-check
(native, Windows clippy -D warnings) PASS; e2e not needed beyond commands.
2026-11-05 15:03:26 -08:00
LGUG2Z a68668840d chore(repo): combine the gate candidate 3c with the core, stall-fix and one-daemon-package lines (candidate 4)
Candidate 4: wip-cand3c (core line with macOS on komorebi-core, HideSpot, settings S1-S3, bar e2e scenario, handover scenario fix), wip-u-core3 (shared Workspace update_shared and the Windows converge of window_manager/process_command), wip-u-stallfix (lock-holder instrumentation, sysinfo scan before the lock, bar restart and hwnd file off the lock, subscriber write timeout) and wip-u-pkg2 (one komorebi package and binary, daemons as libraries). Conflicts, if any, are resolved here.
2026-11-05 15:03:26 -08:00
LGUG2Z 8d881bc229 test(core): pin monocle, floating, layer and hide behaviour, and the resize constraints
tests/workspace_layers.rs (33 tests): monocle toggle, reintegration (index
restore, padding past the end), cycling and its wrap; new_floating_window from
a container, a stack, the monocle and the maximized window (unmaximize hook, the
failure leaving the window maximized); floating removal and the
after_floating_removed hook; the layer enum (default, Display, JSON) and that the
shared code never changes it; Workspace::hide order (floating from the back at the
window spot, containers at the display spot, maximized, monocle) with the error
policy: a floating or container window that will not hide is skipped, a maximized
one is an error that stops before the monocle.

tests/resize_constraints.rs (11 tests): the sides each default layout leaves
adjustable for 1..4 containers, None tiles, and no containers.

BUG FOUND (one ignored test): enforce_resize_for_right_vertical_stack indexes
resize_dimensions[1] where its own comment says zero is on the right, so the main
container is never constrained and the second may not be resized at all; this is
inherited unchanged from the Windows tree. The current behaviour is pinned by a
passing test and the intended one by an #[ignore = "bug: ..."] test.

Verified: cargo test -p komorebi-core --test workspace_layers --test
resize_constraints: 33 and 10 passed, 1 ignored. No non-test source changed.
2026-11-05 15:03:26 -08:00
LGUG2Z 58ccd9a2b0 perf(windows): a subscriber that does not read cannot hold up the push with a 1 s write timeout
notify_subscribers connects to every subscriber socket and write_all()s the
notification with the window manager locked (every command, the reaper and
the event thread), with no timeout: a subscriber that stops reading stalls the
lock holder, and with it every thread.

komorebi_transport::notify_sockets skips a subscriber whose write fails with
TimedOut or WouldBlock (warns, keeps it subscribed, goes on to the next);
every other write error still aborts as before. The timeout itself is the
caller's: the connect closure passed by the Windows daemon sets a 1 s write
timeout on the stream. KDE and macOS pass connect closures without a timeout,
so nothing changes for them. A new unit test covers the skip. The connect
itself cannot be bounded (uds_windows has no connect timeout), and the
listener's lock wait is untouched.

BEHAVIOUR: a Windows subscriber that does not read for a second misses that
notification instead of blocking the daemon. Gate needed: Windows e2e commands
and config_reload, the lock stress, subscriber scenarios if any. Verified:
native cargo test -p komorebi-transport 14 passed (incl. the new test);
tools/fast-check native, Windows clippy -D warnings and KDE check + lib tests
PASS; macOS type-check run by hand (fast-check's macOS step fails to select
a package on this merged tree) PASS. e2e not run.
2026-11-05 15:03:26 -08:00
LGUG2Z 92943f7cba test(core): pin Workspace container ring, placement, stacking and promote
tests/workspace_containers.rs (41 tests) over the recording stub: where a new
window goes (empty, after the focused container, scrolling hook index,
preselection, every initial placement rule incl. the 1-based index and its
fallback), resize-slot bookkeeping on insert and remove, locked containers
keeping their index on insert, swap and promote, the note_scrolling_departure
hook before a removal, the focus index after remove_container (idx-1 of the
FOCUSED container, not of the removed one), stacking (move_window_to_container)
and unstacking with the exact hide/restore call order and the hide spot passed,
focus by window, window lookup across containers, monocle, maximized and
floating windows, location_from_exe order, visible_windows order, directions
with and without layout flip, cycling and the pointer lookup.

Verified: cargo test -p komorebi-core --test workspace_containers, 41 passed.
No non-test source changed.
2026-11-05 15:03:26 -08:00
LGUG2Z d20432f087 test(core): add a recording stub platform and pin Container behaviour
Adds crates/komorebi-core/tests/common (StubWindow, StubPlatform): a
Clone-but-not-Copy window and a platform whose window operations and every
WorkspacePlatform and MonitorPlatform hook append a line to an ordered log,
with failure injection per operation (fail("hide 3"), fail("place_container")),
scripted end_update passes and a per-workspace hide spot kept in the platform
state the way macOS keeps its corner. The log and settings are thread-local
and every test starts with fresh().

tests/container_behaviour.rs pins Container<W> (24 tests): add/remove/focus
ordering, the focus index after removal at each position (it is idx-1 whatever
was focused, and dangles after an out-of-range removal), empty-container cases,
the order of hide_window calls (from the back, a failing window is skipped),
load_focused_window stopping at the first failure, the omitted window, restore,
locking and the JSON shape.

Verified: cargo test -p komorebi-core --test container_behaviour, 24 passed
(nix shell gcc, own target dir). No non-test source changed.
2026-11-05 15:03:26 -08:00
LGUG2Z 7b3f691194 feat(core): the first shared commands, over a CommandHost, with native tests
komorebi-core gets `command`: the workspace navigation commands as
functions generic over a CommandHost (the few window-manager operations
they build on: the monitors and the focused one, the monitor under the
pointer, focus_monitor, focus_workspace, move_container_to_workspace):
cycle_focus_workspace, cycle_focus_empty_workspace, close_workspace,
focus_last_workspace and move_container_to_last_workspace. The text is
KDE's (which is macOS's); the one platform difference, that Windows lets the
pointer pick the monitor first for cycle_focus_empty_workspace,
close_workspace and focus_last_workspace where KDE and macOS do not, is the
associated const CommandHost::POINTER_PICKS_THE_MONITOR_FOR_ALL (false by
default). Nothing uses them yet.

tests/commands.rs implements the host with a recording stub and mirrors the
e2e checks of commands.py (cycle-workspace, cycle-empty-workspace,
close-workspace, focus-last-workspace, move-to-last-workspace and
send-to-last-workspace): wrap-around, the pointer's monitor, which
workspaces close, going back and forth, follow and send, and the Windows
switch.

Verified: cargo test -p komorebi-core --features schemars (native): 30
unit + 9 command tests passed, 0 failed (and the other test files of the
crate). Not run: the daemons (nothing calls the functions yet).
2026-11-05 15:03:26 -08:00
LGUG2Z 5eaa5fcfa2 feat(windows): log who holds the window manager lock, and step timings of replace-configuration
Instrumentation for the stalls of the stall analysis; no behaviour change.

lock_holder.rs: a place that has just locked the window manager calls
lock_holder::held("site") and keeps the returned guard next to the lock
guard; the holder (what, thread, since) is recorded in a slot of its own
(a mutex held only for a copy; the window manager lock itself is unchanged),
a hold of 200 ms or more is logged at warn when it ends ("window manager
lock held by X (thread T) for N ms"), and lock_holder::describe() names the
holder for the waiters: the border manager's "stuck for N ms" warning and
the listener's "could not acquire window manager lock" warning now end with
the holder. Sites: every command (held as "command <message>"), process_event,
reaper, monitor reconciliator, border manager, transparency and stackbar
managers. komorebi-transport: ConnectionPolicy::lock_holder() (default None),
used in that warning; the Windows policy implements it, KDE and macOS keep the
text they had.

replace-configuration logs info lines "replace-configuration: <step> took N
ms" for restore, preload, init, restore of the new wm, reload, swap, the
process scan for komorebi-bar and the bar restart; every command logs at
debug how long the command, update_known_hwnds and notify_subscribers took.

Verified: tools/fast-check: native, Windows clippy -D warnings, KDE check +
lib tests PASS; the macOS step of fast-check fails to select a package on this
merged tree (tool issue: -p komorebi), the macOS check run by hand with -p
komorebi-macos -p komorebic-macos -p komorebi-client-macos -p
komorebi-bar-macos passes. Not run: e2e.
2026-11-05 15:03:26 -08:00
LGUG2Z e663e346ba merge: wip-u-kfm2 + wip-u-settings2 (candidate 3)
Merge of kfm's macOS core migration (wip-u-kfm2 9cb4f2fa) and the settings
stack through S3 (wip-u-settings2 696d2929), both on wip-u-integ2. Two files
conflicted, both macOS; every hunk is resolved the same way: take kfm's
version of the file (its new shapes: komorebi_core Monitor/Workspace,
workspace_config and monitor_config as free functions) and re-apply the S3
change to it, because the settings side only touched lines kfm moved.

- komorebi-for-mac/komorebi/src/monitor.rs: conflict 1 (imports): kfm's
  header doc kept, the DEFAULT_CONTAINER_PADDING / DEFAULT_WORKSPACE_PADDING
  imports dropped (S3). Conflict 2 (std imports): kfm's side (no VecDeque).
  The four padding reads (the two default fallbacks in the monitor's
  workspace globals) call crate::settings::container_padding() /
  workspace_padding(); the now unused Ordering import is removed.
- komorebi-for-mac/komorebi/src/static_config.rs: both conflicts are the
  padding defaults in kfm's free functions (workspace_config, monitor_config):
  kfm's text kept, the two defaults read from settings. Re-applied S3 in this
  file: apply_globals applies paddings, aspect ratio, layout_defaults and
  display_index_preferences as one Handle::update of a SharedDelta; the
  readers (layout_defaults, aspect ratio, display preferences, paddings) use
  the accessors; the statics' imports and the now unused AspectRatio imports
  are removed.

komorebi-core and the shared crates read none of the removed statics
(grep: only the unrelated DEFAULT_*_PADDING consts in komorebi-config), so no
hook is needed. S3 semantics are unchanged from wip-u-settings2 (statics
removed, one update per load, reload merges, a few keys reset); the pins
are the settings crate's reload.rs and shared tests plus the KDE
tests/config.rs.

Verified: see the run in the progress log (macOS fake-CC clippy -D warnings
-p komorebi-macos --all-targets clean at this revision).
2026-11-05 10:30:05 -08:00
LGUG2Z 51afa8b135 feat(core): Workspace::update_shared with the hooks of the update skeleton
The shared half of update (core-model.md section 12) as
Workspace::update_shared: begin_update (Flow::Skip, or a guard held until
the end), the empty containers dropped and containers_pruned, the work
area, offsets and paddings, the layout and behaviour rules, then the tile
branch: place_monocle, maximize_in_layout, adopt_widths_before_layout and
adopt_actual_widths for a scrolling workspace, the layout (calculate, or
scrolling_layouts with the containers that rest hidden), adjust_layout and
place_container per container, latest_layout, and end_update, which can ask
for one more pass (Pass::Again), and the resize_dimensions resize. The
text is KDE's with the Windows pass loop in it; the hooks are the parts the
two daemons do differently. It is not called update so that a daemon keeps
its own update (macOS's, which has another shape, stays as it is); every
hook has a default so that MacosPlatform compiles unchanged, and the
defaults of the ones a daemon must provide fail. Placement carries what the
hooks of a pass need (the work areas, the paddings, the border, whether the
workspace scrolls, whether it has resize adjustments, whether a window is
maximized). Flow and Pass are the answers of begin_update and end_update.

A test with a stub platform pins the call order and the second pass.

Verified: cargo test -p komorebi-core --features schemars (native): 29
passed, 0 failed; Windows clippy --locked --all-targets -D warnings: PASS
(compiles the crate). Not run: the daemons (nothing calls update_shared
yet).
2026-11-05 10:30:05 -08:00