Skip to content

feat(workbench): one surface, row and tooltip for menus and popovers - #6733

Merged
Astro-Han merged 3 commits into
rust-previewfrom
feat/workbench-menu-surfaces
Nov 10, 2026
Merged

Astro-Han merged 3 commits into
rust-previewfrom
feat/workbench-menu-surfaces

Conversation

@Astro-Han

@Astro-Han Astro-Han commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Menus, selects, context menus, popovers and tooltips each set their own inset (4, 6 or 8), fill, row geometry and colors, and none cast a shadow, so the sandbox, folder and completion menus blended into the composer they open over. They now share one surface, one row and one tooltip from ui.tsx, and DESIGN.md records the rules under Menus and popovers.

  • One floating surface (floatingStyle): one step above the panel (floating: background in light, raised in dark), one line border and one shadow, radius 12 and inset 4 so 8-radius rows are concentric. Every menu, select, context menu and popover in the workbench and the composer uses it. Rows inside hover and take focus with floatingRaised, since the dark surface is already raised.
  • One menu row (menuRowStyle): 32 points high, a 16-point icon 12 points from the edge, text at 36, a trailing lane for the check, switch or shortcut. No titles or close buttons; the trigger names the menu and Escape or a press outside closes it.
  • Sandbox and approvals: each access level has its own icon and a trailing check instead of radio buttons; full access reads in warning and says what it means. Approval requests become one switch row whose detail replaces the separate note; a new draft that still inherits the Host's setting shows Default rather than a guessed On or Off.
  • Recent folders: one line per folder, following Codex; the path moves to the tooltip, and a parent folder's name is added only when two names collide. The remove command is gone: the journal keeps the latest ten on write and on read (workspaces.rs), an unavailable folder already has Retry, so set_recent_workspace loses its remember flag.
  • Conversation actions: no title, distinct icons (children and fork, rename and compaction prompt no longer share one), 32-point rows grouped by purpose, an ellipsis on the commands that open an editor, and one term in zh-CN (对话, 分支) across the menu.
  • Composer completions: a section name per kind (Commands, Skills, Files) instead of one title that said "Skills" over commands; one row per item with the description on the same line, the name kept whole and the description truncated; one highlight for the current row, hover and focus; a borderless search row with a separator in place of a filled field. Add to message moves its shortcuts to the trailing lane, groups its rows and gives Goal its own icon.
  • Send-button menu: the shared surface and rows; Esc sits in the trailing lane instead of a tooltip on the item.
  • Tooltips keep NSH's bubble (tooltipLook: popover fill, border, radius 6, no shadow, not inverted) but read Maka's colors, so custom palettes reach them; turn navigation and image previews use NSH's rich variant.
  • Seven Lucide icons are added through scripts/lucide.py (eye, file-pen, shield-off, hand, list-tree, fold-vertical, goal).

Before / after

Desktop test renderer (Helvetica), same fixtures. Left: rust-preview baseline; right: this branch. The first three rows are 1280×800; the completion rows reuse desktop_new_draft_completes_commands_skills_and_files_without_creating_a_session at 1280×800 with one extra capture for the + menu.

Before After
Sandbox and approvals, light Before: Sandbox and approvals, light After: Sandbox and approvals, light
Recent folders, light Before: Recent folders, light After: Recent folders, light
Conversation actions, light Before: Conversation actions, light After: Conversation actions, light
Completions after /set, light Before: Completions after /set, light After: Completions after /set, light
+ Add to message, light Before: + Add to message, light After: + Add to message, light
Skill search, light Before: Skill search, light After: Skill search, light
Sandbox and approvals, dark Before: Sandbox and approvals, dark After: Sandbox and approvals, dark
Recent folders, dark Before: Recent folders, dark After: Recent folders, dark
Conversation actions, dark Before: Conversation actions, dark After: Conversation actions, dark
Completions after /set, dark Before: Completions after /set, dark After: Completions after /set, dark
+ Add to message, dark Before: + Add to message, dark After: + Add to message, dark
Skill search, dark Before: Skill search, dark After: Skill search, dark

Review focus

  • products/maka/client/src/tests/workspaces.rs has not been compiled since feat(agent): add durable execution and interruption recovery #6713 removed mod tests; from lib.rs. This PR deletes it and adds journal::workspaces::tests::recent_workspaces_keep_the_latest_ten_without_duplicates beside the code; that test fails without the cap.
  • The send-button menu and the turn-navigation tooltip are not in the screenshots: the menu needs a running turn, and the desktop tests that start one fail on this machine before reaching it (below).

Verification

  • Desktop tests (cargo nextest run -p maka-cli -p maka-desktop-shell --features maka-cli/desktop-tests --test native-desktop): 17 of 21 pass, including the completion, folder and model-settings cases. desktop_continues_a_failed_run_without_duplicating_the_user_message, desktop_goal_commands_create_pause_resume_and_finish_without_losing_the_draft, desktop_lists_a_scripts_tool_calls_in_place_of_the_script and desktop_steering_freezes_each_message_and_queue_is_one_shot fail the same way on origin/rust-preview (bb914bde38) on this machine: the submitted message never reaches the fixture provider.
  • maka-workbench nextest 27/27; maka-app-client 1/1 (the new journal test).
  • UI typecheck (ui_types + tsc), tsc -p products/maka/bundle, node scripts/ci.mjs check format clean; cargo clippy --no-deps -- -D warnings on maka-app-client and maka-workbench clean.
  • Adversarial review by GPT 6.1 Sol (Codex CLI, medium) found no P0/P1 and two P2s, both fixed in a4985ca2f7: the inherited approval state drawn as Off, and recents stored before the cap not capped on read.
  • Not checked by hand in the AppKit app: the shadow and pointer hover on the real text system.

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Claude Code wrote the implementation, the tests and this description; GPT 6.1 Sol (Codex CLI) reviewed the branch. The commits carry Generated-by: Claude Code trailers.

Checklist

  • Tests cover the change and fail without it
  • Format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

🤖 Generated with Claude Code

Astro-Han and others added 3 commits November 10, 2026 15:54
Menus, selects, context menus and popovers each set their own inset
(4, 6 or 8), fill and row geometry, and none of them cast a shadow, so
a popover over the composer blended into it. They now share
`floatingStyle` and `menuRowStyle` from ui.tsx: one step above the
panel, a line and a shadow, radius 12 with inset 4 so rows (radius 8)
are concentric, an icon lane at 12 points and text at 36.

- Sandbox and approvals: no title or close button; access levels get
  their own icons and a trailing check instead of radio buttons, full
  access reads in warning with its consequence, and approval requests
  become one switch row whose detail replaces the separate note.
- Recent folders: one line per folder (the path moves to the tooltip, a
  parent name is added only when names collide) and no remove command.
  The list keeps the latest ten, so the `remember: false` path is gone.
- Conversation actions: no title, distinct icons (children and fork,
  rename and compaction prompt no longer share one), 32-point rows,
  groups by purpose, an ellipsis on commands that open an editor, and
  one term (对话, 分支) across the menu.
- Rows inside every floating surface hover with `floatingRaised`, since
  the dark surface is `raised` and the old hover would vanish.

DESIGN.md records the rules under "Menus and popovers".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Generated-by: Claude Code (Claude Opus 5.5)
…he menu rules

The composer's completion list, its send-button menu and the three
tooltip variants still drew their own surfaces after the first pass.

- Completions use the floating surface and menu row: 32-point rows with
  the description on the same line, a section name per kind (Commands,
  Skills, Files) instead of one title that said "Skills" over commands,
  one highlight for the current row, hover and focus, and a borderless
  search row with a separator in place of a filled field that would
  vanish on the light surface. "Add to message" moves its shortcuts to
  the trailing lane and gives Goal its own icon.
- The send-button menu uses the shared surface and rows; Esc sits in
  the trailing lane instead of a tooltip on the item.
- Tooltips keep NSH's bubble but read Maka's colors, so custom palettes
  reach them; turn navigation and image previews use the rich variant.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Generated-by: Claude Code (Claude Opus 5.5)
…ents on read

Review of the menu redesign found two gaps.

- A new draft's approval setting is null until the user picks one: it
  inherits the Host's setting when the conversation is created. The
  switch drew that as Off while the conversation would still ask for
  approval. It now reads Default until a value is chosen.
- The ten-folder cap ran only on writes, so a list stored before it
  kept every folder until the next selection. Reading now caps too.

The client's tests/workspaces.rs has not been compiled since #6713
removed `mod tests;` from lib.rs, so it never ran; a test beside
`workspaces::set` replaces it and fails without the cap. Completion rows
also keep the name whole and truncate the description first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Generated-by: Claude Code (Claude Opus 5.5)
@Astro-Han Astro-Han changed the title feat(workbench): one surface and row for menus and popovers feat(workbench): one surface, row and tooltip for menus and popovers Nov 10, 2026
@Astro-Han
Astro-Han marked this pull request as ready for review November 10, 2026 08:09
@Astro-Han
Astro-Han merged commit 1cf7ea3 into rust-preview Nov 10, 2026
25 of 31 checks passed
@Astro-Han
Astro-Han deleted the feat/workbench-menu-surfaces branch November 10, 2026 08:09
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