docs(agent): #137 re-diagnosed from plymouth's source — my first read was wrong
All checks were successful
Check / eval (push) Successful in 3m49s

The entry claimed Window.GetWidth() returns head 0 and that the fix was
per-head sprites. Both false, and per-head sprites would have REGRESSED it
into duplicate logos. From plymouth.src (the build nixpkgs ships):

- Window.GetWidth() with no index returns data->max_width — the widest
  head (script-lib-sprite.c:227), not head 0;
- the plugin builds a max_width x max_height canvas and CENTRES every
  display inside it (display->x = (max_width - width)/2, :536), drawing
  sprites per display at sprite->x - display->x (:452);
- so a canvas-centred sprite IS centred on every head, and today's math is
  correct at the instant it runs. (The DRM renderer's area.x = 0 for every
  head is a red herring — the offsets that matter are the plugin's.)

The real bug is TIME: nomarchy.script computes every position as a
top-level statement at parse time, against the canvas that existed then. A
display arriving or leaving mid-splash — exactly "boot/shutdown with an
external" — changes max_*, the plugin re-centres each display, and the
frozen sprite coords are then off by (new_max - old_max)/2 on every head.
A single monitor never changes the canvas, which is why it was never seen
undocked.

Fix shape recorded (reposition from the existing refresh callback on
canvas change). Not shipped: the same script draws the LUKS passphrase box
on an encrypted machine, and the render rig — plymouth ships x11.so plus a
built-in PLY_CREATE_FAKE_MULTI_HEAD_SETUP — needs root.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-16 11:57:54 +01:00
parent 30e632ff65
commit 3e6cc6fe84
2 changed files with 79 additions and 16 deletions

View File

@@ -19,6 +19,38 @@ Template:
---
## 2026-07-16 — "fix the rest": #140, #142, #144 shipped; #137 re-diagnosed
- **Task:** the T14s round's remainder. Bernardo picked configurable-provider +
drop-the-CLI for #140 (and asked for chatgpt/grok in the list).
- **Did:** **#140** Ask → web chat; `settings.ask.provider` read at run time
(switching needs no rebuild), claude-code + `pkgs.nodejs` deleted, query also
copied to the clipboard because vendor prefill is undocumented and fails
*silently*. **#142** dock mode is now an intent (`settings.display.dockMode`)
written at the transition choke point and re-asserted by the watcher as a
**tick invariant** — reconcile diffs `monitors all`, which lists disabled
outputs, so it is blind to a panel switching back on. **#144** MIGRATION.md
gets the Mozilla `profiles.ini` bullet.
- **Verified:** V0 on each. #140: drove the generated script — bad state values
all fall back, hostile query encodes right. #142: **9/9 gates** unit-tested by
extracting the real generated `enforce_dock_intent` and stubbing the session
(incl. *no external → never re-dock*, the #127 brick), plus the state
write/read round-trip on a scratch checkout so the live flake stayed clean.
- **#137 — read the entry before touching it.** My own first diagnosis was
**wrong** and is now corrected in place: `Window.GetWidth()` returns
`max_width`, not head 0, and the plugin *centres every display in the canvas*
— so per-head sprites (what I originally proposed) would duplicate the logo.
The real cause is that the script computes positions **once at parse time**,
so a display arriving/leaving mid-splash re-centres the displays while the
sprites keep their stale canvas coords. Fix = reposition on canvas change from
the existing refresh callback. Not shipped: it draws the **LUKS box** on an
encrypted machine, and the render rig (`x11.so` +
`PLY_CREATE_FAKE_MULTI_HEAD_SETUP`) needs root.
- **Pending:** V3 queue now holds #138 (dock audio), #139 (Acer sheets), #131
(Acer menu width), #142 (rebuild while docked — **relogin first**). Bernardo
must `nomarchy-home` + relogin to get any of today's session work.
- **Next suggestion:** #137 with a sudo session for the rig, or #143's upstream
(rofi#2317) — nothing to do there until they answer.
## 2026-07-16 — #139 + #141: the quick ones from the T14s round
- **Task:** #139 (terminal sheets open full-screen) and #141 (Waybar updates
click does nothing) — Bernardo: "let's do the quick ones first".