Commit Graph

4143 Commits

Author SHA1 Message Date
Brooklyn Nicholson 956642c4fc feat(desktop): resolve preview URLs through main, which knows the transport
Only main can answer whether a loopback address is reachable: it holds
the live SSH connection and the profile precedence that picks it. The
renderer asks over IPC instead of guessing.

Forwards are scoped to the connection that authorized them and dropped
whenever it changes, so a new host never inherits a tunnel into the old
one. A failed forward logs and returns the original URL rather than
breaking the load path.
2026-08-18 08:52:36 -05:00
Brooklyn Nicholson 0600738f6d feat(desktop): loopback reach for the in-app browser over an SSH gateway
Opens a local->remote forward on demand so a gateway-side dev server URL
resolves to the gateway, not the laptop rendering the webview.

One lease per remote port, reused across pages and expired after 15
minutes; the port allowlist is deliberately absent, since the transport
we are already authenticated on is the security boundary and a curated
list just means the next framework default silently fails.

Lease and capability shape adapted from #87243.

Co-authored-by: tuancookiez-hub <tuancookiez-hub@users.noreply.github.com>
2026-08-18 08:52:36 -05:00
brooklyn! 2d579af869 feat(desktop): drop the Tools & Keys in-page search — ⌘K already finds credentials (#89192)
The scoped cmdk bar on Tools & Keys was a second search UI for the same
catalog ⌘K now serves. Cards stay listed; deep links still expand, scroll,
and flash the matching credential.
2026-08-18 13:47:59 +00:00
hermes-seaeye[bot] 8a754104ad fmt(js): npm run fix on merge (#89185)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-08-18 13:37:43 +00:00
brooklyn! eb6922a8cd Settings search is ⌘K: deep field/credential results everywhere, scoped palette + edge pill on Settings (#89167)
* feat(desktop): add scoped credential command search

* feat(desktop): add global settings search

* feat(desktop): settings search lives in the command palette, deep everywhere

Replace the PR's sidebar search input with a settings page inside the ⌘K
palette (the subPages mechanism themes/pets already use). ⌘K on the
Settings overlay opens the palette scoped to settings; Back/Esc/Backspace
step out to the root. The deep catalog — schema-driven config fields,
appearance controls, stored credentials — now also serves the ROOT
palette's typed results, replacing the static section-key list, so ⌘K is
the same settings search everywhere. The input refocuses on page swaps,
and a seed store carries the keystroke that opened the palette so
type-to-search never loses the first character.

* feat(desktop): search pill rides the Settings card's top edge and hands off to ⌘K

The trigger is a fake pill — pure chrome, not an input — centered on the
overlay card's top border, half off the card (a new OverlayView edgeBadge
slot; a sibling of the card since the card clips its own corners). Click
or just start typing to open the scoped palette; while the palette is up
the pill scales up and fades out, then fades back when it closes.
Type-to-search forwards printable keys (outside editable targets) with
the keystroke seeded into the palette filter.

* feat(desktop): plugins are searchable — ⌘K 'kanban' lands on Settings → Plugins with the row flashed

The catalog stopped at config fields and credentials; installed plugins
were invisible to search. Both stores now feed it — desktop plugins from
$pluginRecords, agent plugins via the same plugins.manage RPC the Plugins
page fires (deduped by the store's inflight guard, filtered by the shared
desktop-relevance curation, which moves to the store so both callers use
one predicate). Rows deep-link as ?tab=plugins&plugin=<id|key> and the
page scroll-flashes the row via the shared useDeepLinkHighlight hook.

* style(desktop): satisfy perfectionist import/prop ordering

* test(desktop): add setApiRequestProfile to KeysSettings hermes mock

---------

Co-authored-by: Adolanium <94890352+Adolanium@users.noreply.github.com>
Co-authored-by: Adolanium <adolanium@users.noreply.github.com>
2026-08-18 13:28:39 +00:00
hermes-seaeye[bot] 593ad08496 fmt(js): npm run fix on merge (#89178)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-08-18 13:19:44 +00:00
Brooklyn Nicholson 3e9859beca fix(desktop): explain why a remote agent's localhost URL won't load in the browser pane
The webview always runs on the user's machine, never on the gateway
host. Against a remote gateway an agent's http://localhost:5173 resolves
here — where that port is usually nothing, or somebody else's service —
and the pane just said 'Server not found'.

The load error now names the mismatch when the address is loopback and
the gateway is remote. It stays quiet on a local gateway and for
non-loopback hosts, which fail for ordinary reasons.

This explains the limitation rather than lifting it; forwarding the port
is a separate, larger job (see #87243 for the SSH case).
2026-08-18 08:13:08 -05:00
Brooklyn Nicholson a9a4a04070 feat(desktop): open the browser with a hotkey instead of only through chat
The Browser tab could only be summoned by asking the agent or clicking a
link. Adds Cmd+Shift+L and a command-palette row.

L is the location-bar chord every browser shares; plain Cmd+L is
already the terminal's selection shortcut, hence the shift. Pressing it
re-fronts whatever page is loaded rather than resetting it, so it reads
as 'show me the browser' and not 'start over'.
2026-08-18 07:51:43 -05:00
hermes-seaeye[bot] e02d1e41fc fmt(js): npm run fix on merge (#89135)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-08-18 11:22:45 +00:00
Brooklyn Nicholson 4d1cdf83c9 fix(desktop): claim Cmd/Ctrl+R in before-input-event so it works off macOS
The application menu is only installed on macOS (#77845) — everywhere
else it is set to null, which strips the role accelerators with it. A
menu-only Cmd+R meant Windows and Linux got no page reload at all.

Moves the claim into the same before-input-event hook Cmd+W already uses
for exactly this reason, and drops the accelerator from the menu item so
one keypress can't fire both paths on macOS.
2026-08-18 06:16:29 -05:00
Brooklyn Nicholson fae8e27a49 fmt(desktop): eslint --fix import and JSX-prop ordering 2026-08-18 06:16:29 -05:00
Brooklyn Nicholson d48b441506 feat(desktop): open web links in the in-app browser, Cmd-click for the system one
Clicking a link in the transcript, a url chip, or the terminal left
Hermes entirely. Now a web page opens in the browser pane — no context
switch to read a doc, and it's the surface the agent can see — while
Cmd/Ctrl-click and middle-click still escape to the real browser.

Routing lives in one helper so every link surface agrees. Anything that
isn't a web page (mailto:, file:, custom schemes) always hands off to
the OS, as do billing, OAuth, and local media, which need a real
logged-in browser.

The terminal keeps its own chord: it already spends Cmd/Ctrl on
activating the link at all, so Shift is what escapes there.
2026-08-18 06:16:29 -05:00
Brooklyn Nicholson ccabff8976 feat(desktop): route native browser gestures to the in-app browser
Cmd+R over a focused page reloads that page instead of the whole shell,
a trackpad swipe walks its history, and a mouse's back/forward buttons
do the same. Shift+Cmd+R still force-reloads the window.

All three arrive as native input, so main decides. A webview guest is
out-of-process: when the pointer and focus are inside the page, no
renderer signal sees it — not activeElement, not the layout tree's
hover/focus ladder. Main asks Electron for the focused webContents and
acts on it directly, and only falls through to the renderer when the
gesture landed on Hermes' own chrome.

Also adds a Reload window command to the palette, since Cmd+R no longer
always means that.
2026-08-18 06:16:29 -05:00
Brooklyn Nicholson 5117eb7c93 feat(desktop): give the in-app browser an address bar and history controls
The Browser tab could only show whatever opened it: no back, no forward,
no way to type an address. Adds the row every browser has — back /
forward / reload / address — above the page.

The console and DevTools toggles move here from the zone strip. They act
on one page, so they belong beside its address rather than on a strip
shared with every other tab; that also frees the space the address bar
needed. Nothing else contributed strip tools, so the extension point
goes with them.
2026-08-18 06:16:29 -05:00
Teknium daca386967 fix(desktop): @-mentions now autocomplete in Bot Mode group composers (#89049)
The group room's composer (new-thread box and reply-in-thread box) rendered
a plain SDK Input. The plugin's mention provider is registered against
COMPOSER_AREAS.atCompletions, which only mounts in the main chat composer —
workspace tiles never see it, so typing @ or / in a group chat did nothing
despite the placeholder advertising "@name to direct, @everyone for all".

Fix: a member-scoped GroupMentionInput wrapper in the plugin itself —
caret-aware @-token detection, popover offering @everyone/@all plus each
seated member's handle (same botHandle the parser uses), keyboard nav
(Up/Down/Enter/Tab/Escape), and insertion that produces exactly the
"@handle " strings parseGroupChatMentions resolves. Both group composers
(GroupChatWorkspace main box + thread reply box) mount it; the per-bot
composer path is untouched.

Root cause traced by the reporter of #89049 — confirmed against source.
2026-08-18 03:00:29 -07:00
hermes-seaeye[bot] 7cae03b8c0 fmt(js): npm run fix on merge (#89070)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-08-18 09:33:57 +00:00
Teknium a1682376ca feat(profiles): rename any agent — the default profile gets a display name (#45624)
`hermes profile rename default <name>` (and the Desktop/dashboard rename
flows) now set a presentation-only `display_name` in profile.yaml instead
of erroring. The canonical id stays "default"; resolution, comparison,
and spawn paths are untouched. Named profiles keep real renames and their
display_name survives the move.

Surfaces: profile list/show/status, /profile (text only — data.profile
stays canonical), dashboard ProfilesPage, TUI-gateway profiles.list, and
Desktop (rail, switcher, Manage page, and the Bot Mode roster via a
displayName fallback so a renamed default shows its name, not "default").

Slimmer redo of the direction in PR #87760 by @yxssxn — thanks; see PR
body for what changed vs that approach.
2026-08-18 02:27:18 -07:00
Teknium 6abe6edee6 feat(bot-mode): real Slack-style threads in group rooms — main composer starts one, reply-in-thread continues it
Supersedes the display-only conversation folding from #89030 with actual
threads, per Teknium's direction: guessing topic boundaries from user-
message timing was wrong — tasks take many user turns.

- Every room entry carries a thread id. The main composer STARTS a new
  thread with the whole group ('New Thread'); each open thread has its own
  'Reply in thread' box that CONTINUES that work. Explicit intent, no
  heuristics.
- Member turns are thread-scoped end to end: the round-robin drive filters
  the room log to the triggering thread, watermarks key on
  thread::member, and responder resolution reads only that thread — so
  parallel topics never leak into each other's deltas or eat each other's
  watermarks.
- Stranded (timed-out) replies remember their thread and harvest back into
  it; pre-thread bare-number markers still parse.
- Pre-thread logs hydrate through assignLegacyThreads(): a user message
  after a 15-min lull starts a synthetic thread, follow-ups inside the
  window stay together — one-time conversion only, live sends always mint
  real ids.
- UI: threads ordered by last activity, newest open by default, older ones
  fold to summary rows (head text, reply count, last activity) with
  expand/collapse.

Tests: thread minting, explicit-thread continuation + delta scoping (other
thread's text never reaches the member prompt), legacy hydration split
behavior, thread UI source contracts. 258/258 plugin tests pass.
2026-08-18 02:25:41 -07:00
Teknium 8505559fa9 feat(bot-mode): group rooms fold older conversations into one-line summaries (#88925)
Every USER message starts a conversation (the same boundary the turn
engine's delta scoping keys on). The latest conversation renders in full;
older ones collapse to a one-line summary row — head text, reply count,
last-activity time — that expands/collapses on click. db's 'threads per
conversation' ask, delivered as timeline folding: no log-model change, no
new persistence, cross-machine sync untouched.

groupChatConversations() splits the log (leading member run from a trimmed
log forms a headless block); rendering extracts renderEntry() unchanged.

Tests: conversation splitting (headless block, heads, startIndex) + fold
source contracts. 256/256 plugin tests pass.
2026-08-18 01:54:29 -07:00
Teknium 2d511f55aa fix(desktop): closing main in a side-by-side layout promotes the neighboring session instead of spawning a fresh draft (#88924)
nextSessionTileForWorkspace() only walked tabs stacked WITH the workspace
tab. In a side-by-side layout (session tiles in their own zones — db's
three-pane report), the walk found nothing, closeWorkspaceTab() skipped
promotion, and requestFreshSession() dropped main to a new draft: closing
a pane read as 'it gave me a new session'. A tile in any zone now promotes
(its zone collapses via the tile close), so Close is also the path from N
panes back to 1. Ghost panes whose tile is gone still never promote.
2026-08-18 01:38:51 -07:00
Teknium c381aef16f fix(bot-mode): fresh-room name uniquify counts every membership, not just the legacy scalar
With multi-group membership, a bot's meta carries groups[]; the create
dialog's taken-name scan must union all of them (botGroups) or a name only
present as a secondary membership could be reused and resurrect that room.
2026-08-18 00:26:31 -07:00
Goktug Vatandas 7af25a92b0 test(bot-mode): favor behavior over source assertions 2026-08-18 00:26:31 -07:00
Goktug Vatandas 10d6faade9 test(bot-mode): verify shared-member room isolation 2026-08-18 00:26:31 -07:00
Goktug Vatandas 9bea439189 feat(bot-mode): support multiple groups per bot 2026-08-18 00:26:31 -07:00
hermes-seaeye[bot] ecc7a354f0 fmt(js): npm run fix on merge (#88981)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-08-18 07:11:16 +00:00
Christopher Strnad 4bb7e4913f fix(desktop): preserve cross-machine group routing 2026-08-18 00:03:16 -07:00
Teknium a943895f2e test(desktop): prove the install_id collapse (#88828) and boot-descriptor connectionId (salvage #88697) compose without re-appending the twin-address primary 2026-08-17 23:52:54 -07:00
imMxts 7e156c6d2e fix(desktop): preserve primary remote connection identity 2026-08-17 23:52:54 -07:00
Teknium cb337d39ba fix: Bot Mode cronjobs panel no longer shows two empty-state markers
The empty cronjobs list rendered both a calendar-icon placeholder blurb
("Cronjobs are recurring tasks this agent runs on a schedule.") and the
Create Cronjob button — two elements saying the same thing (empty).
Per Teknium's review, drop the generic placeholder and keep only the
create button. The filter hint ("jobs exist but are hidden by the bot
filter") still renders, since it carries real information rather than
just marking emptiness.
2026-08-17 23:52:45 -07:00
Brooklyn Nicholson e9cefa4d75 feat(desktop): pre-select glass on macOS
Window Translucency shipped defaulting to Clear, which means the mode worth
finding is the one nobody sees — Glass is the better-looking half and the
reason the feature exists. A fresh macOS profile now starts with Glass
selected.

Nothing turns on. The intensity still defaults to 0, so the window is
byte-for-byte what it is today until the user moves the lever; the default
only decides which mode that lever will drive. windowOpacityFor stays 1 and
the window is still born with its opaque backing.

The one profile that must NOT flip is one already carrying a non-zero
intensity with no mode recorded: it predates the setting, has been rendering
as clear the whole time, and defaulting it to glass would change a window
someone deliberately tuned. normalizeMode takes the saved intensity and keeps
those on clear.

The renderer store was hand-rolling its own copy of this rule, so it now
routes through the shared normalizer and the two can't disagree.

The store's default test only passed because a beforeEach reset the atom
before it looked — it asserted the post-reset value, not the default, so it
would have stayed green through this change. It now snapshots the atom at
import time. All three mutations (default back to clear, escape hatch
removed, glass leaking onto non-mac) fail the suite.
2026-08-18 01:16:18 -05:00
Brooklyn Nicholson 7a81dd9efd refactor(desktop): trim the glass surface
Pre-handoff polish, no behavior change. The three translucency pickers
shared a verbatim five-line onChange (haptic, set, conditional pulse) —
one pickTranslucency helper now serves mode, frost and area. Dead
re-exports cut: the electron adapter no longer forwards renderer-only
symbols (TRANSLUCENCY_STEP, TranslucencyMode, GlassScope), and the store's
re-export block shrinks to what its call sites read; the store test takes
the shared constants from @hermes/shared/translucency directly.
2026-08-18 00:57:01 -05:00
Brooklyn Nicholson a1fca9b625 fix(desktop): close the glass state and perf leaks
Audit pass over the whole feature's lifecycle, closing four holes:

- Stuck peek. Escape mid-drag unmounts the slider before its pointerup ever
  fires, stranding the counter above zero — every LATER settings overlay
  then renders ghosted at 8% opacity. The appearance surface now drops all
  outstanding holds on unmount (resetTranslucencyPeek); expiring pulse
  timers become no-ops on the zero floor.

- Frozen sibling windows. Under glass an intensity change touches nothing
  native (by design, that's the perf fix), so a second chat window never
  heard about it and its tint froze until reload. The store now adopts a
  sibling's persisted state off the storage event — the same cross-window
  pattern themes/context and store/session already use.

- Layout thrash on the sidebar-scope drag. startRailTracking re-measured the
  rail on every store sync: a getBoundingClientRect (forced layout) right
  after the tint's style write, once per slider tick. While tracking is
  live, the ResizeObserver and the resize listener own geometry; the settled
  hot path is now one boolean check. Re-acquisition still covers the two
  real cases — a rail that hasn't mounted yet, and a rail that REMOUNTED
  (layout reset swaps the element, leaving the observer on a detached node
  that never fires again).

- The rail observer/listener pair was already torn down whenever glass or
  the sidebar scope ends (stopRailTracking) — audited, covered by the scope
  attribute tests, unchanged.
2026-08-18 00:57:01 -05:00
Brooklyn Nicholson 6eb23c79d3 fix(desktop): clear-mode fade tracks the drag again
The perf pass over-corrected: it debounced the renderer's IPC send along
with the localStorage write. Under glass that was harmless (the renderer
paints the effect itself), but in clear mode the effect IS the native window
opacity, and main can only move it when told — so dragging the slider did
nothing for 120ms and then snapped to the released value. Exactly the jank
the debounce was meant to remove, reintroduced on the other mode.

The send is per-tick again; only the localStorage write stays debounced.
Per-tick sends are cheap now because main diffs the state: one setOpacity in
clear mode, nothing at all under glass.

The store test asserting the send was coalesced encoded the bug — flipped to
assert every tick reaches the bridge, with a comment naming the rule.
2026-08-18 00:57:01 -05:00
Brooklyn Nicholson f3bfa9ae53 perf(desktop): stop the translucency slider thrashing the main process
Dragging the intensity slider was janky, and the four frost levels looked
nearly identical. Same cause.

At step=1 a drag emits ~100 updates, and every one of them did four
expensive things: a synchronous localStorage.setItem, an IPC wake, a
synchronous fs.writeFileSync in main, and setVibrancy + setBackgroundColor
on every open window. The vibrancy call is the one that also broke the
frost picker — it animates over 150ms, so re-issuing it per tick restarted
the animation before macOS could ever settle the material. The levels
weren't indistinguishable, they were never finishing.

The fix follows from a property the mode already has: under glass the
intensity is a pure renderer concern. windowOpacityFor returns 1 for the
whole range, so main has nothing to do on an intensity change at all.

- main diffs the incoming state against the current one and passes a
  `changed` set to applyWindowTranslucency. An intensity-only change under
  glass now touches zero native properties. Crossing zero still moves the
  backing, since that flips glass on and off.
- main's disk write is coalesced onto a 250ms trailing timer, flushed on
  before-quit. Only a cold launch reads that file.
- the renderer paints every tick (the field has to track the hand) but
  coalesces the localStorage write and the IPC send onto a 120ms trailing
  timer, flushed on pagehide.

Covered as contracts rather than timings: a table asserting exactly what
each kind of update changes natively (nothing, across the whole intensity
range under glass), and store tests that a six-tick drag produces one write
and one IPC call while every intermediate value still paints. Both
directions mutation-checked — restoring per-tick writes fails, and
debouncing the paint fails too.
2026-08-18 00:57:01 -05:00
Brooklyn Nicholson b86db1410b test(desktop): the glass assertions were never running
jsdom reports an EMPTY navigator.platform and a userAgent of "darwin", so
GLASS_SUPPORTED resolved false and every `if (GLASS_SUPPORTED)` assertion in
the store suite took its else-branch — on a Mac too. The suite was green
because it was checking that glass does nothing.

Found by mutation: removing the `data-hermes-glass-scope` cleanup, hardcoding
the keep percentage, and dropping the isChatWindow guard all survived a full
run. Pinning navigator.platform before the store module evaluates makes the
glass path the one under test, and all three now fail as they should.

Also adds the coverage those mutants exposed as missing:

- Each of the three ways glass can end (intensity to zero, mode to clear,
  window kind) clears the scope attribute independently — a stale scope keeps
  the split-paint gradient selector live over a non-glass field.
- The store must CONSULT isChatWindow, not merely export it. Driving
  window.location.search proves the HUD / pet overlay / quick entry don't get
  their page surfaces rewritten while still honouring the user's saved mode.
- A guard asserting GLASS_SUPPORTED is true in this environment, so if the
  env ever stops reporting mac the suite fails instead of quietly hollowing
  itself out again.
2026-08-18 00:57:01 -05:00
Brooklyn Nicholson efa15b5eb4 feat(desktop): frost picker, sidebar glass, full-range tint and peek
Restores the four features SHL0MS built on #84329 that an earlier pass on
this branch had carved out, reconciled onto the shared translucency state
rather than the four-atom store they were written against.

- Frost picker. macOS exposes no blur-radius knob, so the vibrancy material
  IS the frost control. The four in the ladder come from a pixel census on
  macOS 26: the 14 Electron materials collapse to 9 distinct looks, and
  these four are the widest separations that stay distinct in BOTH
  appearances. sidebar/hud collapse into under-window when unfocused, which
  is why they're deliberately absent -- normalizeMaterial rejects them, with
  a test saying why.
- Sidebar-only glass, the Finder shape. <body> stays the single painter and
  splits at the rail's live-measured edge with a hard gradient stop, so
  there's no smear across the seam and no per-layer tint stacking. RTL
  mirrors.
- Full-range tint. glassSurfaceKeep runs linear to zero, so the top of the
  lever is bare untinted blur instead of stopping at a 30% wash. Text, cards
  and the composer keep their own opaque tokens, which is what makes 100%
  usable rather than unreadable.
- Peek. The settings overlay covers the very effect its slider controls, so
  holding the slider ghosts the whole overlay layer and the live window
  becomes the preview. A counter, not a boolean: a held drag and a timed
  pulse from a picker click overlap, and the drag must not be cancelled by a
  pulse expiring underneath it.

One change from the original: the peek's transition is scoped with :has() to
the overlay that arms it. The version on #84329 shipped a bare
`[data-overlay-surface] { transition: opacity 420ms }`, which gave every
overlay in the app -- command center, cron, agents, model picker -- a 420ms
opacity transition for the life of the process to serve one slider. Verified
by running the candidate rules through lightningcss: the scoped selectors
survive minification and no un-gated overlay transition remains.

visualEffectState is pinned to 'active' at each chat window, because several
materials collapse to a shared inactive look on blur -- without it the frost
choice silently erases itself whenever the user clicks another app.

Co-authored-by: SHL0MS <SHL0MS@users.noreply.github.com>
2026-08-18 00:57:01 -05:00
Brooklyn Nicholson 113a07f29d refactor(desktop): one surface helper for the three chat windows
Every chat window constructor repeated the same three translucency-related
options -- the vibrancy material, the native opacity, the webContents
backing -- and the glass work was about to make that four things to keep in
step across three sites, with the cold-launch backing rule (omit
backgroundColor, never pass alpha) restated at each. chatWindowSurfaceOptions()
states it once, and the comment naming the HUD, pet overlay, quick entry and
wake indicator as deliberately-not-chat-windows lives with it.

The settings row reads the store's single object rather than two atoms.
2026-08-18 00:57:01 -05:00
Brooklyn Nicholson 0ae0641ce7 refactor(desktop): surfaces declare their glass role
Glass thins the field tokens, so anything that needs a fill for a reason of
its own had to be exempted. Those exemptions were written as styles.css
reaching into other components by class name and slot -- .cursor-grabbing,
.composer-human-message-container, [data-slot='file-diff-panel'] -- which
puts the knowledge in the wrong file: rename the class, lose the fill, and
nothing fails until someone turns glass on over a diff.

There are only two roles. A surface that MASKS its siblings (the diff
gutter, a dragged row) must stay opaque or it reads as text through text. A
surface RAISED above the field (overlay cards, the inline edit box) stays
near-opaque and never thinner than the field behind it. Each one now says
which it is at its own call site, and styles.css styles the roles.

This also narrows the diff-panel rule to the sticky gutter that actually
masks, rather than the whole panel.
2026-08-18 00:57:01 -05:00
Brooklyn Nicholson 5851f9367c refactor(desktop): one mac check, one translucency atom
Three small dedupes in the surfaces this feature touches:

- GLASS_SUPPORTED was a fourth inline copy of "am I on a Mac" in the
  renderer. src/lib/platform.ts owns it now and the terminal's
  isMacPlatform re-exports it, so the two call sites can't drift.
- The store held intensity and mode as two atoms behind two localStorage
  keys with two subscriptions calling one sync. They are one setting: one
  atom, one key, one subscription. A pre-mode value under that key is a bare
  intensity, which has only ever meant clear -- read() keeps it there.
- global.d.ts re-declared the IPC payload as an inline union. It takes
  TranslucencyState, so widening the state can't leave the bridge behind.

isChatWindow is exported and takes its search string as a parameter, because
"which windows may thin their surfaces" is the contract worth pinning.
2026-08-18 00:57:01 -05:00
Brooklyn Nicholson d6adef6991 refactor(desktop): one owner for the translucency mapping
The mapping had grown three copies: the clear-mode ramp in
electron/window-opacity.ts, a second clamp + mode normalizer in
electron/translucency.ts, and a third clamp in the renderer store, with a
"keep in sync" comment standing in for a shared type. Anything the two
processes must agree on -- what a mode is, where the lever clamps, what
intensity means as an opacity -- now lives in apps/shared/src/translucency.ts
and both ends import it.

electron/translucency.ts keeps only the piece that needs a BrowserWindow to
mean anything (the constructor backing), and re-exports the rest so main.ts
has a single import. Its relative specifier is deliberate: the electron
bundle is built by esbuild with no tsconfig path resolution, so a bare
@hermes/shared/translucency would typecheck and then fail to bundle -- the
same constraint connection-registry.test.ts documents for backendScopeKey.

The renderer's tsconfig drops its reference to the electron project. With
both projects claiming the shared file, that edge made the renderer resolve
it through the electron project's build output and demand a prior
`tsc --build`. Nothing in src/ consumes electron's emitted types, so the
reference bought nothing; `npm run typecheck` still checks both projects.
2026-08-18 00:57:01 -05:00
SHL0MS 985db37cad fix(desktop): glass cold launch — omit backgroundColor instead of alpha-0
Constructor backgroundColor with alpha is silently treated as opaque on a
non-transparent window (Electron only documents constructor alpha with
`transparent: true`), so windows created while glass was persisted were
born with an opaque backing and the vibrancy material never showed —
exactly the state a user lands in after toggling glass on and relaunching,
or when the renderer re-reports the persisted state at boot (the IPC
handler correctly dedupes it, so no runtime swap ever fired).

Measured on macOS 26 / Electron 40 (side-by-side spike windows, pixel
luminance): ctor '#00000000' = flat opaque (lum 38, same as no glass);
omitting backgroundColor entirely = vibrancy visible (lum 57). Runtime
setBackgroundColor swaps are also LOST while a fresh process's compositor
is settling — swaps at 1s/3s/6s after creation never landed, including
from 'ready-to-show' and 'did-finish-load'; a 10s swap stuck. So cold
launches must be right at creation: windowBackingOptions() spreads either
{} (glass) or the themed anti-flash backing (everything else) into the
three chat-window constructors. The runtime swap path stays for live
Settings toggles, where the window is long settled.
2026-08-18 00:57:01 -05:00
SHL0MS 1eb9cbdb7a fix(desktop): glass was blocked by the webContents backing and two app-shell painters
Two opaque layers sat between the transparent page and the vibrancy material, so glass read as a slight lightening instead of a blur. The contrib shell root and the SidebarProvider wrapper paint full-window opaque fills above body; both are cleared under glass so body's tint is the window's only field paint. And Chromium composites the page against the window backgroundColor before macOS composites the window, so chat windows now get an alpha-0 backing when glass is active, at creation for cold launches and via setBackgroundColor on runtime toggles, scoped to registered chat windows so the transparent special-purpose windows (HUD, pet, quick entry) are untouched.
2026-08-18 00:57:01 -05:00
SHL0MS 0483133842 fix(desktop): even glass field via one painter; raise overlays; darken clear scrim
Session panes stayed nearly opaque under glass while the landing page and overlay cards showed the effect: the field surfaces nest (body, pane container, chat section, transcript wrapper all wear the surface tokens), so a per-token tint stacked once per layer and compounded toward opaque exactly where the pane tree is deepest. Body now paints the glass tint once and the field tokens go fully transparent, so the field alpha is one number on every route.

Overlay cards on OverlayView are marked data-glass-raised and pinned near-opaque (never thinner than the field), inverting the hierarchy the first cut had backwards: glass field behind, solid card in front. Mask surfaces (diff gutter, dragged sidebar row, inline edit box) get opaque fills back, and in clear mode the overlay scrim darkens and widens its blur so two uniformly faded layers of text stop fighting.
2026-08-18 00:57:01 -05:00
SHL0MS eb6f352be7 feat(desktop): matte glass option for window translucency
The translucency slider maps to native window opacity, which fades the whole window including text; over a busy wallpaper even low settings get hard to read. This adds a second mode to the same lever: Glass keeps the window opaque at the native level and instead thins the renderer's field surfaces (chat surface + sidebar) over the macOS vibrancy material every chat window already carries, so the desktop shows through as a smooth matte blur while text keeps full contrast.

One lever, two modes: Clear stays the default and is byte-identical in behavior; Glass is macOS-only (other platforms normalize to clear on both sides of the IPC). Mode persists next to intensity in translucency.json and localStorage, applies live to all open windows, and survives cold launch. Raised surfaces (cards, popovers, composer, terminal) keep opaque fills; the terminal surface is pinned because xterm resolves its background to a concrete color for its canvas.
2026-08-18 00:57:01 -05:00
Nicky Molina 374779dae8 fix(desktop): curve window translucency so the whole lever is usable
setOpacity fades the entire window, text included, so the band a user can
still read in sits just under opacity 1. The linear ramp spent that band
in its first ~7% and the remaining travel on settings nobody can work in:
combined with the old 5% step, the lever had about two usable stops.

Curve the ramp instead. Both endpoints are bit-identical to the linear
mapping -- 0 is byte-for-byte the opaque window and 100 is still the 0.3
floor -- while the readable band now covers roughly the first third of the
travel.

Extract the mapping and its clamp into electron/window-opacity so it is
reachable from tests, following the electron/zoom split. main.ts keeps
ownership of the persisted intensity and passes it in.
2026-08-18 00:57:01 -05:00
Nicky Molina 62beeeef84 fix(desktop): finer window translucency steps
The Window Translucency slider moved in fixed 5% jumps, so a 0-100 lever
had only 21 stops packed into a 160px control -- and arrow-key nudges
skipped 5 at a time. The settings that are actually readable live at the
low end, so the coarse step made most of them unreachable.

Step in single percent, and hoist the bounds into named constants beside
the atom that owns them, mirroring PET_SCALE_MIN/PET_SCALE_MAX so the
control and the clamp read from one source.
2026-08-18 00:57:01 -05:00
Teknium 30fcf95805 fix(bot-mode): group chats no longer lose long-running member turns, remade groups start fresh (Discord bot-mode feedback)
From db's bot-mode feedback thread (Discord support, Aug 17):

- A 7-minute member run timed out at the fixed 3-minute turn deadline, read
  as a (pass), and its finished result never reached the room. The turn
  deadline now extends while the session visibly reports inflight/running
  work (bounded by a 20-minute hard cap), and a turn that still times out
  records a runtime 'stranded' baseline so the finished reply is harvested
  into the room at the next turn boundary — late, never lost. Stranded
  markers persist with the room so a reply that finishes after a window
  reload is still delivered.
- Re-creating a group under a taken name (easy: the default name is just
  the member names) silently reopened the old room with its full log.
  Create now uniquifies against live rooms and every bot's current
  grouping, so a new group is always a fresh room.
- The generic 'The room is working…' line now names the member on turn
  ('Radar is thinking…') so slow models read as thinking, not stuck.
- Room prompt no longer caps every reply at 1-3 sentences: chatter stays
  short, but results/answers/substantive work are explicitly full quality
  and length (outputs felt 'not as strong as usual').
- Room markdown gets list/pre styling (padded bullets instead of browser
  defaults flush against the pane edge).

Tests: group-chat.test.mjs +7 (harvest posts late replies and consumes
markers, late (pass) consumes without posting, stranded persistence,
deadline-extension + turn-label + fresh-name source contracts, prompt
quality rule). 245/245 plugin tests pass.
2026-08-17 21:26:10 -07:00
hermes-seaeye[bot] bdc9a810f3 fmt(js): npm run fix on merge (#88888)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-08-18 03:51:37 +00:00
Teknium 898b423639 fix(desktop): force the enforced zone's tab strip visible — repairs the "only Bots shows, Sessions unreachable" regression
Community reports (Aug 2026): sidebars where sessions and the Bots pane were
already co-located in one group, but the group's tab strip was hidden
(headerHidden) with Bots holding the active tab — Sessions existed yet was
invisible with no strip to switch back ("my ui only shows bots now on the
side, cant find the sessions").

The enforce pass only re-homed panes in a DIFFERENT group than their anchor;
the co-located-but-hidden shape hit the early continue and was never
repaired (insertAtGroup's headerHidden:false pin only runs when an insert
happens). enforceDockedPanes now forces the anchor group's strip visible
when the enforced pane is already co-located — the active tab is not
stolen; the strip is simply reachable again.

New regression test reproduces the community shape (co-located +
headerHidden + bots active) and asserts the strip is forced visible;
sabotage-verified (reverting the repair fails exactly this test, 1F/5P).
2026-08-17 20:45:42 -07:00
Teknium 47eadccdc4 fix(desktop): SESSIONS | BOTS is always a tab strip — the Bots pane re-homes beside Sessions on every boot, no heal guards
The one-time dock heal from #88788 ('sessions-tab-v1') burned its token even
when its guards skipped the move, and exempted $userPlacedPanes — so exactly
the users who had fought the old stacked layout by dragging panes stayed
stacked forever (empirically reproduced on a live desktop: burned-token and
user-placed installs both keep the Bots pane split below Sessions on current
main). Replace the heal with an enforced dock invariant (dock.enforce: true):
the Bots pane re-homes into the sessions zone's tab strip at every boot's
first adoption pass, idempotent per boot so an intra-session drag sticks
until the next launch. The retired paneDockHeals.v1 ledger is dropped on
store load.
2026-08-17 20:45:42 -07:00