From ac7e6bdb4eaf39edccacabb6f0ee0d907eccd0f0 Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Sun, 12 Jul 2026 07:47:37 +0100 Subject: [PATCH] =?UTF-8?q?fix(waybar):=20scope=20the=20universal=20CSS=20?= =?UTF-8?q?reset=20to=20the=20bar=20=E2=80=94=20un-hides=20tray=20submenu?= =?UTF-8?q?=20arrows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BACKLOG #90 root-caused: the arrows were never missing from the icon theme — Papirus-Dark resolves pan-end-symbolic through its breeze-dark inheritance (breeze ships inside the nixpkgs papirus output). The real culprit: Waybar loads its stylesheet screen-wide at application priority, so the tray menus it hosts for SNI apps (nm-applet & co) inherit the bar's '* { min-height: 0; }', which out-prioritizes adw-gtk3's 16px min-height on the menuitem arrow node and collapses the submenu arrow to zero height. Property bisect confirmed min-height:0 alone reproduces; the font/border resets don't. - boreal + executive-slate waybar.css, waybar.nix generatedStyle: '*' block scoped to 'window#waybar, window#waybar *'; tooltip rules restate the font (tooltips are separate toplevels outside the scope). - stylix.nix: drop the go-next-symbolic remap — a workaround for the misdiagnosis; native pan-end-symbolic resolves fine. - BACKLOG #90 deleted; JOURNAL entry records the method (live GTK3 repro + grim screenshots + CSS property bisect, V3 on TuringMachine). V3 pending: human click on the real nm-applet tray icon post-switch. Co-Authored-By: Claude Fable 5 --- agent/BACKLOG.md | 10 ---------- agent/JOURNAL.md | 18 ++++++++++++++++++ modules/home/stylix.nix | 16 +++++----------- modules/home/waybar.nix | 11 ++++++++++- themes/boreal/waybar.css | 11 ++++++++++- themes/executive-slate/waybar.css | 11 ++++++++++- 6 files changed, 53 insertions(+), 24 deletions(-) diff --git a/agent/BACKLOG.md b/agent/BACKLOG.md index a0fa85a..4faa23f 100644 --- a/agent/BACKLOG.md +++ b/agent/BACKLOG.md @@ -28,16 +28,6 @@ in [`docs/ROADMAP.md`](../docs/ROADMAP.md); map in ## NEXT -### 90. Fix missing submenu arrows in nm-applet `[stuck]` -**Context:** In Papirus, `pan-end-symbolic` is missing, causing `nm-applet`'s submenu indicator (e.g., "VPN Connections") to be completely invisible. -**Attempted fixes (2026-07-11):** -1. Bundled SVG with `-gtk-recolor` (failed due to GTK constraints). -2. Bundled SVG with static Nix palette colors (failed). -3. Added `.context-menu` specificity overrides for Waybar SNI tray menus (failed). -4. Mapped to native `-gtk-icontheme("go-next-symbolic")` instead of bundled SVG (failed). -**Next steps:** Needs a fresh look. Possibly `dbusmenu-gtk3` drops the arrow entirely or uses a custom widget structure. - - ### 76. Hibernation default — all agent work shipped `[human]` Hibernation + zram on by default (product intent, Bernardo 2026-07-10). **All V0/V1/V2 slices done** (2026-07-10); only the V3 check remains. diff --git a/agent/JOURNAL.md b/agent/JOURNAL.md index cca372d..8df55cb 100644 --- a/agent/JOURNAL.md +++ b/agent/JOURNAL.md @@ -19,6 +19,24 @@ Template: --- +## 2026-07-12 — #90 tray submenu arrows: root cause was waybar CSS (this commit) +- **Task:** BACKLOG #90 `[stuck]` (interactive, Bernardo driving on T14s). +- **Did:** Diagnosis was wrong — Papirus-Dark resolves `pan-end-symbolic` + fine via its breeze-dark inheritance (breeze ships inside the nixpkgs + papirus output). Real cause: Waybar's stylesheet applies process-wide, + and the `* { min-height: 0; }` block collapsed the arrow node in the + SNI tray menus Waybar hosts. Scoped the `*` block to `window#waybar` + in boreal + executive-slate waybar.css and waybar.nix generatedStyle + (tooltip rules restate the font — tooltips are separate toplevels); + removed the go-next-symbolic remap workaround from stylix.nix. +- **Verified:** **V3** — live GTK3 repro app popping a dbusmenu-shaped + menu, screenshotted via grim: arrow vanishes with old CSS injected + screen-wide, renders with fixed CSS; property bisect pinned + `min-height: 0` as the sole culprit. V1 flake check green. +- **Pending:** post-switch check that the real nm-applet menu shows the + arrow (needs a human click on the tray icon). +- **Next suggestion:** #89 slice 2 — the override-icon layer. + ## 2026-07-11 — interactive T14s session: migration follow-ups (50a5586…6967d89) - **Task:** Escalation — Bernardo driving, live on the migrated T14s (first full session on real Nomarchy hardware; 7 commits). diff --git a/modules/home/stylix.nix b/modules/home/stylix.nix index 2d1746d..d2af8dc 100644 --- a/modules/home/stylix.nix +++ b/modules/home/stylix.nix @@ -36,10 +36,6 @@ let base0F = hex c.bad; # brown/deprecated }; - # Submenu disclosure arrows: GTK/Adwaita expect pan-end-symbolic, - # but Papirus doesn't ship it. Instead of complex CSS overrides and - # bundled SVGs, we map the GTK CSS to use go-next-symbolic which - # DOES exist in Papirus. in { config = lib.mkIf cfg.stylix.enable { @@ -72,13 +68,11 @@ in menu menuitem:disabled, .menu menuitem:disabled { color: #${base16.base03}; } - /* Submenu disclosure arrows: map missing pan-end-symbolic to existing go-next-symbolic. */ - menu menuitem arrow:dir(ltr), .menu menuitem arrow:dir(ltr), .context-menu menuitem arrow:dir(ltr) { - -gtk-icon-source: -gtk-icontheme("go-next-symbolic"); - } - menu menuitem arrow:dir(rtl), .menu menuitem arrow:dir(rtl), .context-menu menuitem arrow:dir(rtl) { - -gtk-icon-source: -gtk-icontheme("go-previous-symbolic"); - } + /* Submenu disclosure arrows need no icon remap: pan-end-symbolic + resolves via Papirus-Dark's breeze-dark inheritance. The + "invisible arrow" bug was Waybar's stylesheet leaking + min-height:0 into the tray menus it hosts — fixed by scoping + the `*` block in every waybar.css to window#waybar. */ check, radio { min-width: 14px; min-height: 14px; diff --git a/modules/home/waybar.nix b/modules/home/waybar.nix index a8e3249..2547606 100644 --- a/modules/home/waybar.nix +++ b/modules/home/waybar.nix @@ -381,7 +381,12 @@ let /* Palette baked from theme-state.json */ ${colorDefs} - * { + /* Scoped to the bar window: Waybar's stylesheet applies process-wide, + so a bare `*` also hits the SNI tray menus Waybar hosts (nm-applet + & co) — `min-height: 0` there collapses the submenu arrow node to + invisible. Whole-swap theme waybar.css files scope the same way. */ + window#waybar, + window#waybar * { font-family: "${t.fonts.ui}", "${t.fonts.mono}"; font-size: ${toString t.fonts.size}pt; min-height: 0; @@ -494,6 +499,10 @@ let background: @surface; border: ${toString t.ui.borderSize}px solid alpha(@accent, 0.4); border-radius: ${toString t.ui.rounding}px; + /* Tooltips are separate toplevels, outside the window#waybar scope — + restate the bar font (calendar columns need consistent metrics). */ + font-family: "${t.fonts.ui}", "${t.fonts.mono}"; + font-size: ${toString t.fonts.size}pt; } tooltip label { color: @text; } ''; diff --git a/themes/boreal/waybar.css b/themes/boreal/waybar.css index 08a5a5e..4d578e7 100644 --- a/themes/boreal/waybar.css +++ b/themes/boreal/waybar.css @@ -23,7 +23,11 @@ @define-color warn #E6C384; @define-color bad #E2818A; -* { +/* Scoped to the bar window: Waybar's stylesheet applies process-wide, so a + bare `*` also hits the SNI tray menus Waybar hosts (nm-applet & co) — + `min-height: 0` there collapses the submenu arrow node to invisible. */ +window#waybar, +window#waybar * { /* Mono Nerd face for status glyphs (tight right bearings on the proportional Symbols face make icon+percentage collide). */ font-family: "GeistMono Nerd Font", "Symbols Nerd Font Mono"; @@ -165,5 +169,10 @@ tooltip { background: alpha(@base, 0.96); border: 1px solid alpha(@accentAlt, 0.3); border-radius: 10px; + /* Tooltips are separate toplevels, outside the window#waybar scope — + restate the bar font (calendar/calcurse columns need the mono face). */ + font-family: "GeistMono Nerd Font", "Symbols Nerd Font Mono"; + font-size: 13px; + font-weight: 500; } tooltip label { color: @text; } diff --git a/themes/executive-slate/waybar.css b/themes/executive-slate/waybar.css index 6408e72..7a87848 100644 --- a/themes/executive-slate/waybar.css +++ b/themes/executive-slate/waybar.css @@ -21,7 +21,11 @@ @define-color warn #DBA85A; @define-color bad #D06B71; -* { +/* Scoped to the bar window: Waybar's stylesheet applies process-wide, so a + bare `*` also hits the SNI tray menus Waybar hosts (nm-applet & co) — + `min-height: 0` there collapses the submenu arrow node to invisible. */ +window#waybar, +window#waybar * { /* Mono Nerd face first for status glyphs: proportional "Symbols Nerd Font" has tight right bearings that make icon+percentage collide. */ font-family: "Symbols Nerd Font Mono", "Inter", "JetBrainsMono Nerd Font", sans-serif; @@ -179,6 +183,11 @@ tooltip { background: @surface; border: 1px solid @overlay; border-radius: 4px; + /* Tooltips are separate toplevels, outside the window#waybar scope — + restate the bar font (calendar/calcurse columns need the mono face). */ + font-family: "Symbols Nerd Font Mono", "Inter", "JetBrainsMono Nerd Font", sans-serif; + font-size: 13px; + font-weight: 500; } tooltip label { color: @text;