Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

feat(desktop): UI/UX polish - dark mode, stop button, keyboard shortcuts, accessibility

9 months ago

c76f8e5
Authored
mweinbach2/10/2026, 1:02:53 AM
Dark mode (Finding 10.1):
- Full dark theme via @media (prefers-color-scheme: dark) with CSS custom
  property overrides for all variables: --app-bg, --sidebar-bg, --panel-bg,
  --text, --muted, --accent, --danger, etc.
- 50+ class-specific dark mode overrides covering sidebar, nav, workspaces,
  threads, pills, topbar, feed, composer, bubbles, modals, context menus,
  markdown code blocks, skills browser, and settings pages.

Stop button (Finding 11.2):
- ChatView shows a red stop button (with square icon) when the agent is busy,
  replacing the send button. Clicking it sends a cancel message via the
  WebSocket protocol (leveraging Phase 3 cancel support).
- Added cancelThread() action to the Zustand store that sends { type: "cancel" }
  to the thread's WebSocket session.
- Stop button styled with --danger color, white square icon, dark mode variant.

Keyboard shortcuts (Finding 11.1):
- Cmd/Ctrl+N → new thread (global, works from any view)
- Escape → cascading dismiss: close prompt modal → close settings → cancel
  busy agent. Each level is checked in priority order.
- Shortcuts registered in a single global useEffect in App.tsx.

Accessibility (Finding 12.1, 12.2):
- Sidebar: role="complementary", aria-label on nav, region, list, listitem
  for workspace rows, role="menu"/role="menuitem" for context menus.
- App: <main> tag with role="main", toolbar role on topbar.
- ChatView: aria-label on textarea, stop button, send button.
- PromptModal: role="dialog", aria-modal="true", aria-label.
- New thread button shows keyboard shortcut hint in title.

Transitions (Finding 10.3):
- 150ms ease transitions on interactive elements (navItem, workspaceRow,
  threadRow, ctxMenuItem, buttons, pills, settings nav).
- Sidebar background transition 200ms.
- @media (prefers-reduced-motion: reduce) disables all transitions.

Focus management (Finding 12.2, 11.3):
- :focus-visible outline styles for all interactive elements using
  var(--accent) color with 2px offset.
- Textarea/input/select get 0 offset outlines.
- Auto-focus textarea when thread is selected.

All 889 tests pass, TypeScript and Rust compile clean.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Parent680797b

6 files changed
  • apps/desktop/src/App.tsx+38−4
  • apps/desktop/src/app/store.ts+5−0
  • apps/desktop/src/styles.css+229−0
  • apps/desktop/src/ui/ChatView.tsx+32−3
  • apps/desktop/src/ui/PromptModal.tsx+1−1
  • apps/desktop/src/ui/Sidebar.tsx+11−7