Skip to content

feat(ui): native-feeling menus, notices and one vocabulary - #180

Merged
devswha merged 1 commit into
mainfrom
fix/ui-medium-ux
Sep 27, 2026
Merged

devswha merged 1 commit into
mainfrom
fix/ui-medium-ux

Conversation

@devswha

@devswha devswha commented Sep 26, 2026

Copy link
Copy Markdown
Owner

Stacked on #179 (base fix/ui-quick-polish); retarget to main once #179 merges.

Summary

Second batch of the native-app design review.

Notices and menus

  • Every window.alert (21 in the sidebar controller) → a root Toaster (showToast / showErrorToast): non-blocking, top centre, at most three, errors 8s / notices 4s, held while hovered or focused.
  • useAnchoredPopup: the six composer popups (model, preset, permission mode, skills, worktree, workspace target) now share one implementation — portal, anchored above/below and clamped, outside press + Escape close with focus return, arrow-key navigation (none of them had it; the skill picker ignored Escape).
  • Context menus: secondary click on a conversation or workspace row opens its full action set at the pointer (useContextMenu) instead of WebKit's "Open Link in New Window" menu.

Permission card

  • The whole command is shown, wrapped, instead of one truncated line.
  • "Always allow/deny …" are quiet actions on the left; Deny / Allow on the right.
  • ⌘↩ / Ctrl+Enter approves the oldest plain request; the plan card's Build finally answers to the ⌘↩ it always displayed. A text field keeps the chord.

Sidebar

  • A conversation listed in both Active and its workspace is highlighted only where it was picked; a workspace row is highlighted only when it is itself the selection.
  • One vocabulary in all 10 locales: workspace and conversation. "New work item" → "New conversation"; left "Work" → "Active" (no longer collides with the agent panel's Work). Keys that only existed as English fallbacks (archive dialog, add-workspace dialog, primary nav label) are now translated.

Composer and transcript

  • Worktree choice is a composer popup, not a bordered native <select>; a running session's location is a tag, not a lookalike button.
  • Context gauge is a filled wedge in an outline — it no longer reads as a second spinner beside Stop.
  • Scroll-to-bottom sits at the column's trailing edge, off the reading line.
  • Work block / tool rows start on the prose edge (measured: chevron 361 → 357 = prose).
  • Agent panel shows a conversation worktree as "<repo> worktree" and branch job/<8-char id>, full values in the tooltip.

Cleanup

  • Retired dead activeTab / AppTab plumbing and the no-op "Go to Chat" palette action, with their locale keys.
  • --success / --favorite tokens replace the last emerald/amber classes (DESIGN.md updated).

Kept on purpose

  • Escape while a run is stoppable still stops the run even with a picker open (pinned by ModelAndReasoningPicker.dom "global Stop owns Escape"). Worth revisiting as a product decision: Escape on an open menu currently kills the run.

Verification

  • typecheck, lint, check:identity, vite build: pass. test:e2e:gjc 8/8.
  • Full suite: server 1449/0, server-bun all 13 files, client 529/0, client-bun all 73 files. scripts 6 failures are the same pre-existing ones as on an untouched checkout (patch appliers / release archive).
  • New tests: Toaster.dom, useAnchoredPopup.dom (Escape/focus, arrows, outside press, Stop-owns-Escape), context menu in SidebarSessionItem.menu.dom, SidebarContent.selection.dom, permission shortcut + full command in PermissionRequestsBanner.dom, worktree picker, environment labels, gauge shape.
  • Visual QA with puppeteer against a dev server on the dev DB: context menu, permission popup with arrow keys, worktree popup (light), transcript alignment.

Notices and menus
- Replace every window.alert with a root Toaster (showToast/showErrorToast):
  non-blocking, top centre, held while hovered, errors 8s / notices 4s.
- Composer popups (model, preset, permission, skills, worktree, workspace
  target) share useAnchoredPopup: portal, anchored/flipped and clamped,
  outside-press and Escape close with focus return, arrow-key navigation.
  Escape still stops a running turn first, as before.
- Secondary click on a conversation or workspace row opens its full action
  set at the pointer (useContextMenu) instead of WebKit's link menu.

Permission card
- Show the whole command, wrapped, instead of one truncated line.
- Standing rules (Always allow/deny) become quiet actions on the left;
  Deny / Allow stay on the right. Cmd/Ctrl+Enter approves the oldest plain
  request, and the plan card's Build now answers to the ⌘↩ it always showed.
  A text field keeps the chord, so a draft never turns into an approval.

Sidebar
- A conversation listed in Active and in its workspace is highlighted only
  in the list it was picked from; a workspace row is highlighted only when
  it is the selection itself.
- One vocabulary in all ten locales: workspace and conversation. "New work
  item" is "New conversation", the left "Work" section is "Active".
  Missing keys that were only English fallbacks are now translated.

Composer and transcript
- The worktree choice is a composer popup, not a bordered native select;
  a running session's location is a tag, not a lookalike button.
- The context gauge is a filled wedge in an outline, so it no longer reads
  as a second spinner beside Stop.
- Scroll-to-bottom sits at the column's trailing edge, off the reading line.
- Work block and tool rows start on the prose edge.
- The agent panel shows a conversation worktree as "<repo> worktree" and its
  branch as job/<short id>, keeping full values in the tooltip.

Cleanup
- Retire the dead activeTab/AppTab plumbing and the no-op "Go to Chat"
  palette action, with their locale keys.
- success/favorite tokens replace the remaining emerald/amber classes.
@devswha
devswha changed the base branch from fix/ui-quick-polish to main September 27, 2026 05:47
@devswha devswha closed this Sep 27, 2026
@devswha devswha reopened this Sep 27, 2026
@devswha
devswha merged commit c0dc1e6 into main Sep 27, 2026
6 checks passed
@devswha
devswha deleted the fix/ui-medium-ux branch September 27, 2026 06:27
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