Skip to content

feat(desktop): shared overlay Panel primitive for cron/profiles/agents - #54558

Merged
OutThisLife merged 5 commits into
mainfrom
bb/overlay-panels
Jun 29, 2026
Merged

feat(desktop): shared overlay Panel primitive for cron/profiles/agents#54558
OutThisLife merged 5 commits into
mainfrom
bb/overlay-panels

Conversation

@OutThisLife

@OutThisLife OutThisLife commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Why

The Cron, Profiles, and Agents overlays were three separate hand-built layouts that drifted apart from the polished agents/trace overlay (and from each other) — inconsistent headers, spacing, row styling, empty states, and action placement. This unifies them behind one primitive and tightens the surrounding form-control + popover chrome so the desktop reads as one system.

What

overlays/panel.tsx — new reusable overlay primitive (lifted from the agents/trace overlay's visual language):

  • Panel (centered card), PanelHeader (title/subtitle/actions), PanelBody, PanelList (master list with built-in, pinned search), PanelListRow (dense single-line rows + leading slot + menu), PanelDetail, PanelEmpty, PanelRowMenu, PanelAddButton, plus PanelMeta / PanelBlock / PanelPill / PanelSectionLabel / PanelAction helpers.

Adopted in Cron, Profiles, and Agents:

  • One shared chrome + width; rows match the trace label density and use the --ui-row-* hover/active vars.
  • Row actions (rename/delete, edit/delete) live in a menu matching the session-row pattern; primary cron actions (pause/resume/trigger) stay visible.
  • "New" is a self-describing + as the last list item; empty states drop the sidebar and offer a small inline CTA.
  • Profiles rows reuse the sidebar rail's color swatch / default home glyph and the shared $profileColors.

Surrounding polish (same consistency pass):

  • OverlayView now insets equidistantly on all sides (was top/left-only — a fixed --titlebar-content-inset left a large left gutter on narrow windows). OverlaySplitLayout/settings adjusted to match.
  • Form-control chrome is now driven by per-mode theme-var knobs: --dt-input-border (resting alpha, ×2 hover, solid on focus and while a Select is open), --dt-input-bg, and a classic recessed --dt-input-inset. Single source for Input / Textarea / SelectTrigger.
  • Thread-timeline popover pulls its surface from the shared dropdown/menu rule (1:1 with the kebab menus) and scrolls the hovered prompt into view.
  • i18n: adds cron.title / cron.count / profiles.search across all locales.

Test plan

  • npm run typecheck and eslint clean
  • Open Cron / Profiles / Agents: header alignment, search, actions, empty states, + create
  • Resize to a narrow window — overlay stays ~full-width with equal margins
  • Light + dark: input borders blend at rest, strengthen on hover, solid on focus / open Select; recessed inset reads in both modes
  • Thread timeline: hover a tick scrolls its prompt into view; popover border matches the rename/delete menu

…tive

Extract the agents/trace overlay chrome into overlays/panel.tsx and adopt it
across the Cron, Profiles, and Agents overlays so they share one layout
(centered card, header, master/detail list with built-in search, kebab row
actions, big "+" footer, empty state) instead of three ad-hoc split layouts.

Also in this pass:
- OverlayView insets equidistantly on every side (was top/left-only, which
  left a large left gutter on narrow windows).
- Form-control chrome: input border/background/recessed-inset are now
  per-mode theme-var knobs (--dt-input-border/-bg/-inset) — resting borders
  blend in, strengthen on hover, and go solid on focus / while a Select is open.
- Thread-timeline popover reuses the shared dropdown surface (1:1 with the
  kebab menus) and scrolls the hovered prompt into view.
Remove zero-consumer overlay code surfaced while auditing the primitive set:
OverlayNewButton (orphaned once "New" moved into PanelAddButton), OverlayCard /
overlayCardClass, and the unused overlay-search-input module. Leaves three
intentional layers: OverlayView (base), Panel (master/detail), and
OverlaySplitLayout (settings/command-center nav→content).
Repo-wide `npm run fmt` + `eslint --fix`; also drop two unused destructured
params in titlebar-overlay-width.cjs so the lint run is clean.
@alt-glitch alt-glitch added type/refactor Code restructuring, no behavior change comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have labels Jun 29, 2026

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Verdict: LGTM

This is a clean, well-scoped UI refactoring that introduces a shared Panel component system (panel.tsx) and refactors the cron, profiles, and agents overlay views to use it.

Key observations:

  • New panel.tsx (377 lines): Well-documented composite component with clear composition pattern (Panel > PanelHeader > PanelBody > PanelList/PanelDetail). The API is intuitive and matches the existing design language.
  • Mechanical refactoring: The cron, profiles, and agents views are updated to use the new Panel primitives. The changes are structural — same behavior, new component wrappers.
  • Old components removed: OverlayCard, OverlayNewButton, OverlaySearchInput, StatePill are removed as they're now covered by Panel* equivalents. Clean deletion.
  • Formatting cleanup: Minor line-wrapping and blank-line additions are consistent with the codebase style.
  • No security concerns: No secrets, no new env vars, no credential handling changes.
  • No new features: Pure refactoring — existing behavior preserved.

The contribution rubric explicitly welcomes this type of work: "Refactor god-files into clean modules" even with large diffs.


Reviewed by Hermes Agent

- Gateway status popout: flatten the header to stacked connection + inference
  statuses with system-panel and restart actions (reusing the shared
  runGatewayRestart helper). The recent-activity tail is now live while the
  popout is open via the shared LogView (WS connection churn filtered), and the
  icon / "View all logs" link dismiss the popover.
- Statusbar "menu" items accept a menuContent(close) render fn over a now
  controlled DropdownMenu, so popover content can close itself.
- Drop the always-on gateway-log poll from useStatusSnapshot (logs are fetched
  by the popout only while open).
- SearchField → text-xs to match Input/Select (controlVariants).
- Command center: remove the usage/system section dividers, swap the sessions
  nav icon (Pin → MessageCircle), small padding tweaks.
Revert the repo-wide prettier churn the earlier fmt pass pulled into files
unrelated to this work; run prettier/eslint scoped to the touched files only.
@OutThisLife
OutThisLife enabled auto-merge June 29, 2026 02:31
@OutThisLife
OutThisLife merged commit 83f09f5 into main Jun 29, 2026
20 checks passed
@OutThisLife
OutThisLife deleted the bb/overlay-panels branch June 29, 2026 02:32
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
…nels

feat(desktop): shared overlay Panel primitive for cron/profiles/agents
habarmc1223-sudo pushed a commit to habarmc1223-sudo/hermes-agent-fluxmem that referenced this pull request Jul 8, 2026
…nels

feat(desktop): shared overlay Panel primitive for cron/profiles/agents
santhreal pushed a commit to santhreal/hermes-agent that referenced this pull request Jul 13, 2026
…nels

feat(desktop): shared overlay Panel primitive for cron/profiles/agents
Gravezzz pushed a commit to Gravezzz/hermes-agent that referenced this pull request Jul 21, 2026
…nels

feat(desktop): shared overlay Panel primitive for cron/profiles/agents
leewenjie pushed a commit to leewenjie/hermes-agent that referenced this pull request Aug 7, 2026
…nels

feat(desktop): shared overlay Panel primitive for cron/profiles/agents
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 type/refactor Code restructuring, no behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants