Commit Graph
3078 Commits
Author SHA1 Message Date
LGUG2Z 0f851bfb0a docs(cli): regenerate the stale Windows command pages
docs/cli lagged behind the Windows komorebic: 35 pages had out-of-date
help text (possible values now listed with their descriptions, new doc
comments, the Scrolling commands without the komorebic.exe usage name) and
3 pages did not exist yet. They are regenerated from the current Windows
CLI definition (komorebic-core docgen-all example, platform windows,
COLUMNS=1000 so nothing is re-wrapped like the existing pages), and the
page conventions of each file are kept: header line only where the page had
one, komorebic.exe as the binary name, trailing newline. The other 149
pages are byte-identical to the fresh output. The KDE and macOS pages are
untouched (decision D20: Windows was the only stale set).

Docs only, no behaviour. Verified: regenerated twice, second compare shows no
diff; the real Windows binary was not run (the pages come from the shared
definition rendered on Linux, class text normalised to the Windows one).
2026-11-05 15:03:26 -08:00
LGUG2Z 55a57cb030 refactor(mac): four more process_command arms call the named methods KDE has
LayoutRatios, Query, NamedWorkspaceRule and InitialNamedWorkspaceRule were
the same code inline on macOS as set_layout_ratios, answer_query,
add_named_workspace_rule and add_initial_named_workspace_rule on KDE
(compared with whitespace removed). The macOS arms call methods with those
names and bodies and are byte-identical to KDE's. No behaviour change. The
other inline macOS arms differ in what they do (ReplaceConfiguration has
the run loop and no warning, ToggleWorkspaceWindowContainerBehaviour,
SessionFloatRule, IgnoreRule, ToggleWorkspaceLayer and ResizeWindowAxis
have other bodies) and stay.

Verified: fake-CC cargo clippy -p komorebi-macos ... --all-targets -D
warnings: PASS (type-check only). Not run: the macOS tests (the Mac Mini).
2026-11-05 15:03:26 -08:00
LGUG2Z d6c0c6f115 refactor(windows): move transparency enabled and alpha to settings
Plan step 10, S4 for Windows. TRANSPARENCY_ENABLED and TRANSPARENCY_ALPHA are
no longer statics: the Transparency, TransparencyAlpha and ToggleTransparency
commands write settings().shared.transparency with one update, the load
applies the two keys as one update (Windows keeps the value when a key is
absent, unlike KDE), the transparency thread, process_event, window.rs and
the state/config dump read through the accessors.

BEHAVIOUR: ToggleTransparency was a load then a store and is now one update;
a load publishes the two keys together. Gate: Windows e2e (transparency,
config_reload).

Verified: Windows clippy -D warnings --locked --all-targets on
komorebi-windows (cross): clean. e2e not run.
2026-11-05 15:03:26 -08:00
LGUG2Z 131a3cb9f8 build(tools): add fast-check, the minimal checks for the touched paths
Runs only the checks a jj diff needs (KDE cargo check and tests, macOS type-check, Windows
clippy through the nix dev shell, native crate tests, nix evaluation only) with persistent
target dirs, and prints the time of each. Copy of the host-side script (the original stays
in use outside the repository) with these differences:
- FAST_CHECK_SCRATCH defaults to `${XDG_CACHE_HOME:-$HOME/.cache}/komorebi-fast-check`
  instead of a /tmp/claude-1000/... scratchpad path (usage text updated);
- the fake C compiler is `$HERE/cc-fake.sh` (the script directory, resolved with readlink -f)
  instead of `$S/kfm/cc-fake.sh`;
- `tools/*` is classified like docs (no check), so a change to the tools alone prints
  "nothing to run" instead of listing every file as unclassified;
- the second `case` arm lost the patterns `Cargo.toml | Cargo.lock | .cargo/*`, which an earlier
  arm already catches (shellcheck SC2221/SC2222; no change in behaviour);
- header comment: "from anywhere inside a jj workspace of the repository", no mention of komomono.
Everything else is byte-identical (diff against the host copy).

Verified: bash -n and shellcheck clean; `tools/fast-check --list` from this workspace.
2026-11-05 15:03:26 -08:00
LGUG2Z e95d146bae style(macos): format the macOS code with the project's rustfmt settings
Pure formatting, no other change: nightly rustfmt --edition 2024 with
komorebi-for-mac/rustfmt.toml (imports_granularity = Item) over
komorebi-for-mac/**/*.rs and the macOS modules in the shared directories
komorebic/src/macos and komorebi-bar/src/macos. 11 files; the kfm fmt check
of the previous revision reported them. Windows and KDE code is not touched,
and the Windows source filter excludes those macos files, so no Windows or
KDE derivation changes.

Verified: the rustfmt --check command of the fmt check passes on the result
locally; nix eval of drvPath in a throwaway git copy: Windows deps and
clippy, kfde deps, clippy and vm stacks are identical before and after it.
2026-11-05 15:03:26 -08:00
LGUG2Z b3589b7b7b test(kde): sweep of the model commands through process_command
The commands e2e scenario (265 checks, about 7.6 minutes on the Windows gate, a
stall-prone sweep) asserts after each of about 216 komorebic commands that the
daemon is alive, answers state and manages every window. For the commands that
only mutate the model that is not a property of a real OS.

komorebi-for-kde/komorebi/tests/command_sweep.rs sends the SocketMessage of each
model command of the scenario's SWEEP, in its order (focus, move, stack,
resize, promote, flip, layouts, toggles, workspaces, monitors, offsets,
padding, behaviours, rules, scrolling), through WindowManager::process_command
over a FakeBackend with two monitors and three windows, and after each asserts
that every window is still managed (any monitor, workspace, layer), and that the
state query answers JSON. A command may refuse (a direction with no window): only
that refusal is accepted as an error. The sweep runs in 0.2 s.

mirrors: commands / <command> leaves the daemon healthy.

What stays e2e only: komorebic parsing each command and writing that message,
the pointer, files and config reload commands, a command that stalls the
daemon while the socket waits, and everything the real OS does with the windows
(the sweep's healthy check against the OS's windows).

Verified: cargo test -p komorebi-linux --test command_sweep in komorebi-for-kde,
1 passed (native, Linux). KDE daemon only: the Windows and macOS daemons have no
native harness. No source change, no bug found.
2026-11-05 15:03:26 -08:00
LGUG2Z a82d57f1be refactor(mac): eight cross-workspace and cross-monitor arms call komorebi-core
The same eight arms as on KDE (they were byte-identical) are one call each of
the functions of komorebi_core::command, and WindowManager implements
MonitorCommandHost by forwarding to its own methods. No behaviour change.

Verified: fake-CC cargo clippy -p komorebi-macos ... --all-targets -D
warnings: PASS (type-check only). Not run: the macOS tests (the Mac Mini).
2026-11-05 15:03:26 -08:00
LGUG2Z b5a634f59c revert: write komorebi.hwnd.json from a writer thread
Reverts 3d2386e3 (review finding 8). The detached latest-wins writer thread
left the file lagging behind the daemon (a command that returned, or stop, could
precede the write, and std::process::exit cut a write in progress), and it
opened and truncated the file in place, so a reader could see it half written.
The file is small and the synchronous write was the original behaviour; the
stall analysis did not show it to be a cause of any hold (the per-step and
lock-holder instrumentation of the same stack will show whether it ever is).
Restoring the synchronous write in update_known_hwnds and the reaper is the
simplest form that is correct: the file is complete when the command returns
and when stop exits.

Behaviour is the original again for the file. Verified: Windows clippy
-D warnings via tools/fast-check PASS; e2e: lifecycle and commands (the file is
written again before the reply).
2026-11-05 15:03:26 -08:00
LGUG2Z 5b5647ea34 fix(mac): forget the windows that the application reaper removes
BEHAVIOUR (registry only). Review finding 4, the part that can be done where a
window id is known.

Window::observe now registers the windows that are really observed (previous
revision), and a window that closes while its application runs left its entry
until the application quit. WindowManagerEvent::Destroy carries no window id,
but reap_invalid_windows_for_application is where the daemon works out which of
the application's windows are gone, and it already removes them from the
workspace: it now also forgets them in the registry (tiled and floating
alike); the reaper's reap_window did already.

What stays: an observed window that closes without passing through either
(for example one that was unmanaged and then closed, or whose Destroy was not
followed by a reap) keeps its entry (an element, an observer and an inert
application) until its application quits; the table is bounded by the number
of windows the daemon has observed per running application, and a periodic
sweep would cost one Accessibility call per entry under the window manager lock.
Hand check H4 measures the Mach ports held (the one unverified cost: whether an
AXObserver holds a port).

Verified: macOS fake-CC type-check (tools/fast-check) PASS. Not verified: any
run. Verified on the Mini: not yet.
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 0008c6c27d docs: ARCHITECTURE-UNIFIED.md, a map of the repository after the consolidation
A new reader had no single page that said where things are: three platform
trees, nine shared crates, the four unified packages, the shims that remain,
and which differences are on purpose. The page gives:

- the three trees and what lives in each (root = Windows, komorebi-for-kde,
  komorebi-for-mac) and that the root Cargo.toml is the only workspace;
- the packages komorebi (komorebi-daemon, cfg_select! over komorebi-windows,
  komorebi-linux, komorebi-macos), komorebic, komorebi-client, komorebi-bar
  and their cfg(target_os) layout, and the shim packages until the cutover;
- the crates/ map (protocol, config, collections, transport, backend, core,
  settings, bar-core, komorebic-core);
- where the platforms differ on purpose, with a pointer to seam.md,
  core-model.md, settings.md, unified-binaries.md, bar-unification.md and
  macos-handcheck.md;
- the oracles (wire goldens, config and bar schemas, CLI docs, derivation
  drift) and the tiered feedback loops;
- the tools outside the repository (fast-check, mac-check.sh,
  kde-closure-check, e2e-needed, gate-lock, ...) with a proposal of which to
  commit; nothing was moved.

Statements were checked against Cargo manifests (cargo metadata --no-deps
lists the package names used), flake.nix and the source directories. The
version numbers and the packages list were read from manifests. Not built;
macOS statements are what the progress log says, not observed.
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 ddc1a231c5 refactor(mac): seven process_command arms call the named methods KDE has
Part of the router converge between KDE and macOS: CycleFocusWorkspace,
CycleFocusEmptyWorkspace, CloseWorkspace, MoveContainerToLastWorkspace
(and SendContainerToLastWorkspace, which is the same method with
follow = false), EagerFocus and BorderColour were the same lines inline on
macOS as the methods cycle_focus_workspace, cycle_focus_empty_workspace,
close_workspace, move_container_to_last_workspace, eager_focus and
set_border_colour on KDE (compared with the arms' text, apart from where
rustfmt wrapped a line). The macOS arms now call methods with those names
and bodies; the arms are byte-identical to KDE's. No behaviour change.

Verified: fake-CC cargo clippy -p komorebi-macos -p komorebic-macos -p
komorebi-client-macos -p komorebi-bar-macos --all-targets -D warnings:
PASS (type-check only). Not run: the macOS tests (the Mac Mini), KDE and
Windows gates (no KDE or Windows file changed).
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 2a8b71f1c9 build(tools): add the fake C compiler and mac-check.sh for the macOS type-check on Linux
macOS cannot be built or linked on the Linux host; the way to type-check it is
`cargo check --target aarch64-apple-darwin --all-targets` with a fake C compiler so the
C -sys crates' build scripts succeed. That compiler was only a scratchpad file outside the
repository and mac-check.sh hardcoded a workspace path.

tools/cc-fake.sh: verbatim copy of the scratchpad cc-fake.sh (emits an empty object for
every compile, hands -E to the real gcc). No difference.

tools/mac-check.sh: new copy of the old script with these differences:
- no hardcoded `cd /home/jado/komomono-work/ws-step4/komorebi-for-mac`: the root comes from
  `jj root` (fallback `git rev-parse --show-toplevel`);
- the fake CC is `$HERE/cc-fake.sh` (next to the script) instead of `$S/kfm/cc-fake.sh`;
- the target dir is `${FAST_CHECK_SCRATCH:-${XDG_CACHE_HOME:-$HOME/.cache}/komorebi-fast-check}/target-fast-mac`
  instead of a /tmp/claude-1000 scratchpad;
- in the merged tree (komorebi-for-kde has its own Cargo.toml only in the old layout) it checks the
  packages fast-check checks (-p komorebi -p komorebi-macos -p komorebic-macos
  -p komorebi-client-macos -p komorebi-bar-macos) from the root; with the old separate workspace it
  keeps `cd komorebi-for-mac` and --workspace;
- /bin/sh became bash with `set -euo pipefail`; the old script's omission of --locked is kept
  (pass it as an extra argument).

Verified: bash -n and shellcheck clean. Not run: the check itself needs nix and the toolchain build.
2026-11-05 15:03:26 -08:00
LGUG2Z 081e373782 fix(nix): check the macOS formatting with rustfmt over the macOS files
The kfm fmt check ran stable `cargo fmt -p ...` on the stubbed workspace
source and failed twice: rustfmt follows the `mod windows;` of the shared
entry files (komorebi-bar, komorebi-client; their windows modules are not in
the macOS source), and the stable rustfmt ignores the nightly options of
this tree's rustfmt.toml. The check is now a runCommand: the nightly rustfmt
(already in the flake for treefmt) with --edition 2024 (the edition of the
macOS manifests; cargo fmt uses it too) and komorebi-for-mac/rustfmt.toml,
over komorebi-for-mac/**/*.rs, komorebic/src/macos, komorebi-bar/src/macos and
komorebi-client/src/macos.rs. The entry files of the shared crates are not
checked; their macos modules are. The macOS code is not clean under it: the
next revision formats it.

Verified: the command reproduced locally with the nightly rustfmt (11 files
differ). The nix attribute is evaluated in the final eval table. Not built.
2026-11-05 15:03:26 -08:00
LGUG2Z 827d7b6ffb test(kde): rule matching by kind, strategy and composite as native checks
The rules, rules_class, rules_exe, manage_rules and title_rule e2e scenarios
need a real window to decide WHICH window a rule catches; that decision is the
pure should_act / should_act_individual of the daemon, which no existing test
exercised strategy by strategy (the KDE tests only add a rule or two).

