Skip to content

HUD mode wears the window glass too - #90363

Merged
OutThisLife merged 4 commits into
mainfrom
bb/hud-glass
Aug 20, 2026
Merged

OutThisLife merged 4 commits into
mainfrom
bb/hud-glass

Conversation

@OutThisLife

Copy link
Copy Markdown

Summary

Window translucency shipped for chat windows in #88744 and #89837, but HUD mode was left out of it: the band asked for vibrancy directly, always with the hud material, and ignored the setting entirely. This puts the HUD on the same lever as the rest of the app — the band paints the app's thread surface over the same platform material, on macOS and Windows 11 alike, and follows the Tint slider and the frost ladder like the docked window does.

Two things had to move for it to look right. The band was inset 8px from the window edge, which is correct for an opaque sheet clearing the bar's corner controls but leaves a hairline of bare untinted material down both sides once the frost is the window; it goes to zero while glass is on. Above the bar sat a 26px transparent strip reserved for the exit chip, which under frost reads as a slab of bare material across the top of the HUD — the chip moves onto the composer's controls row, where it needs no reserved space and no substrate of its own.

While in that row: the HUD's four voice controls fold into one menu. A Spotlight bar a few hundred pixels wide was spending most of its width on toggles that get set once. The docked composer keeps them inline.

Two bugs fixed on the way through. An open completion drawer drops the band to 25% and blurs it, while the native material stayed at full strength behind it — the same bare slab in a different disguise. And the hud material is one of the two rungs the macOS census in #88744 rejected, because it collapses into under-window on blur, so HUD frost quietly changed appearance whenever another app took focus.

Clear mode already reached the HUD and is untouched.

Test plan

  • hudFrostFor contract table in electron/translucency.test.ts, including the tint-drag churn guard — 1→100 moves zero native properties, matching the chat-window contract
  • Two-flag split covered in store/translucency.test.ts: the HUD gets the live setting and the tint, never the surface rewrite
  • HUD-vs-docked control split and the live-state trigger covered in composer/controls.test.tsx
  • 462 tests pass across composer, HUD, and both translucency suites
  • Renderer and electron bundles build; glass rules verified in the built CSS rather than the source, per the lightningcss trap
  • macOS: band tracks the Tint slider with the docked thread, frost switches with the band, no strip and no side hairlines
  • Windows 11: verified by @imbabybrooklyn — matches macOS

…p uses

The HUD asked for vibrancy directly and always with the 'hud' material —
one of the two rungs the macOS census rejected, because it collapses into
under-window on blur and so changed the frost the moment another app took
focus. It also ignored the translucency setting entirely: Glass off still
frosted, and Windows got nothing at all.

hudFrostFor is the mapping for a transparent window, beside vibrancyFor in
the shared module both processes read. Two gates give it its answer: the
renderer's report that the band actually covers the window, and the user's
Glass setting. Off resolves to no material rather than a resting one, since
a transparent window has no opaque page to hide an unwanted frost behind.

Windows 11 rides setBackgroundMaterial through the same call, so the HUD
follows the frost ladder on both platforms. Main self-diffs and keys the
latch to the window, so a Settings change re-frosts a live HUD, a tint drag
touches nothing native, and a HUD respawned on another profile is not
mistaken for the window that already carried the material.
…lass

The band wore its own card tint at a hardcoded 80/92%, so a HUD beside the
docked window read as a lookalike rather than the same surface, and the Tint
slider moved one and not the other. It now paints --ui-bg-chrome at
--translucency-glass-keep: one painter, one token, one lever.

That needed the setting and the surface rewrite to stop being one flag.
data-hermes-glass means "this window's field surfaces may be rewritten" and
is deliberately false in the HUD, which owns its own backgrounds; the new
data-hermes-glass-on means "the user's Glass setting is live" and is
published everywhere, along with the tint number the band reads.

The 0.5rem side inset drops to zero while glass is on. It exists to keep an
opaque sheet clear of the bar's corner controls, but the frost is the whole
window — an inset sheet left a hairline of bare untinted material down both
sides.

An open completion drawer now drops the frost along with the band it belongs
to. The drawer takes the band to 25% and blurs it while the native material
stayed at full strength, which is the same bare slab in a different
disguise. It mounts without a focus change, so it is observed rather than
passed in, coalesced to a frame because the shell mutates with every
streamed token.
@github-actions

github-actions Bot commented Aug 19, 2026 •

Copy link
Copy Markdown

૮ >ﻌ< ა ci review

ran on 6f46744 — feat(desktop): move the HUD's way out onto the bar and drop

⚠️ Warnings

CI timings · View report · View job

Wall time 8m52s vs 4m6s (+116.3%). 9 job(s) slower, 8 faster, 2 unchanged.

  • JS & TS checks / apps/desktop / check:test:ui:shard-2of3: -38.0s
  • JS & TS checks / apps/desktop / check:test:ui:shard-1of3: -34.0s
  • JS & TS checks / apps/shared / check: +22.0s
  • JS & TS checks / web / check: -13.0s
  • JS & TS checks / apps/bootstrap-installer / check: -12.0s

OSV vulnerability scan · View job

7 known vulnerabilities found in pinned dependencies.

How to fix:

Review the findings in the Security tab. Update the affected dependencies if a patched version is available.

Dictation, spoken replies, the wake word and start-conversation were four
separate icon buttons in a Spotlight bar a few hundred pixels wide — most of
the row spent on toggles that are set once and rarely touched. In the HUD
they collapse into a single menu; the docked composer has the width and
keeps them inline, same controls and same state.

The trigger is not a static glyph. It reports the loudest live voice state —
recording, transcribing, listening for the wake word, speaking replies — and
lights while any is on, because a folded menu that looked idle with the mic
open would be a worse trade than the space it saves. The three toggles are
checkbox rows that hold the menu open on select, so the state you just
changed is the state you can see.

The shared control class names move to a module of their own so the row and
the menus it renders can wear them without importing each other, and the
pressed-toggle tint stops being written out at each of its four sites.
… above it

The exit chip floated over the composer in a 26px transparent strip reserved
for it (--hud-chip-strip), hidden until you hovered the bar. Under glass that
strip is bare untinted material across the top of the HUD — a band of chrome
above the surface, present in every state, holding a control you cannot see.

It rides the composer's controls row now, next to send. That costs no
reserved space and takes about 120 lines of CSS with it: the chip needed its
own placement, hover reveal, leave-hold, and an opaque card to stay legible
over an unknown desktop. None of that applies to a button on the bar, which
is already our surface — the problem was the placement, not the control.

Trade-off worth naming: the way out is now always visible in the HUD rather
than revealed on hover. It is one more permanent glyph on a Spotlight bar, in
exchange for an escape hatch that no longer depends on discovering it.
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/desktop Electron desktop app (apps/desktop/*) platform/windows Native Windows-specific behavior or breakage sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades labels Aug 20, 2026
@OutThisLife
OutThisLife merged commit de32244 into main Aug 20, 2026
76 of 78 checks passed
@OutThisLife
OutThisLife deleted the bb/hud-glass branch August 20, 2026 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have platform/windows Native Windows-specific behavior or breakage sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants