The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): size the HUD band to its transcript
Brooklyn Nicholsonf9860b050875
diff --git a/apps/desktop/src/app/hud/hud-shell.tsx b/apps/desktop/src/app/hud/hud-shell.tsxindex 49d3309b36e..95a1ae7e81c 100644--- a/apps/desktop/src/app/hud/hud-shell.tsx+++ b/apps/desktop/src/app/hud/hud-shell.tsx@@ -165,6 +165,18 @@ export function HudShell() {}setScrollable(Boolean(el && el.scrollHeight > el.clientHeight + 4))++ // How tall the band actually needs to be. The transcript is packed to the+ // bottom, so this is the distance from the topmost visible row down to the+ // bar — which is 0 on a fresh session, and the glass then collapses behind+ // the bar instead of painting an empty slab over the whole window.+ //+ // Written straight to the element rather than through state: it changes on+ // every stream flush, and the sheet resizing must not re-render the tree.+ const rows = el?.querySelectorAll<HTMLElement>('[data-slot="aui_thread-content"] > *:not([data-slot])')+ const top = rows?.length ? rows[0].getBoundingClientRect().top : null+ const height = top === null || !el ? 0 : Math.max(0, el.getBoundingClientRect().bottom - top)+ root.style.setProperty('--hud-band-height', `${Math.round(height)}px`)}// The viewport mounts async (lazy chat surface); poll briefly until itdiff --git a/apps/desktop/src/styles.css b/apps/desktop/src/styles.cssindex 70188469a8d..c110ff03d32 100644--- a/apps/desktop/src/styles.css+++ b/apps/desktop/src/styles.css@@ -2393,7 +2393,14 @@ button[data-slot='aui_msg-reactions'] svg {rather than a true blur-radius ramp. Its own change, not this one. */[data-hud-shell] [data-hud-glass] {position: absolute;- inset: 0;+ right: 0;+ bottom: 0;+ left: 0;+ /* Grows up from the bar to fit the transcript, capped at the window. An empty+ session measures 0 and the sheet collapses behind the bar, rather than+ painting a full-height slab with nothing in it. The extra is breathing room+ above the first row so the fade has somewhere to happen. */+ height: min(100%, calc(var(--hud-band-height, 0px) + 2rem));z-index: 0;pointer-events: none;border-radius: 0.75rem 0.75rem 0 0;