komorebi-for-kde/komorebi/tests/rule_matching.rs adds 13 tests: Equals,
StartsWith, EndsWith, Contains and the four DoesNot* strategies over title,
class, exe and path; each kind reads only its own part of the window; Regex with
and without a compiled regex and over several classes; the .exe suffix of an id
is ignored; no strategy and Legacy keep the old semantics; simple and composite
rules; the last matching rule wins; no rules match nothing; a rule by title
follows the title asked about; an ignore rule keeps a window out and a manage
rule rescues one (through SocketMessage::IgnoreRule / ManageRule and a
FakeBackend desktop). Each test names the e2e check it mirrors.

What stays e2e only: that the daemon evaluates rules when a window opens and not
when it is renamed, that the window then lands on the right workspace and is put
away or shown, and the title, class and exe the real OS reports. The rule
matching exists once per platform (no shared function in komorebi-config), so
this covers the KDE copy only; the Windows and macOS copies stay unproven natively.

Verified: cargo test -p komorebi-linux --test rule_matching in komorebi-for-kde,
13 passed (native, Linux). No source change, no bug found.
2026-11-05 15:03:26 -08:00
LGUG2Z 535614a545 refactor(kde): eight cross-workspace and cross-monitor arms call komorebi-core
The arms CycleMoveContainerToWorkspace, CycleSendContainerToWorkspace,
CycleFocusMonitor, CycleMoveContainerToMonitor, CycleSendContainerToMonitor,
FocusMonitorWorkspaceNumber, MoveContainerToMonitorWorkspaceNumber and
SendContainerToMonitorWorkspaceNumber are one call each of the functions of
komorebi_core::command (their bodies moved there, unchanged), and
WindowManager implements MonitorCommandHost by forwarding to its own methods.
No behaviour change.

Verified: KDE cargo test -p komorebi-linux (lite env): 678 passed, 0 failed.
Not run: VM suites.
2026-11-05 15:03:26 -08:00
LGUG2Z 6d1262b4a3 fix(windows): tie the pre-lock bar scan to its message; keep the config error; wait for the bar restart on stop
Review finding 4 on the stall fix.

- BAR_RUNNING was a process-wide static written by on_message and read by
  whichever replace-configuration ran next: a dropped message (paused, lock not
  acquired) left a stale answer, and two connections overwrote each other. It
  is now a thread_local Cell<Option<bool>>: the per-connection thread that
  reads a message (on_message) and then handles it (inside try_lock_for) is the
  same thread, every message read replaces the cell (None unless it is a
  ReplaceConfiguration), and replace_configuration takes it. TCP clients never
  set it and the handler scans for itself, as before.
- The bar section of the config is read before the thread is spawned and its
  error is returned to the client as it was (the original read it after a
  successful Stop-Process, which cannot fail differently: the same file was read
  successfully at the top of the command); only the PowerShell work moves to
  the thread (restart_bars takes the bar configuration, no longer a path).
- The restart thread's handle is kept in BAR_RESTART; finish_bar_restart() joins
  it and is called before process::exit in WindowManager::stop and in the
  ctrl-c path of daemon.rs, and by the next replace-configuration, so komorebic
  stop (which stops the bars after the daemon is gone) cannot be followed by a
  bar that the restart thread starts late.

BEHAVIOUR: as the earlier revision (the reply no longer waits for the bars), plus
stop now waits for a running restart. Gate needed: Windows e2e commands and
config_reload; manual: replace-configuration then stop with a bar running.
Verified: Windows clippy -D warnings via tools/fast-check PASS; e2e not run.
2026-11-05 15:03:26 -08:00
LGUG2Z 1d1ec156c5 fix(mac): an application that quit leaves the registry even while paused or on another space
BEHAVIOUR (registry only). Review finding 3.

process_event returned at 'if self.is_paused' and at the space-id mismatch before
reaching the Destroy arm where forget_pid was, so NSWorkspaceDidTerminateApplication
seen while paused (a locked screen pauses, so does toggle-pause) or on another space
was discarded and the entries of that pid stayed for a process that reuses it.
The forget_pid call is now the first thing process_event does for that
notification, with a comment, and the Destroy arm keeps the rest as it was (the
enhanced-UI forget there is pre-existing and not moved). forget_pid takes only
the registry's own lock: it does not take the window manager lock or dispatch to
the main queue.

Test (Mac): forget_pid removes the windows of that pid and no others.

Verified: macOS fake-CC type-check (tools/fast-check) PASS. Not verified: any
run; a WindowManager-level test of the paused case needs the process_command.rs
harness and is left to the Mini. Verified on the Mini: not yet. Hand check: H6.
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 864de814cd docs: begin each plan document in docs/dev with a one-line status
The documents in docs/dev were written at different points of the
consolidation and some of their statements are history (for example
unified-binaries.md still says "never write -p komorebi", true before step 8).
Each now opens with a "Status (wip-cand4)" line saying whether it is design,
evidence or a log, what has landed, what has not, and, for
unified-binaries.md, which part is superseded.

