fix(ui): #139 sheets size themselves; #141 waybar clicks stop reading the env
Some checks failed
Check / eval (push) Has been cancelled

#139 — calcurse/doctor floated full-screen. Two faults stacked, which is
why it looked like the float rules were dead:
  1. Hyprland 0.55.4 silently ignores percentage `size` rules. Matrix on
     hardware (both orders, kitty memory off): `size 60% 65%` never
     applies, `size 1536 936` applies either way, configerrors empty both
     times. Rule order was a red herring.
  2. Kitty defaults to remember_window_size=yes and replays the last OS
     window's size into every float — so after a tiled terminal, a sheet
     opens maximized. This is the Ghostty regression: Ghostty had no such
     memory, so fault 1 stayed invisible until #95.

Fix: remember_window_size=no (floats must be deterministic) and the sheets
ask for their own size — term-sheet.nix reads the focused monitor and
hands kitty the px, because px in a rule cannot mean "a fraction of *this*
screen" and one pair cannot serve 2560x1440 and the 1366x768 Acer (#131).
Those windows keep float/center and deliberately carry no size rule.

#141 — the updates click did nothing: whole-swaps hand-wrote
`sh -c '$TERMINAL …'` and Waybar has no TERMINAL (home.sessionVariables →
login shells only; the bar is spawned by Hyprland). Fixed at the root:
`nomarchy-updates upgrade-window` opens its own window, so all five call
sites name one env-free command and a theme file stops having an opinion
about terminals. checks.waybar-swap-env guards the class.

Bernardo asked mid-task for the update window to float — it is now the
third caller of the sheet helper (com.nomarchy.updates, 45%x50%).

V3 on the dev box: calendar 1536x936, doctor 1408x1008, updates 1152x720
— exactly the intended fractions, floating and centred; #141 driven under
`env -i` with no TERMINAL, matching Waybar's real environment; the guard
proven by reintroducing the bug. Acer V3 queued.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-16 10:04:28 +01:00
parent 4a63f27bf4
commit 55a516e1c7
15 changed files with 220 additions and 74 deletions

View File

@@ -211,66 +211,6 @@ scaled splash — the LUKS prompt especially, since a passphrase box half off
the panel is the failure that matters. Pass = docked boot + shutdown centred
on both heads; undocked unchanged.
### 139. Terminal floats open full-screen — % size rules are ignored, and Kitty remembers
Bernardo 2026-07-16: calcurse and nomarchy-doctor float but fill the screen —
the reduced size we had under Ghostty is gone. Reproduced and root-caused live
on the T14s (Hyprland 0.55.4, single 2560×1440 head), and it is **two** faults
stacked, which is why it looks like the float rules are dead when they are not:
1. **Percentage sizes silently no-op.** `com.nomarchy.calendar` came up
`floating=true` but `size=[2526,1360]` — the full work area, not the
`size 60% 65%` in `modules/home/hyprland.nix:1064`. A runtime rule with
**absolute** pixels (`size 1400 900`) applied perfectly and even centred
itself, so `size` works and the matcher works: it is the `%` form that this
Hyprland drops. No `hyprctl configerrors` — it fails silently, which is
how it survived the rule-syntax rewrite.
2. **Kitty remembers its last window size.** With the rule not applying,
nothing overrides Kitty's own request, and Kitty defaults to
`remember_window_size yes``~/.cache/kitty/main.json` literally holds
`{"window-size": [...]}` and is replayed into every new OS window. So the
float inherits whatever the last Kitty was, which after any tiled window is
~full-screen. **This is the Ghostty regression** (#95, Kitty-only): Ghostty
kept no such memory, so fault 1 was invisible — fault 2 exposed it.
Both need fixing, and fixing either alone is a trap: absolute pixels alone
stop being right on the 1366-wide Acer (#131's machine) or any scaled head,
and pinning Kitty alone leaves the `%` rules rotting for the next window we
float. Likely shape: `-o remember_window_size=no` (plus
`initial_window_width/height`) in the `nomarchy-calendar` / doctor launchers
so Kitty stops fighting us, and either the working syntax for `%` or a
documented note that this Hyprland wants absolute px. Affects every rule using
`%` — today calendar (`:1064`) and doctor (`:1070`). Pass = both sheets open
centred at their intended fraction on the dev box **and** on the Acer.
_(My probes wrote `{"window-size": [1400, 900]}` into your Kitty cache — it is
a self-updating cache, harmless, and any resize overwrites it.)_
### 141. Waybar's update module is dead in the whole-swap themes (`$TERMINAL` is unset)
Bernardo 2026-07-16: clicking the Waybar updates module does nothing.
Confirmed live and it is a **Waybar parity break** (CONVENTIONS § whole-swaps),
not an updates bug. The generated module bakes the terminal in —
`"${config.nomarchy.terminal} -e nomarchy-updates upgrade"`
(`modules/home/waybar.nix:356`) — but the four whole-swap themes hand-write
`"sh -c '$TERMINAL -e nomarchy-updates upgrade'"`, and **Waybar's environment
has no `TERMINAL`**: its 55 vars contain zero matches (pid 1688, `/proc/*/environ`).
`TERMINAL` is a `home.sessionVariables` entry (`modules/home/default.nix:104`),
so login shells get it and the Hyprland-spawned bar does not. The click expands
to `sh -c ' -e nomarchy-updates upgrade'` → nothing, no error, no toast. You
are on **boreal**, a whole-swap, which is why you see it.
Affected, one line each: `themes/{boreal,summer-day,summer-night,executive-slate}/waybar.jsonc`
(`custom/updates.on-click` — grep says this is the *only* `$TERMINAL` use left
in any whole-swap, so the blast radius is exactly these 4 lines). Fix = drop
the env dependency the way calendar/doctor already do — name `kitty` outright,
Kitty being sole supported since #95 — or, better and one place instead of
five, give `nomarchy-updates` a subcommand that opens its own terminal so
every caller stops needing `$TERMINAL`. Worth a check against the class of
bug, not the instance: nothing today asserts that a whole-swap's on-click
survives Waybar's actual environment, so the next hand-written jsonc can
reintroduce it silently.
### 142. A rebuild while docked undoes dock mode (the panel comes back, a workspace jumps to it)
Bernardo 2026-07-16: every rebuild while docked lands in the undocked state —