Personal_AI_Infrastructure icon indicating copy to clipboard operation
Personal_AI_Infrastructure copied to clipboard

Pulse PageHeader actions cannot wrap: Local tab's Refresh now button is clipped at phone width

Open fzzzz1 opened this issue 3 weeks ago • 1 comments

Version

LifeOS 8.761.0 · attestation: 3 system file(s) differ from danielmiessler/[email protected]:

  • LIFEOS/TOOLS/model-pricing.json
  • LIFEOS/DOCUMENTATION/ARCHITECTURE_SUMMARY.md
  • LIFEOS/DOCUMENTATION/Notifications/NotificationSystem.md

What is broken

At phone width, Pulse's page header can push its right-hand actions off the screen with no way to reach them. PageHeader renders actions in a flex box that neither wraps nor shrinks, and <main> clips horizontal overflow (overflow-x-hidden), so anything wider than the header is cut off silently: no scrollbar appears and document.documentElement.scrollWidth still equals the viewport. The Local tab hits this as soon as a digest exists, because its actions are a metadata row (zip, optional county, refreshed time, source count) plus the Refresh now button. At a 375 px viewport that box is 458 px wide inside a 321 px header, so the button spans x=363 to 485: only a 12 px sliver of it is on screen and the rest cannot be reached. A sweep of 15 pages at 375 px found the Local tab to be the only one whose header actions overflow today, but any page that passes a wider actions group would clip the same way.

Where (file:line)

LIFEOS/PULSE/Observability/src/components/ui/chrome.tsx:126 (PageHeader actions box); the Local tab's actions are built at LIFEOS/PULSE/Observability/src/app/local/page.tsx:523-541

Repro on a clean tree

# Pulse serves the dashboard on port 31337. The Local tab needs a digest to exist: its header only gets
# the metadata row and the Refresh now button once /api/local-intelligence returns one (with no digest
# the page shows the "No digest generated yet" panel instead, and the bug does not show).
# 1. Open the Local tab and emulate a phone: DevTools > device toolbar > 375 px wide.
open http://localhost:31337/local
# 2. In the DevTools console, measure the button and the container that clips it:
#      b = [...document.querySelectorAll('button')].find(x => /Refresh now/.test(x.textContent)).getBoundingClientRect()
#      [Math.round(b.left), Math.round(b.right), innerWidth]   // observed [363, 485, 375]: the button ends 110 px past the viewport
#      document.querySelector('main').scrollWidth              // observed 485 (viewport 375): clipped by overflow-x-hidden
# Clean tree: the attestation above shows chrome.tsx and local/page.tsx byte-identical to the release (the
# three files it lists are unrelated). The negative control below is a source-level guard on the class string
# that causes this; steps 1 and 2 are the visual evidence.

Negative control

Probe: rg -n 'items-center gap-2 shrink-0' LIFEOS/PULSE/Observability/src/components/ui/chrome.tsx && exit 1 || exit 0 · exit 1 · captured 2026-11-08T12:06:12.300Z

Red looks like: items-center gap-2 shrink-0

126:      {actions && <div className="flex items-center gap-2 shrink-0">{actions}</div>}

Suggested fix

Let the actions box wrap and shrink instead of forcing it to its content width: replace shrink-0 with flex-wrap min-w-0 on that one div in PageHeader. Nothing that already fits moves, because inside a wrapping flex line items only shrink when a lone item is wider than the container, which is exactly this case.

Tested two ways. First a live class swap in the browser on 15 pages at both 375 px and 1440 px. Then a rebuilt export (bun run build) compared with the shipped one: at 375 px the Local tab's button sits at x=27 to 149 and main no longer overflows; at 1440 px the rectangles of the header, the title block, the actions box and every child are identical before and after on 16 routes. The three compiled CSS bundles are byte-identical (same SHA-256), since the change adds no new Tailwind rule.

One side effect on the Local tab: its metadata text now wraps inside its own pieces ("REFRESHED 14M / AGO"). Adding flex-wrap to that row and whitespace-nowrap to its spans makes it wrap between the pieces instead. That is cosmetic and not part of the diff below.

diff --git a/LIFEOS/PULSE/Observability/src/components/ui/chrome.tsx b/LIFEOS/PULSE/Observability/src/components/ui/chrome.tsx
--- a/LIFEOS/PULSE/Observability/src/components/ui/chrome.tsx
+++ b/LIFEOS/PULSE/Observability/src/components/ui/chrome.tsx
@@ -123,7 +123,7 @@
         />
         {subtitle && <p className="mt-1.5 text-sm text-ink-2">{subtitle}</p>}
       </div>
-      {actions && <div className="flex items-center gap-2 shrink-0">{actions}</div>}
+      {actions && <div className="flex flex-wrap items-center gap-2 min-w-0">{actions}</div>}
     </div>
   );
 }

Verified after fix

Probe: rg -n 'items-center gap-2 shrink-0' LIFEOS/PULSE/Observability/src/components/ui/chrome.tsx && exit 1 || exit 0 · exit 0 · captured 2026-11-08T12:14:22.883Z

(no output)

Environment

  • OS: macOS 26.6.2 (arm64)
  • Harness: claude-code
  • bun: 1.4.4 · git: 2.50.1
  • Doctor broken: none

fzzzz1 avatar Nov 08 '26 12:11 fzzzz1

[!NOTE] 🤖 Kai (AI assistant) responding on behalf of Daniel Miessler

Thanks @fzzzz1, you found that the Pulse page header's actions could not wrap, so the Refresh now button on the Local tab was clipped at phone width. The actions container now wraps instead of refusing to shrink, in LIFEOS/PULSE/Observability/src/components/ui/chrome.tsx. It ships in the next public release after 8.761.0.

danielmiessler avatar Nov 12 '26 20:11 danielmiessler