The statuses were taken from the revision list wip-main..wip-cand4 and the
progress log, not from re-measuring. Only the line under the title was added;
no existing text changed. Not built.
2026-11-05 15:03:26 -08:00
LGUG2Z fcc4da32b9 refactor(kde,mac): window_manager.rs asks window::foreground_window_id() for the focus
Both daemons' window_manager.rs read the focused window's id the same
way: `foreground_window_id()` from their own window.rs (KDE's is the
backend query it already had there; macOS gets the one-line wrapper of
MacosApi::foreground_window_id). The inline `backend().foreground_window()
.and_then(WindowId::to_u32)` chains on KDE and the `MacosApi::` calls on
macOS go, which is the first step to the same text in the two files (the
Windows one is not touched). No behaviour change.

Verified: KDE cargo test -p komorebi-linux (lite env): 664 passed, 0
failed; fake-CC cargo clippy -p komorebi-macos -p komorebic-macos -p
komorebi-client-macos -p komorebi-bar-macos --all-targets -D warnings: PASS
(type-check only). Not run: the macOS tests (the Mac Mini), VM suites.
2026-11-05 15:03:26 -08:00
LGUG2Z b6c00ef795 refactor(macos): move the animation settings to settings
Plan step 10, S5 for macOS. The seven ANIMATION_* statics are gone. The
Animation, AnimationDuration, AnimationFps and AnimationStyle commands each
write settings().shared.animation with one update (global value clears the
per-prefix map, a prefix inserts one entry); the animation block of a load is
one update through SharedDelta::apply (global clears the map, a map replaces
it, a block without fps has the default, no block keeps everything).
animation::motion_for reads enabled, duration and style from one snapshot
(Animation::motion_for) where it read three separate statics, and
frame_period reads fps from settings. The suspend() counter
(ANIMATIONS_SUSPENDED) is runtime state and stays as it is: it is the model
for the KDE and Windows guards. The test-only AnimationsOn helper in
window_manager.rs writes through settings().

BEHAVIOUR: the animator, lane and border threads no longer see a half-applied
animation reload or command (they can no longer mix the enabled flag of one
configuration with the duration or style of another), and a load publishes the
block once. Gate: macOS hand check (animation section of the hand-check list).

Verified: macOS fake-CC cargo clippy --locked --target aarch64-apple-darwin
-p komorebi-macos --all-targets -- -D warnings: clean. Nothing run on a Mac;
value semantics rest on the settings crate tests (merge, reset of fps, global
clears the map) and the KDE tests that exercise the same delta.
2026-11-05 15:03:26 -08:00
LGUG2Z e7cb3be598 fix(nix): include the pan transcript fixtures in the macOS source
The kfm clippy check failed with: couldn't read
komorebi-for-mac/komorebi/src/../../komorebic/fixtures/pan3-{long,flick,slow}.transcript.txt.
The macOS tests include_str! them, and the source filter drops .txt files
(craneLib.filterCargoSources), as the Windows filter did before its own fix.
The filter now keeps files under a komorebic/fixtures directory.

Verified: the kfm deny drvPath still evaluates (shared source filter); the
clippy attribute needs a darwin builder, so it is not verified here.
2026-11-05 15:03:26 -08:00
LGUG2Z 6c5945acae test(layouts): every layout, area, count, padding and flip as native checks
The layouts, flipping, layout_flip, padding, tiling and closing e2e scenarios
assert, among other things, that each layout puts one tile per window inside
the work area, none over another, that a flip mirrors the layout and that
container padding shrinks each tile. That is arithmetic of komorebi-layouts and
needs no window manager.

komorebi-layouts/tests/layouts_everywhere.rs runs the eight layouts of the
layouts scenario over three work areas (one off the origin, one with negative
left), 1 to 12 windows and paddings none/0/10/30, and asserts: one tile per
window; inside the area; no overlap; tiles fill the area exactly (all but
grid); fewer windows give a tile at least as big; one window has the area less
padding; padding shrinks every tile; the three flips equal the unflipped tiles
mirrored as a set; a vertical flip only moves tiles up or down. Each test names
the e2e checks it mirrors.

What stays e2e only: that a daemon hands these rectangles to the OS, and that
the OS frames agree (borders, client rounding, timing, the layouts scenario's
wait for the windows to settle).

Verified: cargo test -p komorebi-layouts --test layouts_everywhere, 8 passed
(native, Linux). No source change, no bug found.
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 f74667074b fix(mac): a clone of a Window being dropped does not deregister it
BEHAVIOUR (registry only; the reaper notification that Window::drop already
sends is the pre-existing behaviour and is untouched). Review finding 2.

Window::drop runs for every clone, including the one State::from makes of each
window on every command and event notification, and alive() is false for any
failed Accessibility call (a busy or launching app, a modal animation). The
registry forget that the registry revision put there therefore made a
transient failure drop the entry of a live, managed window. It was redundant
with the places that really know a window is gone (reap_window, and forget_pid when
an application quits), so it is removed and a comment says why.

Test (Mac): registering a window and dropping a clone of it leaves the entry.

