Skip to content

feat: macOS HIG improvements — vibrancy, shadows, keyboard nav, tooltips, context menus#26

Merged
siracusa5 merged 17 commits intomainfrom
feature/macos-hig
Mar 16, 2026
Merged

feat: macOS HIG improvements — vibrancy, shadows, keyboard nav, tooltips, context menus#26
siracusa5 merged 17 commits intomainfrom
feature/macos-hig

Conversation

@siracusa5
Copy link
Copy Markdown
Collaborator

Summary

Implements a comprehensive macOS Human Interface Guidelines pass on the desktop app. The goal is to close the gap between a web app in a window and a native-feeling macOS app — covering visual materials, keyboard interaction, and contextual affordances across all three phases of the plan.

Changes

Phase 1 — Visual polish (CSS-level)

  • Sidebar vibrancy: activated --bg-sidebar translucency + backdrop-filter: blur(20px) on the sidebar <aside> — the single highest-impact visual change
  • Shadow depth system: added --shadow-sm/md/lg/popover tokens to :root and .dark (dark mode uses higher opacity); replaced all 5 hardcoded rgba(0,0,0,...) shadow values with tokens; added box-shadow: var(--shadow-sm) to .row-list
  • Modal backdrop blur: backdrop-filter: blur(8px) on the secrets modal overlay scrim
  • Cursor consistency: audit log hover effect now gated on entry.details (matching the pointer cursor condition); added cursor: text to .form-input / .form-textarea

Phase 2 — Interaction

  • Tooltip component: polished delayed tooltip (500ms, immediate hide) with HIG-appropriate styling; replaces title= attributes on accent swatches, chart override buttons, "Score with AI"
  • Global keyboard shortcuts: useGlobalShortcuts hook — ⌘, toggles preferences, ⌘1–5 navigate to the 5 nav sections, Escape closes preferences panel and secrets modal
  • Arrow key navigation: useArrowNavigation hook (ArrowUp/Down/Home/End/Enter, resets on list change, bounds-guarded); wired to Sessions, AuditLog, ComparatorHistory list views and the sidebar subnav
  • Empty state polish: SVG icons + improved messaging/CTAs in all 6 empty states (Plugins, Sessions, Secrets, AuditLog, History, Browse)

Phase 3 — Features

  • ContextMenu component: positioned-at-cursor, click-away + Escape dismiss, danger item styling; right-click menus on Plugins (Copy name), Sessions (View details, Copy session ID), Comparator History (Review, Delete), Audit Log (Copy details/summary)
  • Window state restoration: tauri-plugin-window-state v2 added — window remembers position/size between launches

Test Plan

  • 152 unit tests pass (pnpm --filter harness-kit-desktop test)
  • TypeScript: no new type errors introduced
  • Light and dark mode visually verified (sidebar vibrancy, shadow tokens)
  • prefers-reduced-motion respected (no new CSS animations added)
  • CI checks pass

Notes

Known follow-up items (not blocking):

  • ContextMenu does not clamp to viewport edges — rows near the window bottom/right will render partially off-screen
  • Arrow-navigated rows don't scrollIntoView — keyboard focus can move out of visible area in long lists
  • ContextMenu and SidebarSubnav lack role="menu" / role="menuitem" ARIA attributes

Scope note: This branch was created from 3201dc0. Main gained 9 commits during this work (board pages, security fix). The board files appearing in the diff are additions to main that this branch predates — they'll be present after merge.

🤖 Generated with Claude Code

siracusa5 and others added 17 commits March 16, 2026 02:50
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- useGlobalShortcuts hook: ⌘, toggles preferences, ⌘1–5 navigates to
  the five main sections, Escape closes preferences panel
- AppLayout wires up the hook via useNavigate + setSettingsOpen
- SecretsPage: Escape key closes the secret-entry modal

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements useArrowNavigation hook and wires it up to SessionsPage,
AuditLogPage, ComparatorHistoryPage, and the AppLayout sidebar subitems
for full keyboard-driven list traversal (ArrowUp/Down, Home, End, Enter).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds the reusable hook that powers arrow key navigation across list views.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…debar subnav

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add ~32px SVG icons to empty states across 6 pages (PluginsPage,
SessionsPage, SecretsPage, AuditLogPage, ComparatorHistoryPage,
BrowsePage) using var(--fg-subtle). PluginsPage gains a "Browse
Marketplace →" button CTA and useNavigate import.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds tauri-plugin-window-state v2.4.1 to automatically save and restore
window position and size across app launches.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Restore pub mod security + pub mod security_db to commands/mod.rs
  (these were missing from the branch base; main fixed them in 3485d0b)
- Remove accidentally added `join` import from harness-fs.ts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@siracusa5 siracusa5 merged commit 5164063 into main Mar 16, 2026
5 checks passed
@siracusa5 siracusa5 deleted the feature/macos-hig branch March 16, 2026 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant