Repository navigation
Conversation
…Slint GUI workspace (Plan 188) A separately named frontend cannot launch the client daemon by using its own image: `gregg-gui --config … daemon run` exits immediately, and the readiness wait then times out and blames the daemon for a mistake the launcher made. `clientd::DaemonExecutable` and `ensure_running_with_executable` are now the single launch boundary. `ensure_running` is exactly `ensure_running_with_executable(store, &DaemonExecutable::Current)`, so the TUI keeps its own-image behavior and `probe`, `classify`, `rotate`, `wait_ready` and the config-specific launch lock are shared rather than duplicated. The three properties that matter: - the exact resolved absolute path is spawned, never a name from `PATH`; - the executable is proved usable before anything destructive, and the failure is raised only where a spawn is authorized, so an unusable helper can neither stop nor refuse a daemon that is already serving, and is reported before the stop of a daemon that is being replaced; - a frontend may never name itself: `DaemonExecutable::Path` refuses a path that canonicalizes to `current_exe()`. `verify_gregg_client_executable` adds the bounded positive identity check (`<exe> version` must answer `gregg <version>`) and `adjacent_daemon_executable` finds the installer-owned client beside a frontend. The rotation branch also had a latent defect: it stopped the stale daemon and then *attached* to the daemon it had just stopped, which can only fail, leaving the operator with a killed daemon and no replacement. Rotation is now one operation: stop, spawn the resolved executable, wait for readiness. `apps/gregg-gui` is a new *independent* Cargo workspace with its own lockfile and its own Rust 1.92 floor, because Slint 1.18 requires 1.92 and the five core crates keep their Rust 1.89 MSRV. The root workspace excludes it, so the MSRV CI job never sees Slint. Slint is pinned to `=1.18.1` with the minimal feature set, and the `Window` and the `SystemTrayIcon` are separate top-level components. The `gregg` library's cost in the GUI was measured rather than guessed: 747,936 bytes (+7.8%) over a Slint-only baseline, so no dependency extraction is required and none was written. No `greggd`, protocol, scheduler, cron, EggPool or TUI-rendering behavior changed, and the GUI opens no remote HTTP client.
The optional desktop frontend now exists as a real second way to *look* at
the fleet, never a second way to *poll* it.
Three layers, so every rule the GUI keeps is testable without a desktop
session:
* apps/gregg-gui/src/model.rs is a pure FrontendSnapshot -> GuiViewModel
projection. Absent is absent, unpolled is not offline, a missing value is
`—` and never `0`, and the selection is keyed by the stable system id.
* apps/gregg-gui/src/bridge.rs owns the client-daemon attachment and the
intents. It holds no HTTP client, no poll scheduler, no parsed remote
configuration and no history store.
* apps/gregg-gui/src/main.rs owns the Slint components and mutates them
only on the UI thread, through slint::invoke_from_event_loop. There is
no polling timer, so an idle GUI redraws for no reason at all.
A native SystemTrayIcon (exactly one Menu: a bounded fleet summary, Open
Monitor, Reload, About Gregg, Quit Gregg) sits beside an independent 560x520
monitor window showing the fleet, the selected host's metrics, drives and
interfaces, its scheduler jobs and records, and the EggPool plane. The tray
icon is procedural, light and health-coloured: a dark icon on a dark menu bar
is invisible, which is how a tray icon that "works" can still leave the
operator with no tray entry at all.
The EggPool and cron intents are desired state on a watch channel, so the
newest value wins, a rejected write is retried, and a reconnect republishes
the new *full* state. Closing the monitor window hides it and leaves the tray
running; Quit is the only thing that ends the GUI, and it never ends the
client daemon.
The scheduler and EggPool words move into gregg::cron and gregg::eggpool and
the TUI's own renderers call them, so the two frontends cannot drift about
what "load delayed" or "authentication required" mean. The TUI's output is
unchanged.
The native macOS run found a real defect, and it is fixed: a tray
application is a *background* application, macOS does not activate the app
that owns an NSStatusItem menu, and a background app cannot bring its own
window to the front. A GUI launched the way a real one is launched would
therefore have shown nothing at all for "Open Monitor". apps/gregg-gui/src/
platform.rs now activates the application before raising the window, through
macOS-only objc2/objc2-app-kit bindings; Windows and Linux are a no-op.
Verified: 48 GUI tests, 25 launcher tests, clippy and fmt clean, and a real
macOS desktop run in which the tray is present, Open Monitor raises the
window to the front, Reload polls immediately, About renders the Slint
royalty-free attribution, Quit leaves the client daemon polling, and the GUI
process opens no network connections of its own.
Co-Authored-By: MiniMax-M3.1-Flash <MiniMax-AI@users.noreply.github.com>
…kaging (Plan 190) The blocking gate was a *counted* proof that attaching more frontends to one config does not change what the client daemon asks the remotes for. Prose is not evidence, so apps/gregg-gui/src/evidence.rs stands up two counted greggd-shaped remotes -- one serving the scheduler routes, one answering 404 for them because it is an older daemon -- a real client daemon, a terminal-style frontend, and the real GUI Bridge, and compares per-route hit counts at defined points. The result: /v2/status is flat at four polls per window in every phase (daemon alone, with the TUI, with the TUI and the GUI, and after both frontends closed). An opened cron job grew the local IPC document 1903 -> 2276 bytes and left the remote's history fetch at the one discovery fetch. The EggPool pane drove one daemon-owned worker on the converged window -- 7d was asked for, 30d never -- and stopped asking the remote when the last pane closed. The daemon outlives its frontends and hands a reattacher the newest document. The measured numbers are recorded in apps/gregg-gui/EVIDENCE.md, together with an explicit list of what the harness does not prove. The same claim was measured natively on this host against 25 synthetic endpoints, with the measurement window aligned to the daemon's own start so every configuration is sampled over the same phase of the poll cadence: 375 /v2/status and 39 /v2/scheduler requests in *every* configuration -- daemon alone, daemon plus GUI tray-only, daemon plus GUI with the monitor visible. The GUI adds nothing to the remote request budget. Footprint, with the repository's own release profile: gregg-gui is 9,776,560 bytes stripped against a purpose-built Slint-only baseline of 8,929,216 bytes -- the same features, the same main.slint, the same activation code, no gregg -- so everything the GUI adds over a pure-Slint build of the same UI is 847,344 bytes (+9.5%). gregg and greggd are unchanged and carry none of it. The resource decision is accept: about 0.65% of one core, 72-83 MB resident (almost all of it Slint's renderer, not the protocol's), and the daemon's wakeup delta with a frontend attached is about 44/s, which is the 20 ms per-frontend poll the daemon already documents. The measurement was noisy enough that a current-thread versus multi-thread runtime A/B was inconclusive, so the runtime shape was left unchanged -- a change the measurement cannot distinguish from noise is not a change. The packaging decision is source-build-only: no installer, no bundle, no release asset. The GUI requires an existing Gregg installation, never bundles a second gregg, resolves its client through an explicit --gregg with an identity probe or an installer-owned adjacent binary, and is named gregg-gui so it can never overwrite gregg or greggd. The Slint royalty-free attribution is verified present in the shipped release binary, not only in the source. Windows and Linux native acceptance are NOT performed and are recorded as such: they need a Windows host and a Linux desktop session with a StatusNotifierItem host. Those two targets are not shippable on the strength of this plan, which is consistent with keeping the GUI a source build. Co-Authored-By: MiniMax-M3.1-Flash <MiniMax-AI@users.noreply.github.com>
… (Plan 187) Plans 188, 189 and 190 are closed, so the roadmap that sequenced them is closed too -- but not by ticking every box. What this closes is the part the roadmap was actually for: every invariant it set out is now checked against evidence rather than intent, and the evidence is named per invariant. The request budget is flat in every phase, proven deterministically by the counted harness and natively on 25 hosts. The cron intent grows only the local IPC document. The EggPool pane runs on the converged window of the attached frontends' intents, not because a tray exists. Generations are monotonic, missing values keep None semantics, and an unsupported scheduler is not a host outage. The launcher's ownership rules are unchanged and green. A GUI exit never stops polling. And the Rust 1.89 core, the TUI, the headless release path and greggd's footprint are all unchanged -- greggd's stripped binary is the same size it was. What is NOT closed is the three-desktop-platform demonstration. Only macOS was exercised: a Windows run needs a Windows host, and the repository's own rule is that only a native Windows run is authority. A Linux tray run needs a desktop session with a StatusNotifierItem host, plus the plain-GNOME fallback case. Those two targets are therefore not shippable on the strength of this line, which is consistent with the packaging decision -- the GUI stays a source build with no installer, no bundle and no release asset. That is recorded as unchecked rather than claimed. The user docs get the GUI section, so an operator reading the client documentation can find it and knows what it requires and what state it is in. Co-Authored-By: MiniMax-M3.1-Flash <MiniMax-AI@users.noreply.github.com>
…e GUI's CI (Plans 187-190 corrective pass) The GUI line was closed with the Windows and Linux native acceptance recorded as "not performed". A corrective pass found that the closure described the *evidence* accurately and the *code* inaccurately: one target was broken and one requirement had never been implemented. 1. The Windows build of the `gregg` crate did not compile. The `#[cfg(windows)]` branch of `is_executable_file` in `crates/gregg/src/clientd/launch.rs` asked `std::fs::Metadata` for its `extensions()` -- a method that does not exist; a *path* has an extension and metadata does not. The branch was never compiled on the machine that wrote it, so the whole crate failed to build on Windows and the Windows CI job was red for every commit of the line (run 39628897811). The GUI could not have been built for Windows either, because it depends on that crate. The executable test now asks the path for its extension and applies the rule Windows itself applies when it is handed a path to run: a name with no extension is runnable, because Windows appends `.exe` to a name that carries none, and a name with an extension is runnable only when that extension is one Windows runs. The adjacent-client lookup prefers `gregg.exe` over a bare `gregg` on Windows. The behaviour is locked by Windows-gated tests that run on the native Windows job. 2. The no-tray fallback the native matrix required was never implemented. On Linux the tray is a `StatusNotifierItem` and the desktop has to run a host for it; a plain GNOME session has none, and Slint fails to register silently. The GUI hid its only window on close, so on such a desktop it left an invisible, unquittable process with the daemon still polling. The GUI now asks the desktop whether it has a tray (on Linux, whether `org.kde.StatusNotifierWatcher` has an owner on the session bus -- exactly what Slint's own ksni backend requires), reports the answer in one machine-readable line, shows the operator what is going on, and closes by quitting rather than hiding when there is no tray. The probe is bounded and re-run at close time, because a tray host can start after the desktop session is up. The classification, the close decision and the status line are pure functions, so both branches are unit-tested without a desktop session. 3. The monitor window's lists did not scroll. The host list and the scheduler job list were unbounded, so a 25-host fleet pushed the metrics, cron and EggPool panes out of the fixed-size window. Both are now in scroll containers with bounded heights, vertical scrolling only, with the row text kept clear of the scrollbar. 4. The GUI workspace had no CI at all. It is a separate Cargo workspace with its own lockfile and its own toolchain, and the root workspace excludes it -- so no root job built or tested it, which is how (1) and (2) both shipped unnoticed. One job now formats, lints, tests and release-builds it on macOS, Windows and Linux natively, and exercises the tray on the Windows and Linux legs: against a real StatusNotifierItem host on Linux, and a native window plus a native tray start on Windows. `scripts/check-gui.sh` runs the same checks locally. The plan closure language is reconciled with the above: the records now distinguish what was unverified from what was broken, and the interactive native runs are still outstanding and still not claimed. Verified locally: GUI 63 tests pass, clippy clean with -D warnings, fmt clean; core launcher 25 tests pass; the Windows branch compiles and is clippy-clean under a mingw cross-check; shellcheck and the YAML parse pass; the root workspace still has exactly five members. The footprint was re-measured against a rebuilt matched baseline: the GUI grew to 10,803,360 bytes and the baseline to 9,956,032 bytes, so the difference the GUI adds over a pure-Slint build of the same UI is 847,328 bytes against 847,344 before -- the growth is the scroll widget's style assets on both sides.
…ercise run on Linux The first run of the GUI's own CI job (run 39647073131) found two things no root job could see, which is the job earning its place. 1. Windows: the GUI's test code did not build there. The counted proof in `src/bridge.rs` speaks the Unix socket protocol directly, so it and its helpers are Unix-only -- but the module was compiled on Windows, where every helper is dead code, and the job compiles the tests with `-D warnings`. Dead code is a build failure there. The module is now gated `#[cfg(all(test, unix))]` as a whole rather than item by item, and the one helper in the qualification harness that only the Unix-only proof uses is gated with it. Reproduced and fixed locally against a Windows target before pushing. 2. Linux: the tray exercise ran the real D-Bus protocol, the real StatusNotifierItem host and the real GUI, and the GUI printed `gregg-gui: tray=available` against a live session bus -- and then panicked opening its window, because the runner had `libxkbcommon-dev` but not the X11 variant. The CI job now installs `libxkbcommon-x11-0` and `libxkbcommon-x11-dev`. The same run turned the core **Windows job green for the first time in this line's history**, which is the native proof that the `Metadata::extensions()` break is gone. Verified locally: GUI 63 tests pass; the GUI workspace is clippy-clean and fmt-clean for the Windows target under a mingw cross-check with `-D warnings`; the root workspace's fmt is clean; the workflow YAML parses.
…ssing daemon
The first green Windows run of the native exercise (CI run 39650126619)
printed "PASS every Windows tray check" while the daemon status it had
just read said:
client daemon <id> not running at <pipe>: no client daemon is
listening for this config
The pattern was `client daemon .* running `, and `.*` spans the word "not",
so "not running" matched it. A check that cannot fail is worse than no
check: it turns a missing daemon into a green run.
Two things were wrong and both are fixed:
* the pattern now matches the running form and cannot match the other
one. The running form is "client daemon <id> running (protocol <n>,
version <v>) at <endpoint>"; the parenthesis after "running" is what
tells the two apart. The script also fails outright if the status
contradicts itself.
* the check now WAITS. The daemon is a process the GUI spawns, so it is
not listening a few hundred milliseconds after the GUI starts; the
first version asked once, immediately.
And a second, stronger check replaces the assumption that "the daemon is
running" means "the GUI is attached to a working daemon": the exercise
now waits for the fleet fixture to have served a request, which is the
end-to-end evidence — GUI -> client daemon -> remote.
The script's syntax and the new pattern were checked with a real
PowerShell 7.6.7: it parses, it matches the running form, and it does
not match the "not running" form (the old pattern did).
…s well as in the window The Windows native exercise found a real problem: the GUI starts, prints its tray line and creates a native window, but the client daemon it launches never comes up on Windows. The reason was invisible, because the GUI reported it only in the window (nobody is looking at a background window) and the launcher starts the daemon with every standard stream null (so the daemon cannot report it either). Two changes so the next run can answer the question: * the GUI prints the attachment failure to stderr as well as showing it in the window, which is what an operator needs when the GUI is launched in the background; * the Windows exercise runs the client daemon in the foreground for a few seconds first and reports what it says, which separates "the daemon is unhappy on this platform" from "the GUI starts it wrongly", and it prints the GUI's own output when the daemon check fails. 63 GUI tests pass; clippy and fmt clean.
The Windows client daemon binds a named pipe, and the whole pipe namespace is a device namespace, not a filesystem. The launch-lock path was derived from the endpoint, so on Windows it was a path under the pipe namespace - one no file can ever be created at. Opening it asks for a pipe instance with that name and fails with ERROR_FILE_NOT_FOUND, so the launcher could never take the lock and failed before it ever got as far as spawning a daemon. That is why the GUI's Windows exercise found the client daemon it launched never coming up, and the same wall stopped the terminal client from ever launching one on Windows: `gregg daemon status` reported the daemon as not running, and the GUI reported that it could not read the launch lock. The Windows lock is now a real file beside the config, named after the same identity digest, so both platforms keep the same properties: one lock per config, never the config mutation lock, and a path a file can actually be created at. The Unix path is unchanged. The Windows rules now live in their own `#[cfg(all(test, windows))]` module. The Unix suite is `#[cfg(all(test, unix))]`, so the `#[cfg(windows)]` tests that were written inside it never compiled on Windows and never ran - which is how the executable rule, and then this lock, both reached a merged branch unexercised. Six Windows tests now exist and run natively: the three executable rules, and three that pin the launch lock - that it is not in the pipe namespace, that it is a file which can really be locked, and that it stays distinct per config and from the config lock. The Windows native exercise now also proves the CORE launch path, before the GUI is started at all: `gregg daemon restart` takes the lock, spawns a daemon and waits for it to answer, `gregg daemon status` identifies it through the daemon's own handshake, and `gregg daemon stop` releases it. That is the path the terminal client takes, and it was the path the defect broke. The daemon is stopped again afterwards, so the GUI that follows still has to launch a daemon of its own and the "the fixture served a request" check stays a proof about the GUI's own daemon.
The new core-launch check in the Windows native exercise hung: the command finished, and the PowerShell pipeline it ran in never returned. The reason is a real property of the Windows spawn, not of the check. Rust has to pass the three null stdio handles to the child, so it creates the process with `bInheritHandles = TRUE`, and Windows then hands the child *every* inheritable handle the parent holds, not only the three standard ones. The daemon therefore kept the launcher's stdout pipe open, and the pipe never reached EOF: the daemon outlives the launcher by design, so the reader waits forever. On Unix this cannot happen: `Stdio::null()` there really is `/dev/null`, and no descriptor of the launcher's is inherited. The launcher's own comment claimed the daemon "must not inherit a pipe that would keep a parent waiting" - true on Unix, false on Windows. The comment now says so, and the defect is recorded as outstanding in the plan closure records, in the GUI's evidence file and in the CHANGELOG, rather than quietly worked around: it needs a handle list (`PROC_THREAD_ATTRIBUTE_HANDLE_LIST` through `STARTUPINFOEX`), which the standard library does not expose, so it means `windows-sys` plus `unsafe` code in the launcher, which the repository's unsafe allowlist does not cover. The GUI is not affected - its standard streams are a console or a file, never a pipe - and neither is the terminal client in normal use. The exposure is a CLI command that spawns the daemon with a piped stdout, such as `gregg daemon restart | tee log`. The exercise now redirects that one command's output to a file, which is the correct way to run a command that spawns a detached child on Windows. This commit also records the rest of the corrective pass in the plans, the architecture deep dive, the skill, the READMEs and the CHANGELOG: the Windows launch-lock fix, the `#[cfg(all(test, windows))]` module that makes the Windows launcher rules run where they apply, and the outstanding handle-inheritance defect above.
… pipe The second attempt at the Windows core-launch check hung in the same place, so the redirection was the problem, not the command. PowerShell's `*>` redirection still hands the child a pipe and copies it into the file, so the daemon's inherited write end kept that pipe open and the redirection never finished. `Start-Process -RedirectStandardOutput` passes a real file handle instead, so there is no EOF to withhold - which is why the GUI below, which also spawns a daemon, has always been started that way and never hung. The command is now started with Start-Process, its output goes to files, and the script waits for it with an explicit 90-second deadline. That deadline matters on its own: a check that cannot fail is worse than no check, and a check that hangs the step for fifteen minutes tells nobody what went wrong. A timeout now reports itself in one line. The local PowerShell mechanics - Start-Process, file redirection, the exit code, and reading the file again while the detached child still holds it - are checked on this host; whether Windows' own handle inheritance is dodged by the file handle is what the native Windows job answers.
Plan 190 claimed to be complete while its own native-platform acceptance gate was still unchecked, and the outstanding work was carried in a parenthetical instead of being listed. The status is now "implemented, pending release qualification", and a new "Release qualification" section states what is outstanding: the interactive native acceptance per target (a visible Windows notification-area icon, a real GNOME session, the macOS Intel build and a recorded DPI measurement), the Windows handle-inheritance defect that is recorded but not fixed, the footprint as a release-time question rather than a defect, and the vendored annotate-snippets patch as recorded dependency debt. Two records also disagreed with the evidence and are reconciled here: - Plan 190 and the plan index still carried the pre-corrective-pass footprint pair (9,776,560 bytes against an 8,929,216-byte baseline) while the GUI README and EVIDENCE.md carried the re-measured pair (10,803,360 against 9,956,032). The scroll container grew both binaries and the difference stayed put at 847,328 bytes, so the plan now reports the current figures with the earlier pair and the reason. EVIDENCE.md records the earlier pair too, and Plan 189's record points forward instead of leaving two numbers in one file. - The plan index put the GUI's resident memory at 77-98 MB; the closure record and the GUI README both say 72-83 MB. The status is propagated to Plan 187, the plan index heading, the registry rows, the scope record, the GUI README, architecture/gregg-client.md, the CHANGELOG and the client skill. No code changed.
Plan 191 records the product direction taken in review: one tray pulldown instead of a separate monitor window, carrying all the current metrics, and host add/remove/edit in that same panel. Its framework review retains Slint 1.18.1 and records why. Slint 1.18.1 is the latest published release, so there is nothing newer to move to. It is the only Rust option with a first-class native tray, and the tray is the part of this product that cannot be done without: the alternative (egui plus tray-icon) replaces a native tray with a hand-rolled one on three platforms. The measured footprint is the software renderer's rather than the window's - a pulldown does not make the process lighter, so trading Slint's native tray for egui's smaller binary would buy little and cost the tray. The egui route would also raise this workspace's toolchain floor from 1.92 to 1.95 (egui 0.37; 0.36+ needs 1.95 too). Host management goes through the CLI's own library code - gregg::cli:: dispatch against the same ConfigStore - so the endpoint grammar, validation, config lock and atomic write are inherited unchanged, the daemon is reloaded at its own reload boundary, and no protocol change and no second poller is involved. An endpoint change is presented as a replacement rather than an edit, because the endpoint is part of the host's identity and its stable id. Two limits are recorded rather than hidden. Slint's SystemTrayIcon cannot anchor a custom panel to the tray icon, so the pulldown opens from the native tray menu and is positioned next to it. And Slint 1.18 exposes no focus-lost event, so the panel is dismissed with Esc, the tray toggle and its close control rather than by clicking away. The plan is registered in the index with an active scope record, and the GUI README points at it. No code changed.
dbowm91
force-pushed
the
plan/slint-gui-clientd
branch
from
October 22, 2026 05:17
c41ad0a to
8e169ea
Compare
…gement Plan 191. The GUI's separate monitor window is gone: there is now one borderless, always-on-top panel that opens from the native tray menu and carries every pane the window carried — the fleet summary, the host list, the selected host's metrics, drives and interfaces, its scheduler jobs and retained records, and the EggPool plane — with the lists bounded and scrollable so a large fleet cannot push the cron and EggPool panes, or the buttons, out of the panel. The panel can now add, remove, rename and re-point hosts, which the GUI could not do: it writes the configuration file through the CLI's own library code against the same ConfigStore, so the endpoint grammar, the config lock, the whole-config validation and the atomic write are the CLI's, unchanged. A refused mutation leaves the file byte-identical and says why in the panel. An endpoint change is presented as a replacement — the endpoint is part of a host's identity — so the confirming button says so and the host's identity changes with it; a rename is in place and keeps the identity. The panel is a second writer of the configuration file, never a second writer of fleet state: the client daemon remains the only poller, and DaemonRequest gains no message. The write path is gregg::cli::add_host and remove_host rather than gregg::cli::dispatch. They are the paths `gregg add` and `gregg remove` take, and the dispatcher now goes through them, so the CLI's behaviour is unchanged; they are separate because the broad entry point also reaches the daemon commands, and the daemon reaches the HTTP client and its TLS stack, which measured 2,864,992 bytes of unused machinery in the GUI. The panel is dismissed by Esc, the tray's Open Gregg entry and its own Close control. There is no click-away dismissal, because Slint 1.18 exposes no focus-lost event; that limit is stated in the documentation rather than papered over. The key handler wraps the whole panel rather than sitting beside it, because Slint routes a rejected key up through the focused item's ancestors and a text field rejects Esc. It is anchored to the trailing edge of the display, on the side where the desktop's shell lives, clamped so it cannot open off the screen, and it keeps the position and size the operator gave it — a borderless panel carries its own header strip to drag it and its own corner grip to resize it. Its colours come from Slint's Palette and its buttons and text fields from std-widgets, so they have the hover and pressed states a popover needs. The GUI's Slint dependency gains the unstable-winit-030 feature: the slint::winit_030 module is the only way to ask the display for its bounds, and the winit backend was already in the build, so it adds no crate and no code — the lockfile is 604 packages before and after. Two Windows-only Clippy failures are fixed in the same pass, both found by a local cross-check rather than by the native job: the anchor enum's variant that the platform does not construct is dead code there, and the store's error type carries a toml::de::Error, which is larger on Windows and trips result_large_err on a closure over it. The root workspace has allowed that lint for the same reason since Plan 040; here the test writes the whole configuration instead of mutating it, so no allowance is needed. Release binary 11,896,608 bytes, against 10,803,360 before this change. The font and SVG stacks std-widgets brings did not grow at all, because the scroll container had already paid for them; what the Button and the LineEdit add is 418.5 KiB of generated widget code. Plan 191 is implemented, pending native interactive acceptance: the interactive acceptance gate is unchecked, exactly as Plan 190 leaves it, so the GUI stays a source build and Windows and Linux stay unshippable.
dbowm91
force-pushed
the
plan/slint-gui-clientd
branch
from
October 22, 2026 05:22
8e169ea to
0022d0b
Compare
added 5 commits
October 22, 2026 05:31
Plan 191's closure record now names the three failures that only a native Windows job could have found, and how each was fixed: the dead-code allowance on the anchor enum, the large-error lint solved by changing the test rather than silencing the lint, and the shell-strip test made platform-agnostic by taking the anchor as an argument. Two were caught by a local Windows cross-target Clippy run, which is a development aid and not closure evidence; the third was caught by the native Windows CI job, which is the authority.
Run 39727675355, against the implementation commit 0022d0b, is green on all ten jobs: the seven core jobs including the Windows one, and all three GUI legs, which are the only authority for the GUI workspace's Windows and Linux behaviour because it is not a root workspace member. The plan's closure record, the plans registry row and the GUI evidence file now name the run, the two earlier runs that failed and what they failed on, and the fact that the interactive native acceptance gate stays unchecked.
The gate list was still every box unchecked while the plan's own gate table marked nine of the ten as met, which read as if nothing had closed. Each gate now carries its evidence the way Plans 189 and 190 do. Only the interactive native acceptance stays unchecked, with the reason it was not performed and the consequence: Windows and Linux are not shippable and the GUI remains a source build.
…itor" The pulldown replaced the monitor window, so the current-state descriptions named a window that no longer exists and a tray item that now reads "Open Gregg": the root README's GUI section, the GUI README's activation, no-tray and dependency notes, and two source comments. The recorded Linux transcript in EVIDENCE.md is left verbatim — it is what run 39650126619 printed — and now says so, with a note that the label changed. The exercise records the menu labels it observes rather than asserting on them, so a fresh transcript appears in the GUI job's log on every push.
The tray's native menu was a *launcher* for a separate window, so the content
was not in the dropdown and the window holding it read as a small application
rather than a popover. Plan 191 wrote that decision into its own source: "the
panel is the surface that carries the whole fleet". It came from the Plan 187
roadmap's premise, which was half true -- a native menu cannot host arbitrary
Slint content -- and drew a conclusion that does not follow.
Slint's `SystemTrayIcon` also has a `clicked` callback, and a native menu with
no entries detaches itself, so the platform routes the tray's click to that
callback instead of popping the menu: on macOS, on Windows, where a right-click
still opens the native menu, and on Linux. The `if cond : Menu { ... }` form
was verified by compiling it. So the direction is: the tray's *click* opens the
pulldown, and the pulldown carries the content.
Plan 192 records that, with the per-platform citations, the limits that remain
(the tray item's position is not exposed, a native menu cannot host Slint
widgets, there is no click-away dismissal, Linux's gesture is the desktop's
choice), and the two defects the same run found: the panel is never positioned
on the startup path, because `with_winit_window` only succeeds from the event
loop, and its geometry is not kept across a restart.
The planning system is reconciled around the new direction: Plan 191, 190 and
187 carry banners and in-place amendments instead of the launcher model, and
Plan 191's footprint figure is corrected -- the recorded "72-83 MB resident" is
`ps` RSS, which on macOS is dominated by shared reclaimable pages, and the
physical footprint is 26-28 MB.
No product code, protocol, dependency or CI change.
dbowm91
force-pushed
the
plan/slint-gui-clientd
branch
from
October 23, 2026 06:04
ebc0686 to
62e74f9
Compare
CI run 39909338640 on 62e74f9 is green on all ten jobs, including the three GUI legs. The local condition on this macOS host is recorded with it: the root crate's lib tests fail 13 to 17 tests per run on this host, in the eggpool worker races, the clientd::ipc temp-directory path and the timing-sensitive scheduler::fleet_scaling_* tests, and the branch's state before this work fails 13 in the same session. The GUI workspace's own suite is 150 passed and its clippy is clean. The plan's header block gains the fourth amendment — the detail view is the fleet view's own block and the window waits for the operator — and the section it introduces is renamed from "third" to "fourth", which it collided with: the header block's third amendment is the fleet view's table of blocks, from the earlier work.
dbowm91
force-pushed
the
plan/slint-gui-clientd
branch
from
October 23, 2026 07:38
d1b357a to
eaae797
Compare
The tray's click did nothing over another application's full screen, and it was not new: since the pulldown existed, the click reached the tray, the pulldown was built and placed, and the operator saw nothing happen — and the full-screen application was dropped out of its space on the way. macOS has two rules behind it. A full-screen application owns a **space** of its own, and a window that is not in that space is not on the screen at all. And macOS keeps a **Dock** application's windows out of another application's space, and that right is **fixed when the window is created**: no window level and no collection behaviour changes it. The GUI was a Dock application, because `winit` sets `NSApplicationActivationPolicyRegular` for an unbundled binary. So the GUI is now a **menu-bar-only** application. It installs the `Accessory` activation policy before any window exists, through winit's event-loop builder, which is where the desktop makes that decision itself. The pulldown's **native window** is then told to join every space (`CanJoinAllSpaces`, `FullScreenAuxiliary`, `Stationary`, `IgnoresCycle`), to stay visible when the application is deactivated, and to sit at `NSPopUpMenuWindowLevel` — the level a native status item's own menu is drawn at. `always-on-top` was not enough: it reaches only the floating level, and the floating level is below full-screen content. The native window is found by its **title**, and that title is **owned by the `.slint` file** — bound to a property the Rust side reads — so the two cannot drift apart. A title that lived in two places would be a title that could drift, and the overlay would silently stop working. Verified natively on macOS 15 (arm64) with TextEdit in full screen: before, the pulldown's window was `onscreen=false` in another Space and the display left the full-screen space; after, TextEdit is still `1512x949` on screen and the pulldown is on screen above it at level 101. The ordinary desktop path, `Esc`, `--panel` and the idle resident set (35.1-36.2 MB) are unchanged. Two visible consequences are deliberate: the GUI has **no Dock icon** (`lsappinfo` reports it as a `UIElement`, where a normal app is `Foreground`), and the menu bar stays the other application's — which is what a native menu-bar extra does. The menu bar itself is still macOS's business: it is hidden in full screen, and the pointer at the top of the screen brings it back. The whole change is inside `#[cfg(target_os = "macos")]`: the protocol, the TUI and the daemon are untouched.
dbowm91
force-pushed
the
plan/slint-gui-clientd
branch
from
October 23, 2026 08:05
eaae797 to
d0cd31c
Compare
added 25 commits
October 23, 2026 08:17
The implementation is `d0cd31c`; CI run **`39922180617`** against it is green on all ten jobs — the core `Linux`, `macOS (macos-15)`, `macOS (macos-15-intel)`, `Windows`, `Scripts`, `MSRV` and `FreeBSD` jobs, and the three `GUI` legs (`macos-15`, `windows-2022`, `ubuntu-latest`). The `GUI` legs are the only authority for this workspace's Windows and Linux behaviour, because the workspace is not a member of the root workspace and no root job compiles it. Recorded here, and not in the implementation commit, the way this repository records a run: the run is evidence about the commit that is already pushed.
The GUI README's "Status" list is the short answer to "what exists", and the pulldown's reach over another application's full screen is part of the answer now: the GUI is a menu-bar-only application, and its window joins every space and sits at the level a native status item's own menu is drawn at. The long form is in "Another application's full screen", which this links to.
The `GUI (ubuntu-latest)` leg failed once with "the GUI never reported where it put the pulldown", and the GUI's whole output was `gregg-gui: tray=available`. The Linux exercise read the GUI's transcript **once** and looked for the placement line, and the line had not arrived yet: the pulldown's native window is created on the event loop's own terms, so the line comes when it comes. The re-run of the same commit passed, and the two runs before it passed — and the code the leg exercises was byte-identical in all of them, so this was the harness's timing and not the GUI's. A check that depends on the machine being idle is a check that fails at random. The exercise now **waits** for the line, within the budget it already has — which is what the Windows exercise already did, so the two now behave the same way. Nothing is weakened: the line is still required, and a GUI that never prints it still fails.
The implementation is `d0cd31c` and the harness fix is `22e1bce`. CI run **`39927427831`** against the latter is **green on all ten jobs** — the core `Linux`, `macOS (macos-15)`, `macOS (macos-15-intel)`, `Windows`, `Scripts`, `MSRV` and `FreeBSD` jobs, and the three `GUI` legs (`macos-15`, `windows-2022`, `ubuntu-latest`). The implementation itself, `d0cd31c`, was green on all ten jobs on run **`39922180617`**. The `GUI` legs are the only authority for this workspace's Windows and Linux behaviour, because the workspace is not a member of the root workspace and no root job compiles it. Recorded here, and not in the implementation commit, the way this repository records a run: the run is evidence about the commits that are already pushed.
The tray's click opened the pulldown, and it opened far to the left of the
tray — in the middle of the desk, on a display where the tray was at the far
right. The question was whether the GUI hardcodes a pixel for its placement
or accounts for the display's size. The answer: the anchor accounted for the
display and the remembered placement did not, and the remembered placement
won.
The placement was remembered as an absolute position in logical pixels
(`position=844,65`), measured on a 1512-point laptop display, and a
remembered position was allowed to win over the anchor. The operator then
moved to a 3840x1080 display, whose trailing corner is at 3226, and the
pulldown opened at 844 — 2382 points from the tray: on screen, the right
size, and nowhere near the icon whose click opened it. The error did not
look like an error, which is what made it worth fixing.
What is remembered is now an offset against the display's own anchor corner:
the gap at the trailing edge, and the gap at the edge the pulldown hangs
from. An offset means the same thing on every display, at every scale, on
either side of a resolution change. It is measured to the panel's edges, so
the pulldown grows away from the corner it hangs from.
The file's older `position=` key is not read. A place on the display it was
measured on cannot be carried to a display it was never measured against,
and reading it would reproduce the very defect the offset exists to fix. A
file that says only `position=` is read as no placement at all, so the
one-time cost of the change is that an operator who had dragged the pulldown
on another display finds it back at the corner.
The offset is measured against the position the GUI asked for, never against
the position the window reports back. In another application's full-screen
space macOS draws the window 26 points lower than it was asked to be, and a
placement measured from the window's own report would carry that shift into
the memory: the pulldown would open a little lower every time and never
come back. The drag's base is the requested position for the same reason.
Measured natively on macOS 15 (arm64), on the 3840x1080 display:
before: pulldown=placed x=844 y=65 width=606 height=478 area=8,36,3824x1036
after: pulldown=placed x=3226 y=36 width=606 height=478 area=8,36,3824x1036
and the drag round trip, with the file holding the gap rather than the
place:
drag: 3226,36 -> 3026,36
file: offset=200,0
restart: pulldown=placed x=3026 y=36 width=606 height=478 area=8,36,3824x1036
The GUI workspace's own suite is 158 passed / 0 failed (153 before, plus
five new tests over the offset's arithmetic and the file's format), clippy
is clean under -D warnings, and the release binary is 11996080 bytes.
The rule that the drag's base is where the GUI *asked* for the window to be — never where the window reports itself to be — lived in the middle of a Slint callback, where nothing could say so. It is now `UiState::drag_panel`, which takes the base as an argument and returns the new position, so the rule is in one place and two tests can state it. The first test says the placement a drag leaves behind is a *relative* one: the gap at the trailing edge, not a place, and the same gap on a display of another size. The second says the space's own shift — macOS draws the window 26 points lower than it was asked to be in another application's full-screen space — does not walk into the remembered placement. Nothing about the behaviour changes: the same placement, the same file, the same position. The GUI workspace's own suite is 160 passed / 0 failed and its clippy is clean under -D warnings. One test in that suite, `evidence::the_eggpool_view_converges_one_daemon_owned_worker`, failed on one of eleven local runs; it drives the *daemon's* EggPool worker, and the core's own eggpool tests fail 13 tests on this host right now (three runs in a row), so the condition is the daemon's and not this line's. The CI run against the previous commit is green on all ten jobs.
The `GUI (windows-2022)` leg of CI run `39966757278`, against `4e7c073`,
failed on the two tests this line added — and the failure is exactly what the
log says:
a_drag_remembers_a_relative_placement
left: Some(Offset { x: 200.0, y: 560.0 })
right: Some(Offset { x: 200.0, y: 0.0 })
a_drag_does_not_carry_the_space_s_shift_into_the_placement
left: Some(Offset { x: 0.0, y: 520.0 })
right: Some(Offset { x: 0.0, y: 40.0 })
The trailing gap — the `x` — is right on both. The vertical gap is measured
from the edge the pulldown hangs from, and that edge is the **bottom** on
Windows: the taskbar is at the bottom, and the pulldown opens upwards from
it. The tests assumed the macOS and Linux anchor, the top.
They now say what is true on every platform: the trailing gap is the gap at
the trailing edge, and the trailing edge is the right edge everywhere; the
offset describes the position the drag produced, measured against the
platform's own anchor; and the remembered placement is *not* the one the
window's own report would give, which is the space's shift.
The anchor was verified the only way it can be without a Windows host: the
`Anchor::for_platform()` branch was flipped to the Windows one locally and
the suite was run, and both tests pass under it.
Nothing about the behaviour changes. The GUI workspace's own suite is 160
passed / 0 failed and its clippy is clean under -D warnings.
The implementation is `7c19581`, the refactor that put the drag's rule in one named place is `4e7c073`, and the fix for what that refactor broke on Windows is `fd11201`. CI run **`39968561479`** against the last is **green on all ten jobs** — the core `Linux`, `macOS (macos-15)`, `macOS (macos-15-intel)`, `Windows`, `Scripts (shellcheck + pytest)`, `MSRV (Rust 1.89)` and `FreeBSD (gregg-host native)` jobs, and the three `GUI` legs (`macos-15`, `windows-2022`, `ubuntu-latest`). The implementation itself was green on all ten jobs on run **`39963924905`**. The run in between, **`39966757278`** against `4e7c073`, **failed** the `GUI (windows-2022)` leg, and it is recorded rather than forgotten: the two tests that commit added assumed the top anchor, and Windows hangs the pulldown from the bottom, where the taskbar is. The trailing gap was right on both; the vertical gap was not. The fix is `fd11201`. The `gregg-client` skill now carries the third placement trap beside the two it already had, because the rule is the one an agent is most likely to undo: what the GUI remembers must be an offset against the display's own corner, and it must be measured against the position the GUI *asked* for. Recorded here, and not in the implementation commit, the way this repository records a run: the run is evidence about the commits that are already pushed.
The panel had a band of dead space between the fleet's title and the first host, and the title itself said far too much. The gap was not margin. A Slint layout adds its spacing between *every* cell, and a cell that is empty still takes part in the layout: the body's first three cells — the attachment's state, the last action's message and the tray's warning — were all empty on a healthy fleet, and each of them still took a six-point gap. Eighteen points of nothing, on every panel. The notices are one cell now, and it takes no room at all when it is empty; the body's own spacing is zero and every group carries the gap that follows it; the attribution is the last group in every view, so the gap above it is the only gap it needs; and the title strip and the body's top padding are smaller, because the space between the title and the first host is a gap and not a margin. Measured on the same fleet: the gap between the title's ink and the first host's name went from 45 points to 19, and the panel from 478 points tall to 446 — which is exactly the height the Rust computes for it. The title says `7 online` now, and names the hosts that are not answering only when there are any. It used to carry three counts and a list of names that was elided away on any fleet of any size. The corner square is gone too: the hairline square in the bottom-right corner was the grip that resized the panel, it looked like a button and it did nothing anybody could see — and the size it controlled was a size the operator could set once and never change again. The pulldown's size is its content's size, always, and the state file holds a placement and nothing else. The footer's links now sit six points off the card's bottom edge, so a row of links does not read as cropped.
The GUI's Linux CI leg failed on `bridge::tests::an_explicit_client_must_identify_itself` with `Text file busy (os error 26)`: the test writes a `/bin/sh` stub with `fs::write` and the identity probe `execve`s it a moment later, and on Linux that close-to-exec boundary intermittently fails under load. This is the repository's known ETXTBSY flake, root-caused twice already — in plans 161 and 167, where the repair was deferred because it belonged to another crate. Here it belongs to this branch's own crate, so the repair is applied here, and it is the repair those plans name: retry. The retry is test-only. Nothing in the product changed: the GUI reported the failed spawn as a diagnostic, which is the correct behaviour, and it still does. `resolve_daemon_retrying` retries a probe whose diagnostic says the executable could not be run — three times, fifty milliseconds apart — and a retry that still fails still fails the test. The sibling test now asserts that the tool was run and refused rather than merely failed to start, so a transient cannot satisfy it by accident.
… new summary Two CI legs failed on the previous commit, and both failures were this work's. **Windows** failed to compile: the retry helper and its two constants are used only by the two `#[cfg(unix)]` tests, so on Windows they were dead code, and the CI runs with `-D warnings`. They are `#[cfg(unix)]` now, like the tests that use them. **Linux** failed in the native tray exercise, and the exercise's premise was wrong rather than the GUI: it waited for the tooltip to name the fixture's host, which is exactly what the summary no longer does. The tooltip carries `1 online` and nothing else now. The exercise asserts what the summary **is** — the counts, which only appear once the first fleet document has arrived and so are still the proof that the tray carries the *fleet* and not a placeholder — and what it **is not**: the tooltip must not name a host. `--expect-host-name` became `--host-name`, and the pass it prints is now `tray-tooltip-carries-the-counts-not-the-names`.
CI run `39989322526` against `e303d05` is green on all ten jobs, including the three `GUI` legs — and the `ubuntu-latest` leg is where the native Linux tray exercise runs against a real StatusNotifierItem host, with the new summary. Also corrects `PANE_CONTENT_WIDTH`'s note: the scrollbar's room comes *out* of that width, not into it.
A menu closes when the operator clicks somewhere else, and the pulldown
did not: it stayed over whatever was behind it, which is not what a menu
does.
The limit this was hiding behind was wrong. The documentation said, in
four places, that "Slint 1.18 exposes no focus-lost event", and that was
never checked against the source. Slint 1.18's FocusScope carries
callback focus-lost(reason: FocusReason);
and FocusReason has a `window-activation` variant — the desktop saying
*this window is no longer the active one*, which is exactly what a click
away does. The winit backend delivers it: Focused -> activation_changed
-> WindowEvent::WindowActiveChanged -> WindowInner::set_active ->
FocusEvent::FocusOut(FocusReason::WindowActivation).
So the dismissal needs no per-platform input hook: no event tap, no
global mouse monitor, no accessibility permission, and nothing that is
macOS-only.
What was built:
- The pulldown aggregates everything that can hold the keyboard focus:
the scope that handles the keys, and the four fields of the two forms.
A text field takes the focus away from the scope when it is clicked, so
a click away with a form open has to be caught too.
- The form's fields are named, which is why the form's pane is always in
the tree and only its visibility changes: a field inside a conditional
block cannot be named from the top of the component.
- When the view changes the pulldown takes the focus back, because a form
that goes away takes the focus with it and must not look like a click
away.
- Every dismissal -- Esc, the panel's own close control, the tray's click
and the click away -- goes through one function now, so they leave the
same thing behind: the fleet view, and no half-typed form.
- The desktop's tray is asked once per open, off the UI thread, and the
answer is kept, so a dismissal never freezes the pulldown while the
session bus is asked.
The limit that is left is stated rather than papered over: the signal is
*the focus was lost*, not *a click landed elsewhere*, so a desktop that
takes the focus away for another reason dismisses the pulldown too.
Verified natively on macOS 15 (arm64), the release build, against the live
window list: a click away dismisses the pulldown, a click inside does not,
and a click away with a field focused does. Measured in the same session:
49 MB of resident set for a GUI whose pulldown was never opened and 71 MB
once it was built, against 3.4 MB for the TUI and 4.9 MB for the client
daemon that does the polling -- and lsof on the GUI's process lists no
network socket at all, so the fleet is not polled twice.
The pulldown's click-away dismissal was built on the keyboard focus, and Slint 1.18's `FocusScope` really does carry `focus-lost(reason)`. On macOS that signal is not a click-away signal: an application that takes the foreground for its own reasons takes the focus with it, and the pulldown closes itself while the operator is reading it. Measured on this machine, with a mouse-automation app installed and running, the pulldown dismissed itself in four opens out of five. macOS now watches the mouse instead. A click that lands outside the pulldown belongs to the application that was clicked, so it cannot be seen from inside the pulldown's own window — but AppKit's global event monitor reports exactly those clicks, and the pointer's position says where it landed. The watch uses only safe objc2-app-kit API (`NSEvent::mouseLocation` and `addGlobalMonitorForEventsMatchingMask_handler`), so the GUI crate still contains no `unsafe` at all, and it needs no event tap and no accessibility permission. The menu bar is excluded from "away": the tray's own click toggles the pulldown, so a watch that also dismissed on it would hide the pulldown and open it again in the same gesture. The exclusion is a 40-point band rather than a line, because the pointer's position is read when the click is delivered rather than out of the click itself. Windows and Linux keep the focus rule: there is no portable way to watch another application's mouse there, and the focus is the signal they have. The geometry — inside the pulldown, in the menu bar, or elsewhere — is one pure function, so it is unit-tested on every platform. `block2` is now a direct dependency of the GUI workspace because the handler is an Objective-C block, but it was already in the graph through `objc2`: no new crate is built, and the lockfile still holds the same 604 packages. Verified natively on macOS 15 (arm64): a click away dismisses the pulldown, a click inside does not, and the tray's own click neither dismisses it by the watch nor fails to toggle it. The release binary is 11,979,536 bytes (+16,544 on the previous build) and the GUI workspace's suite is 174 passed / 0 failed.
…cost CI run `40017131833` against `481cda0` is green on all ten jobs, including the three `GUI` legs — the only authority for this workspace's Windows and Linux behaviour. The native evidence is now the **release** build (11,979,536 bytes), not the debug build: the tray's click opens, closes and opens the pulldown again with no dismissal line in between (the menu bar's exclusion is what keeps the tray's own click from dismissing the pulldown), a click inside keeps it, and a click away dismisses it. The memory figures are re-measured against that same build, on the same fleet, with twelve samples per state. The **physical footprint** is the honest number on macOS and it is monotonic: 14 MB before the pulldown has ever been opened, 22 MB with the window built and hidden, 26 MB with it on screen, against 2.3 MB for the TUI and 4.0 MB for the client daemon. The **resident set** is not monotonic, and the reason is stated rather than smoothed over: `ps` counts shared, clean, reclaimable pages and a fresh process reports its high-water mark, so the never-opened GUI reads higher than the one that had been open and dismissed. The socket evidence reproduces exactly as recorded: the client daemon holds the 14 TCP connections to the fleet's hosts, the TUI and the GUI hold none, and the stale `~/.local/bin/gregg` 1.0.14 still holds 7.
The "a window costs about thirty megabytes" figure was `ps` resident set, and the same documents already say resident set is the inflated instrument on macOS. Measured against the final build, the window costs about **twelve megabytes of physical footprint** — 14 MB before the pulldown has ever been opened, 26 MB with it on screen. Every place that quoted the figure now says which instrument it is, so the number and the caveat cannot be read apart.
The fleet's scroll box was 201 points tall in a body that had 348, so 147 points of dead space sat between the last host and the footer's strip. The detail view's box was 51 points, which showed a host's name and three rows and nothing else — so "the detail button does not do its job" and "there is no way back" were the same defect seen from two sides: the pane was too short to read, and the way back was a link that had moved twenty-two points up, because the panel resized when the detail opened. The cause was two invisible panes. The Add-host and Edit-host forms are always in the tree — their fields have to be nameable, or the pulldown cannot tell that one of them holds the keyboard focus — and they were 220 points tall each, whether they were showing or not. A Slint layout lays out the invisible items as if they were visible: they are not painted, but they still claim their height, and the layout squeezes the items around them to make room. The two forms took 440 points of a body that had 348. A hidden pane now declares zero height: its preferred height, its maximum height and its minimum height, because the fluent scroll container has a fifty-point floor of its own and a floor is a floor whether the pane is visible or not. The fleet's box goes from 201 points to 348 — the whole body, down to the footer — and the detail's from 51 to 348. The fleet view and the detail view now scroll in ONE box, and so share ONE height: opening the detail does not resize the panel, and the footer's control that brings the fleet back does not move under the pointer. The box is the fleet's blocks, bounded so that a large fleet scrolls, and floored so that the detail always has room to be read. The detail's own content is very often taller than the fleet's list, and it scrolls; the pulldown's size is the fleet's business. The pulldown is also 194 points narrower — 412 px rather than 606. It is a dropdown, and most of what it carries is vertical: a host's block is a header line and five rows, and the detail's groups are a heading and a column of facts, so a panel wider than the row is mostly empty. The bar still takes the whole row less the percentage, and the rows do not elide. Measured natively on macOS 15 against the live window list: the fleet's content runs to the body's edge, the detail shows the block and its groups down to the footer, the panel stays 412x446 across the view switch, the wheel scrolls the list to the last four hosts, and a click away still dismisses the pulldown. The Rust side follows: placement::box_height() is the one number the .slint is given, the detail's own height estimate is gone with the detail's own row counts, and three tests hold the shape — a_hidden_form_takes_no_room, the_fleet_and_the_detail_share_one_box and the_detail_does_not_resize_the panel. 177 tests pass; clippy is clean under -D warnings.
…size CI run 40029395421 on f7c3fb7 is green on all ten jobs, including the three GUI legs — the only authority for this workspace's Windows and Linux behaviour, because the workspace is not a member of the root workspace and no root job compiles it. The release binary is 11,979,552 bytes: +16 bytes on the build before, because a narrower panel is the same code drawing fewer pixels.
Two things in the pulldown's chrome did not earn their place. The `×` in the upper right was a **fourth dismissal control**: the tray's click, `Esc` and a click away already dismiss the pulldown, and the `×` did the same thing in a corner, as a target the operator can miss. It is gone. The header strip now carries the fleet summary and the drag area and nothing else. The `EggPool` plane was **behind the detail view**, in two ways: the footer's link was shown only in the detail, and the plane's numbers were one of the *selected host's groups* — so a fleet that was not opened in the detail carried no `EggPool` at all. The plane is a plane of its own: it describes the **service**, and not a host. It is now **pinned below the scrolling box**, so it is shown in **every** view and never scrolls out of reach. The link that opens and closes it is in the footer in every view too, and the plane is **open from the first frame** — the GUI publishes the `EggPool` intent when it attaches, so the daemon is already sending the plane the panel shows. The intent governs what the daemon *transmits*, never what it *fetches*, and a configuration with no `EggPool` entry has nothing to fetch. Two rules came with it, and both are the rules the forms already followed: the panel is **exactly as tall as the plane it shows**, and a plane with nothing to say takes **no room at all** — a Slint layout lays out the invisible items as if they were visible, so a plane that is not there must not leave a gap behind it. Measured natively on macOS 15 (arm64) against the real seven-host fleet and a live `EggPool`: the pulldown is **412×536** with the plane and **412×446** without it, and it is **412×536** in **both** views, so opening the detail still moves nothing under the pointer. The plane's own ninety points are measured at the `EGGPOOL` heading on **y = 399**, against the scrolling box's edge on **y = 396**, and the detail's last `DRIVES` row is clipped at **y = 395** — the detail scrolls inside the box and the plane does not move. A configuration with no `EggPool` entry is **412×446** with no plane and no gap, exactly as before. The GUI workspace's suite is **182 passed / 0 failed** (five new tests), its clippy is clean under `-D warnings`, its formatting is clean, and its release binary is **11,979,552 bytes** — +0 on the build before this work. No file under `crates/` is touched: the protocol, the daemon and the TUI are unchanged.
Run **`40041653415`** against `05ed618` is green on all ten jobs, including the three `GUI` legs — the only authority for this workspace's Windows and Linux behaviour. The legs' native tray exercises assert the pulldown's **position**, and the fixture's configuration has no `EggPool` entry, so the plane takes no room there and the panel's height in the exercise is unchanged.
…window is replaced The operator reported that gregg cannot open on top of windows if the window is currently maximized. Measured on the machine as it stood: a long-running GUI placed the panel correctly — `pulldown=placed x=1092 y=36 width=412 height=446 area=8,36,1496x938` — and showed nothing, `onscreen=false` on every tick of a three-second watch, on the desktop as much as over the full-screen application. A fresh instance of the same binary opened over the same full-screen application without a hitch. A window that is not on the space the operator is looking at is not on the screen at all. The long-running instance's native window had been created on a second display that has since been detached, and the space it owned went with it: the window was left in a space that no longer exists. The overlay itself was configured correctly throughout (`behaviour=337`, `level=101`), so the space was the problem, never the level. A native window cannot be moved between spaces, so the only way out of a stranded window is a new one. The GUI now asks the desktop on every open whether the pulldown's window is on the active space, and when it is not the panel's component is dropped — hidden first, because a visible window keeps its own component alive, and the component owns the native window — and a new one is built, which brings a native window of its own, created in the space the operator is looking at. The rebuild's own open never rebuilds again, and a window that cannot be found is reported as on the active space, so a first open never rebuilds a panel that is fine. Every window carrying the pulldown's title is prepared, not just the first one found: while a window is being replaced, both the old one and the new one carry the title, and preparing only the first left the new window at the floating level, which is below full-screen content — a rebuilt panel would have been the very thing it was rebuilt to avoid. Verified natively on macOS 15 (arm64) by forcing the desktop's answer: window 74128 (layer 101, on screen) was replaced by 74139 (layer 101, on screen) with the old one gone. The ordinary path was checked on the production binary with no forcing at all. The stranded state itself could not be reproduced on demand — the display that caused it is gone — and that is recorded in the evidence rather than hidden. The GUI workspace's own suite is 186 passed / 0 failed and its release binary is 11,979,552 bytes, +0 on the build before this work.
Run **`40214604992`** against `eda88ce` is green on all ten jobs, including the three `GUI` legs — the only authority for this workspace's Windows and Linux behaviour. The legs' native tray exercises assert the pulldown's **position**, and the recovery is macOS-only: the whole change is inside `#[cfg(target_os = "macos")]` apart from the decision that drives it, which is a pure function with its own tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
An optional Rust/Slint desktop menu-bar/tray GUI on the existing Gregg client
daemon, plus the plan line that produced it (Plans 187-191) and a corrective
pass on that line. No changes to the poller, the TUI's behaviour,
greggd, theremote APIs or the root workspace's build.
sequencing.
and the Slint toolchain isolated from the root Rust 1.89 MSRV.
client daemon's documents.
qualification, the footprint and resource measurements, and the packaging
decision. Its status is implemented, pending release qualification — its
own native-platform acceptance gate is still unchecked, and the plan now
lists the outstanding work instead of calling itself complete.
window, and host add / remove / rename / re-point in that panel. Its
status is implemented, pending native interactive acceptance — the
interactive gate is unchecked, so the plan is not closed, and the GUI is
not shippable for Windows or Linux.
What the branch contains
apps/gregg-gui— a separate Cargo workspace (own lockfile, ownRust 1.92 floor) excluded from the root workspace. It is a frontend, not
a second poller: it attaches to the same per-config client daemon over the
same local IPC, so a TUI and a GUI cost the fleet exactly what one window
costs.
NSStatusItemon macOS, the Shell notificationarea on Windows, a
StatusNotifierItemon Linux) with a bounded fleetsummary, Open Gregg, Reload, About Gregg and Quit Gregg.
native tray menu, showing the fleet, the selected host's metrics, drives and
interfaces, its scheduler jobs and records, and the
EggPoolplane, plus thehost add / remove / rename / re-point forms. Plan 191 replaced the
separate compact monitor window with it, so there is one surface, not two.
The lists that grow with the fleet are scrollable with bounded heights.
reports the answer on one machine-readable line, and closes by quitting
rather than hiding when it has not — a hidden window with no tray is an
application the operator can no longer reach.
Windows and Linux natively, plus native tray exercises on the Windows and
Linux legs.
The corrective pass
The line was audited against the acceptance it claimed, and three real
defects were found — not merely targets that were unverified — and fixed:
greggcrate did not compile at all. A#[cfg(windows)]branch askedstd::fs::Metadatafor a method that doesnot exist (only
Pathhas extensions), which took the whole Windows buildof the crate with it. The Windows CI job had been red for every commit of
this line. The test now asks the path for its extension and applies the
rule Windows itself applies when it is handed a path to run.
no
StatusNotifierItemhost the GUI hid its only control surface on closeand could not be reached again. It now probes the desktop, reports the
result in one machine-readable line, shows the operator what is going on,
and quits instead of hiding.
launch lock's path was derived from the endpoint, and on Windows the
endpoint is a named pipe: the whole pipe namespace is a device
namespace, where no file can exist. The lock could therefore never be
taken, and the launcher failed before it ever spawned a daemon. The
Windows lock is now a real file beside the config, named after the same
identity digest; the Unix path is unchanged.
The launcher's Windows rules now live in their own
#[cfg(all(test, windows))]module. The old module was
#[cfg(all(test, unix))], so the#[cfg(windows)]tests written inside it never compiled on Windows and never ran — which is
how defects 1 and 3 both reached a merged branch unexercised. Six Windows
tests now exist and run natively on the Windows job.
The Windows native exercise also proves the core launch path on its own,
with the CLI and no GUI involved:
gregg daemon restarttakes the launchlock, spawns a daemon and waits for it to answer;
gregg daemon statusidentifies it through the daemon's own local protocol handshake;
gregg daemon stopreleases it. That is the path the terminal client takes, and it was thepath defect 3 broke.
Verification
-D warnings; fmtclean; release build 11,896,608 bytes.
39727675355, the implementation commit0022d0b, is green on allten jobs: the seven core jobs including the Windows one, and all three
GUIlegs (macos-15,windows-2022,ubuntu-latest), which are theonly authority for the GUI workspace's Windows and Linux behaviour
because it is not a member of the root workspace and no root job compiles
it. Two earlier runs on this branch failed —
39726097278on the WindowsClippy gate and
39727156228on the Windows test gate — and both causes arefixed in that commit.
history, which is the native proof that a Windows-only compilation break
that shipped unnoticed for a whole line is gone — and it now also runs the
launcher's six Windows-only tests natively (all
ok).CI run
39672299689(HEAD) is green on every job, including the GUI'sown job on Windows, and so are the two identical runs before it
(
39667817523,39667345294). The Windows leg's transcript reads:daemon restart: client daemon d45402fdf71b3bd9 restarted, thenclient daemon d45402fdf71b3bd9 running (protocol 1, version 1.0.15) at \\.\pipe\gregg-client-d45402fdf71b3bd9— a daemon reached through theWindows named pipe, the very endpoint whose derived lock path could
never be taken — then the GUI's own
gregg-gui: tray=available, threenative top-level windows, and
the fleet fixture served 8 request(s): the daemon is polling.StatusNotifierItemhost, the real GUI registers an item, the watcher's own
RegisteredStatusNotifierItemslists it, its tooltip carries the livefleet status and its menu carries the fleet summary and the five items —
and with no host on the bus, the GUI reports
tray=unavailableandkeeps running.
/v2/statusflat at 4 polls per 4-secondwindow in every phase, deterministically and natively on 25 hosts.
GUI was 10,803,360 bytes and the baseline 9,956,032 bytes, so what the GUI
adds over a pure-Slint build of the same UI is 847,328 bytes — against
847,344 before the change. Plan 191 re-measured the changed GUI at
11,896,608 bytes.
not performed; see below. Plan 190's status is implemented, pending
release qualification, not closed, and its plan file has a Release
qualification section listing what is outstanding.
Not claimed
It requires an existing Gregg installation.
a visible notification-area icon in a real Windows shell, and a real GNOME
session. A CI runner is a native Windows and Linux host, so the code is
compiled, linted, tested and started there — but it is not an operator's
desktop. Windows and Linux are therefore not shippable on the strength
of this line.
recorded DPI measurement.
full-screen application covers the bar on this host and the screen-capture
API this macOS release does not provide. The only macOS tray evidence is the
machine-readable line and Slint's unchanged
NSStatusItempath.Windows a detached daemon spawn inherits every inheritable handle the
parent holds, not only the three standard ones, so a CLI command that
spawns the daemon with a piped stdout leaves the pipe open and its
reader waiting forever (
gregg daemon restart | tee loghangs). The GUI isnot affected — its standard streams are a console or a file — and neither is
the terminal client in normal use. Closing it needs a handle list
(
PROC_THREAD_ATTRIBUTE_HANDLE_LIST), which the standard library does notexpose, so it means
windows-sysplusunsafecode in the launcher, whichthe repository's unsafe allowlist does not cover. It is recorded as
outstanding in
plans/README.mdand inapps/gregg-gui/EVIDENCE.mdratherthan quietly worked around.
binary is 11,896,608 bytes and the GUI holds 72–83 MB resident at roughly
0.65% of one core. That is unremarkable for Slint and comparatively
substantial for a utility meant to sit in the menu bar all day. The
acceptdecision stands for the source build; whether that is the right thing to
ship is unresolved. The residency figure is Plan 190's monitor window;
the pulldown was measured separately against a one-host configuration and is
not lighter (68–104 MB with the panel open, 65–76 MB with it hidden, the
ranges overlapping), so one surface instead of two is not a memory saving.
Plan 190's 25-host numbers were not re-measured, because the harness that
produced them is not in the repository.
annotate-snippetsto reconcile theconflicting
unicode-widthrequirements of Slint and Ratatui. It isbyte-identical to the upstream 0.12.9 release rather than a fork of
anyone's code, and it works — but it is recorded dependency debt, to be
removed when the shared client-library boundary is revisited.
workspace
cargo test --workspaceand the workspace Clippy gate fail on anuntouched worktree (the eggpool/scheduler load-sensitive tests, a
/tmptemp-directory test, and clippy lints from a newer local toolchain that CI
does not raise); and the identity probe's ten-second budget is sensitive
to a heavily loaded host — on one such window it failed the core's three
identity tests and the GUI's
bridge::tests::an_explicit_client_must_identify_itselfwith the same
version did not answer within 10000 ms. The probe, itsbudget and those tests are untouched by this line; the core launcher suite
then passed 12 consecutive runs with zero failures and the GUI suite
63/63. Recorded rather than "fixed", because raising the budget would hide
the sensitivity instead of removing it.
Implementation notes
clientd::DaemonExecutableandensure_running_with_executable, withensure_runningreduced to itsCurrentwrapper. A frontend may neverlaunch itself.
EggPoolvocabulary is shared with the TUI(
gregg::cron,gregg::eggpool), so there is one implementation of "loaddelayed", not two.
scheduled on the UI thread. An idle GUI does not redraw.
Plan 191 is in this PR: the GUI is one tray pulldown, and it manages hosts
The product direction taken in review is a single tray pulldown — one
borderless, always-on-top panel carrying all the metrics, cron and
EggPoolsurfaces the compact monitor window carried, with the separate monitor window
dropped — plus host add / remove / rename / re-point in that same panel.
How the operator reaches it is changing: see "Plan 192 is also in this PR"
below.
The framework review retains Slint 1.18.1: it is the latest published
release, it is the only Rust option with a first-class native tray, and the
measured footprint is the software renderer's rather than the window's.
Host management goes through the CLI's own library code against the same
ConfigStore, so the endpoint grammar, the validation, the config lock andthe atomic write are inherited unchanged, and no protocol change and no
second poller is involved: the client daemon remains the only poller, and
DaemonRequestgains no message. A refused mutation leaves the filebyte-identical and says why in the panel. An endpoint change is presented as a
replacement — the endpoint is part of a host's identity — so the
confirming button says so and the identity changes with it; a rename is in
place and keeps it.
Three things worth reading closely, because they are measurements rather than
intentions:
std-widgetsimport was kept, with its measurement recorded. Therelease binary is 11,896,608 bytes against 10,803,360 before this
change (+10.1%).
cargo bloat --cratesattributes it: the GUI's own crategrew 418.5 KiB, which is the generated code for the
Buttonand theLineEditthe forms need — while the font stack and the SVG stack thatthe import brings did not grow at all, because the scroll container had
already paid for them. Removing the import would mean hand-rolling a text
field with a caret, a selection and keyboard editing.
gregg::cli::dispatchfrom the GUI cost 14,761,600 bytes, 2,864,992more, because the dispatcher also reaches the daemon commands and the daemon
reaches the HTTP client and its TLS stack. The GUI calls
gregg::cli::add_hostandgregg::cli::remove_hostinstead — the pathsgregg addandgregg removetake, with the dispatcher now going throughthem — and those crates are absent from the binary.
in the same pass. Two were found by a local
--target x86_64-pc-windows-gnuClippy cross-check, which is a development aid and not closure evidence:
the anchor variant the platform does not construct is dead code there, and
the store's error type carries a
toml::de::Error, which is larger onWindows and trips
result_large_erron a closure over it. The second wasnot silenced — the test was changed to write the whole configuration
instead of mutating it. The third was found by the native Windows job
itself: a test asserted the desktop shell's strip is always at the top, and
it is at the bottom on Windows. The fix removed the platform conditional
from the arithmetic rather than correcting the assertion, so both cases are
now tested on every platform.
What is still outstanding, and is not claimed: the interactive native
acceptance. No notification-area icon was seen on a real Windows desktop, no
panel was opened by a pointer on any platform, no GNOME session was used, and
the macOS Intel build was not qualified. Plan 191's status is therefore
implemented, pending native interactive acceptance — the plan is not
closed, and Windows and Linux remain not shippable and the GUI remains a
source build.
Plan 192 is also in this PR: the interaction model is reversed
This is a direction change, and it supersedes Plan 191's. Running the
committed build showed that the tray's native menu is a launcher: it offers
a summary, a flat list of host jump entries and
Open Gregg, andOpen Greggopens a separate window that carries the content. So the content is not in
the dropdown, and the window that holds it reads as a small application — a
Closebutton overhanging the header strip, the daemon's identity hash as aline of UI,
EditandRemovebuttons on every host row,METRICSandCRONheadings over large empty regions, a bottom button bar — rather than apopover.
Plan 191 wrote that decision into its own source, and it came from the Plan 187
roadmap's premise:
The premise is half true and the conclusion does not follow. The native menu
cannot host arbitrary Slint content — that is true. But the content does not
have to live in a separately opened window. Slint's
SystemTrayIconalso hasa
clickedcallback, and a native menu with no entries detaches itself,so the platform routes the tray's click to that callback instead of popping
the menu:
i-slint-core-1.18.1/items/system_tray/appkit.rs:248rebuild_menucallssetMenu(None)when the menu has no entries, so AppKit forwards the click to the button's action, which callsclicked.i-slint-core-1.18.1/items/system_tray/windows.rs:290WM_LBUTTONUP→clicked; a right-click still opens the native menu.i-slint-core-1.18.1/items/system_tray/ksni.rs:284StatusNotifierItemActivateevent →clicked.The
if cond : Menu { … }form was verified by compiling it in the GUIworkspace. So the direction is: the tray's click opens the pulldown, and the
pulldown carries the content — no launcher entry, and on macOS no native menu
at all, with
Reload,AboutandQuitmoving into the pulldown.Plan 192 also carries the two defects that the same run found, both of which
Plan 191's record did not hold:
with_winit_window"will only succeed when the event loop is active", and thestartup path calls it before the event loop runs, so
work_area()returnedNone— noset_positionat all, no clamping, and the window at x=1640 on a3840-wide display instead of under the menu bar. Deferring the first open into
the event loop gives
work_area=Some(left 8, top 36, 3824×1036)and thewindow at (3272, 36).
UiState, in memory, and the GUI writes no state file — so "remembers wherethe operator put it" was true for one session and false across a restart.
And the footprint figure is corrected: the recorded "72–83 MB resident" is
psRSS, which on macOS is dominated by shared, clean, reclaimable pages — thedyld shared cache, ICU data, the system font collections, the macOS appearance
resources. The physical footprint, which is what the machine actually pays
and what Activity Monitor shows, is 26–28 MB (11 MB with the panel hidden,
18 MB with it open), of which the Rust heap is 14 MB and the system-font
machinery about 3.2 MB. The memory also does not scale with the fleet (1
host and 25 hosts are within a megabyte of each other) and does not leak
over 150 s of polling.
No product code, protocol, dependency or CI change — this PR changes the
plans and the documentation, and opens the next plan.