Verified: macOS fake-CC type-check (tools/fast-check) PASS. Not verified: any
run. Verified on the Mini: not yet. Hand check: H7, and H3 (kill -STOP an app,
focus around it: its windows must stay managed).
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 a8344740cd docs(kde): mark COMPARE.md and compare-gen.py as stale after the consolidation
COMPARE.md is a snapshot of kfw 173aa802 and kfm 125a9a5 (2026-10-27), before
the commands, messages and configuration types moved into crates/. Its
generated tables count duplicated definitions that no longer exist, and the
generator cannot read the new layout: running it against this tree
(`--kfw .. --kfm ../komorebi-for-mac --kfde .`) stops with "cannot find
^enum SubCommand" because the command definitions are in crates/komorebic-core.

Rather than regenerate tables that would be wrong, the document gets a STALE
banner naming the snapshot, the reason and where the current description is
(docs/dev/ARCHITECTURE-UNIFIED.md, core-model.md), and the script docstring
says it must be ported or retired. No tables were rewritten.

Verified: ran the script as above (fails as described); the script still
parses. Not built. Executable mode of the script is unchanged.
2026-11-05 15:03:26 -08:00
LGUG2Z 3c1339a5a4 refactor(kde): move the animation settings to settings, scoped guard for stacking
Plan step 10, S5 for KDE. The seven ANIMATION_* statics are gone. The
Animation, AnimationDuration, AnimationFps and AnimationStyle commands each
write settings().shared.animation with one update (a global value clears that
setting's per-prefix map, a prefix inserts one entry, as before); the
animation block of a load is one update through SharedDelta::apply (a global
value clears the map, a map replaces it, a block without fps has the default,
no block keeps everything); movement_animation and movement_style read one
snapshot (Animation::motion_for).

The seven commands that rearrange a stack (StackWindow, UnstackWindow,
StackAll, UnstackAll, CycleStack, CycleStackIndex, FocusStackWindow) used
ANIMATION_ENABLED_GLOBAL.swap(false) and store(restore), which overwrote a
reload or command that ran in between, and was skipped by an early return.
They now hold settings::animation_off(): Handle::scoped on the global enabled
flag, which puts the previous value back on drop only if the field still holds
false (a change made meanwhile wins, an early return still restores). Same
scope as before: the global flag only, not the per-animation map.

BEHAVIOUR: (1) one publish per load / command; (2) the restore no longer
clobbers a concurrent change; (3) an error return in a stack command now
restores the flag. Gate: KDE VM suites that stack windows (stacks, animation).

Verified: KDE cargo test --locked -p komorebi-linux --lib --tests (lite
env): 58 binaries, 623 passed, 0 failed; the existing tests animation.rs,
animation_config.rs (reload: global versus per-kind, fps default) and
animation_stack.rs (animation back on after each stack command) read through
settings(). VM suites not run.
2026-11-05 15:03:26 -08:00
LGUG2Z b3b7f6c673 fix(nix): give the macOS build the toolchain of the other platforms
The first darwin build of the root flake failed in komorebi-workspace-deps:
rustc 1.92.0 is not supported by sysinfo@0.39.6 (requires rustc 1.95).
rust-toolchain.toml says channel = stable, and kfm-rust-overlay was pinned
to 1d3f83ba (January 2026), whose stable is 1.92.0, while the unified lock
now has sysinfo 0.39/0.40 and parking_lot 0.13 (rust-version 1.95, the
highest in the macOS and the KDE closures by cargo metadata).

kfm-rust-overlay (flake.nix, flake.lock, and the pin in
komorebi-for-mac/flake.lock) now uses 19ecdd08, the revision the root
flake's own rust-overlay and kfde-rust-overlay lock; its stable is 1.99.1.
kfm-nixpkgs and every other input are unchanged.

Verified (nix eval of drvPath, throwaway git copy before/after): the
Windows deps, clippy and nextest, and the kfde deps, clippy, nextest and
VM suite stacks are identical; kfm deny, fmt and toml-fmt change (the
toolchain). rust-bin.stable.latest version evaluated: 1.99.1 at the new
rev, 1.92.0 at the old one. Not verified: the darwin clippy, nextest and
deps drvPaths cannot be evaluated on this Linux host (the stub source is a
derivation the host cannot build); no build run.
2026-11-05 15:03:26 -08:00
LGUG2Z a0770266a8 refactor(mac): the workspace navigation commands are komorebi-core's
The four navigation methods of the macOS window manager (the ones that
were already the KDE text) call the functions of komorebi_core::command, the
FocusLastWorkspace arm is `self.focus_last_workspace()` (a new method that
calls the shared function; the macOS arm had the pointer preamble commented
out, which is the host default), and WindowManager implements CommandHost by
forwarding to its own methods. No behaviour change.

Verified: fake-CC cargo clippy -p komorebi-macos -p komorebic-macos -p
komorebi-client-macos -p komorebi-bar-macos --all-targets -D warnings: PASS
(type-check only). Not run: the macOS tests (the Mac Mini).
2026-11-05 15:03:26 -08:00
LGUG2Z de630fc702 fix(mac): register a window when its observer is attached, not when it is constructed
BEHAVIOUR (what is registered, and when; nothing reads the registry yet
except the unused MacosBackend). Review findings 1 (cost) and 6 (wrong
observer).

Window::new created a fresh AXObserver and registered the window each time,
so one event registered up to three constructions on the event thread under the
window manager lock (the attach-check, the re-check and the managed one), each
replacing the last, and the managed window's attached observer (the one
window.observe put on the run loop) was replaced by the third throwaway's
unattached one; window_by_title at start-up made n x n of them for an
application with n windows. Registration now happens in Window::observe, after
add_observer_to_run_loop succeeded: a Window made only to ask an app something
is never observed and never registered, the registry holds the observer that is
really attached, and a window is registered once (process_event.rs after
should_manage, and macos_api.rs at start-up). The decision is documented in
ax_registry.rs in the docs revision of this stack.

Verified: macOS fake-CC type-check (tools/fast-check) PASS. Not verified: any
run. Verified on the Mini: not yet. Hand checks: H3 (start-up with a many-window
app: time to ready), H7 (native tabs).
2026-11-05 15:03:26 -08:00
LGUG2Z 4e2c50e526 chore(repo): combine candidate 3b with the KDE handover scenario fix (candidate 3c)
Gate candidate 3c: wip-cand3b (cand3 + the bar e2e scenario) plus wip-u-kdefix (handover precondition in both copies of the shared e2e lib, KDE vm-commands bring_back step). The shared e2e/lib handover scenario is also what the Windows runner runs, so the Windows gate must include it.
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 2740098129 docs(kde): point the paths in the KDE docs and comments at where the files are now
The consolidation moved files that the KDE docs and a few comments name,
so about a dozen references were dead or wrong:

- docs/dev/ARCHITECTURE.md: `ring.rs` and `lockable_sequence.rs` are in
  crates/komorebi-collections; the daemon `main.rs` is `daemon.rs` of the
  komorebi-linux library; the KDE command line is
  komorebic/src/linux/mod.rs and hotkeys.rs of the root komorebic package;
  the tests that moved are komorebic/tests/linux_{check,cli,hotkeys}.rs,
  komorebi-client/tests/linux_subscribe.rs and
  komorebi-daemon/tests/linux_{socket,hot_reload}.rs.
- komorebi/src/check.rs (doc comments only), the VM `check` suite and its
  library extra, docs/dev/scrolling-next.md: `komorebic/tests/check.rs` and
  `cli.rs` are `linux_check.rs` and `linux_cli.rs`.
- CONTRIBUTING.md, Releases: the version is in komorebi/Cargo.toml (the
  KDE tree no longer has a workspace manifest).

Text and comments only, no code. The edit of check.rs and of the VM files
changes the KDE derivations (acceptable for docs). Verified: a link checker
over komorebi-for-kde/docs/dev reports no dead relative link; the moved test
files exist and contain the two named test functions. Not built.
2026-11-05 15:03:26 -08:00
LGUG2Z 28db46e4f1 refactor(kde): move transparency enabled and alpha to settings
Plan step 10, S4. TRANSPARENCY_ENABLED and TRANSPARENCY_ALPHA are no
longer statics: the Transparency and TransparencyAlpha commands and
ToggleTransparency write settings().shared.transparency with one update, the
load applies both keys as one update, the transparency manager reads the flag
and the alpha from one snapshot, and state and the config dump use the
accessors. KDE's load RESETS both keys when absent (false, 200), unlike
Windows which keeps the value; the delta passed to SharedDelta::apply is built
with unwrap_or so that stays exactly as it was. tests/transparency.rs and
transparency_config.rs use settings() (the latter pins the load with and
without the keys).

BEHAVIOUR: (1) ToggleTransparency was a load then a store and is now one
update, so two toggles cannot lose each other; (2) the load publishes both keys
together. Gate: KDE VM suite for transparency/opacity.

Verified: KDE cargo test --locked -p komorebi-linux --lib --tests (lite
env): 58 binaries, 623 passed, 0 failed. VM suites not run.
2026-11-05 15:03:26 -08:00
LGUG2Z 2ff0403706 refactor(windows): the workspace navigation commands are komorebi-core's
BEHAVIOUR (Windows runtime): cycle_focus_workspace,
cycle_focus_empty_workspace, close_workspace, move_container_to_last_workspace
and focus_last_workspace of the Windows window manager call the functions of
komorebi_core::command (their bodies are the ones that moved, which are the
KDE text; for these five Windows had the pointer preamble in all of them but
KDE not in three, and the shared functions run it when the host says
POINTER_PICKS_THE_MONITOR_FOR_ALL, which WindowManager does here). It
implements CommandHost by forwarding to its own methods. By construction the
calls and their order are the old ones; marked because it was only
type-checked.

Windows e2e scenarios needed: commands (cycle-workspace,
cycle-empty-workspace, close-workspace, focus-last-workspace,
move-to-last-workspace, send-to-last-workspace) and workspaces, with a second
monitor if the guest has one (the pointer preamble).

Verified: Windows cargo clippy -p komorebi-windows --locked --all-targets -D
warnings: PASS. Not run: Windows tests, e2e.
2026-11-05 15:03:26 -08:00
LGUG2Z a501c05809 fix(mac): the registry keeps inert copies of the application
BEHAVIOUR (cost only; nothing reads the registry yet except the unused
MacosBackend). Review finding 1.

Application::drop does a blocking Accessibility round trip (is_valid ->
copy_attribute_names) when is_observable, and invalidates the observer that
every clone shares if that fails. AxEntry held a clone of the Application, so
every register (which drops the entry it replaces), forget and forget_pid ran
that call, on the event thread with the window manager lock held, and an
unresponsive app made it slow or made it invalidate the observer of a live
app. Window::entry() now stores Application::inert(), a clone with
is_observable false, whose drop does nothing, and Window::from_entry therefore
builds windows with an inert application as well (it only affects Drop).

Tests (run on a Mac; the flag is plain data and needs no Accessibility
permission): a registered entry and a window made from an entry have
is_observable false even when the window's own application is observable.

Verified: macOS fake-CC type-check (tools/fast-check) PASS. Not verified: any
run. Verified on the Mini: not yet. Hand check: H3 of docs/dev/macos-handcheck.md.
2026-11-05 15:03:26 -08:00
LGUG2Z b680dbd31d test(kde): vm-commands brings the swept windows back before handover
Scenario precondition fix for the vm-commands failure "[shared] win3 is inside the work area and
not on a tile of the layout" (see the previous revision for the log evidence).

The shared sweep sends windows to other workspaces (send-to-last-workspace and the like), so
by the time handover ran, win3 was alone on workspace 0 and win1/win2/win5 were parked on
workspace 3. New KDE step bring_back, between replace_configuration and handover: while another
workspace of the first monitor has windows, focus it and send-to-workspace 0, then focus
workspace 0 and check that it has two containers or more and is the focused one. The handover
check is untouched.

Native pytest of the VM lib: 320 passed; ruff check and format clean. The step itself only runs
in the VM.
VM verification: not yet (vm-commands on baseline-with-fix and candidate, ~20 min each, after the
KDE VM run).
2026-11-05 15:03:26 -08:00
LGUG2Z c89c97a429 perf(windows): write komorebi.hwnd.json from a writer thread, not under the window manager lock
update_known_hwnds (at the end of every command) and the reaper opened,
truncated and wrote komorebi.hwnd.json with the window manager locked. They
now hand the list to reaper::save_known_hwnds, which keeps only the latest
pending list and writes it from a thread of its own; errors are logged there
as before (the reaper no longer returns the write error).

BEHAVIOUR: the file is written a moment after the lock is released, not before
the command returns, and when several updates arrive together only the last
list is written. Nothing in the daemon reads the file. Gate needed: Windows e2e
commands, lifecycle, and the lock stress. Verified: Windows clippy -D warnings
via tools/fast-check PASS; e2e not run.
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 839a22d905 refactor(kde): the workspace navigation commands are komorebi-core's
cycle_focus_workspace, cycle_focus_empty_workspace, close_workspace and
move_container_to_last_workspace of the KDE window manager call the
functions of komorebi_core::command (their bodies moved there, unchanged),
the FocusLastWorkspace arm is `self.focus_last_workspace()`, a new method
that calls the shared function, and WindowManager implements CommandHost by
forwarding to its own methods (KDE keeps the default of the pointer switch:
it does not look at the pointer for the empty, close and last commands).
No behaviour change.

Verified: KDE cargo test -p komorebi-linux (lite env, command_sweep and the
workspace command tests included): 678 passed, 0 failed. Not run: VM
suites.
2026-11-05 15:03:26 -08:00
LGUG2Z bdad4284a5 perf(windows): restart the komorebi-bar processes after replace-configuration without the window manager lock
replace-configuration ran the PowerShell that stops and starts komorebi-bar
(one to three powershell_script::run calls, each seconds) with the window
manager locked. The block is now fn restart_bars and runs on a thread of its
own, started after the new window manager is in place (the lock is released
when the command returns); its errors are printed as before, but no longer
returned to the client.

BEHAVIOUR: the command replies before the bars are restarted (a client that
waited for the bar to exist after replace-configuration must now wait for it),
and an error reading the config for the bar section is printed instead of
returned. Only affects a daemon that has a bar running. Gate needed: Windows
e2e commands and config_reload (no bar in the e2e), a manual check with a bar.
Verified: Windows clippy -D warnings via tools/fast-check PASS; e2e not run.
2026-11-05 15:03:26 -08:00