Skip to content

feat(workspace): ⌘/ focuses the sidebar search, and the rail shows shortcut tips (ent#621 follow-up) - #3249

Draft
trinity-ability wants to merge 2 commits into
feature/ent621-workspace-keymapfrom
feature/ent621-search-key-and-hints
Draft

trinity-ability wants to merge 2 commits into
feature/ent621-workspace-keymapfrom
feature/ent621-search-key-and-hints

Conversation

@trinity-ability

Copy link
Copy Markdown
Contributor

Follow-up to abilityai/trinity-enterprise#621, requested by the operator while trying the keys. Stacked on #3241, so the base is feature/ent621-workspace-keymap; it merges after #3219 and #3241, on the operator's call. Draft until then. Frontend and docs only.

What

  • ⌘/ (Ctrl+/) puts the cursor in the sidebar's "Search agents and chats" field and selects what is in it. Pressed again from the field, it hands the caret back to the message field. Below sm the sidebar is the drawer, so the key opens it and focuses that instance. The chord echoes the Dashboard's / filter key. The field shows it three ways: a key cap while empty and unfocused, title, and aria-keyshortcuts.
  • The shortcuts list moves to ⌥/ to free the chord, keeping the ⌘. / ⌥. pairing. ⌘K stays reserved and unbound.
  • Shortcut tips in the rail (PortalKeyTips.vue): a small panel pinned to the bottom of the open rail. Two rows of two (switch agent, switch chat, search, new chat) with the close and open-the-list controls stacked beside them, 80px tall. The collapsed strip carries one icon at its foot instead; the mobile sheet carries neither. Dismissible, remembered per browser (localStorage).
  • keyHintCompact packs a chord pair that differs only in its last key into one cap (⌥↑↓, Alt+Shift+↑↓), and falls back to keyHint for anything it cannot pack without losing something.
  • PortalKeyCap.vue: one <kbd> recipe for the key list, the tips and the search field.
  • Everything printed is derived from WORKSPACE_KEYMAP (KEY_TIPS -> keyTipRows); nothing is hand-typed.
  • Docs: docs/memory/requirements/core-agent.md §5.21a (AC-1 and AC-9 amended, AC-11 and AC-12 added, written before the code) and the chat-tabs feature flow.

Operator rulings carried

  • ⌘/ for search (operator, 2026-10-05).
  • The panel is small, closable, and two rows by two columns (operator, 2026-10-05).

Decisions made here, for the operator to overrule:

  • The shortcuts list went to ⌥/ rather than losing its chord.
  • With the rail collapsed there is an icon, not a floating panel over the conversation.
  • The panel's "all shortcuts" control is icon-only, which is what keeps it to two rows.
  • A closed panel has no "bring it back" control; the sidebar footer button still opens the full list.

Tests

  • Written first; 27 red before the first commit, 4 more red before the two-row layout.
  • workspaceKeymap.spec.js (the new chords, keyHintCompact, keyTipRows, the dismissal storage), workspaceKeymap.mount.spec.js (the search key in the mounted shell: column, drawer, return to the composer, suppression under a dialog, allowed during a call; the dismissal surviving a remount), portalKeyTips.mount.spec.js (the panel in all three rail forms), portalKeyHints.mount.spec.js (the search field's key cap and focusSearch).
  • Full frontend unit suite locally: 271 of 272 files, 4803 tests. The one failure (markdownCodeBlocks.spec.js, a check of the installed DOMPurify) fails in the local container on the base branch too.
  • Browser (Chromium, macOS, local stack): search focus, select and return; ⌥/; the panel button; dismissal across a reload; light and dark. The two-row layout was measured at the default rail width and at the narrowest (280px), with Mac labels and with Windows labels (platform faked, not a Windows machine): two rows, no wrapped key cap, no horizontal overflow. Windows labels shorten with an ellipsis at the narrowest width.

Before merge

🤖 Generated with Claude Code

trinity-ability and others added 2 commits October 5, 2026 17:56
…cut tips (ent#621 follow-up)

- `⌘/` (Ctrl+/) puts the cursor in the sidebar's "Search agents and chats"
  field and selects its text; pressed again from the field it hands the
  caret back to the message field. Below `sm` it opens the drawer and
  focuses that instance. The field shows the chord (key cap, title,
  aria-keyshortcuts). Chosen to echo the Dashboard's `/` filter key.
- The shortcuts list moves to `⌥/` to free the chord, keeping the
  `⌘.` / `⌥.` pairing.
- `PortalKeyTips`: a small panel pinned to the bottom of the open rail with
  four headline chords and an "All shortcuts" button; one icon at the foot
  of the collapsed strip; neither on the mobile sheet. Rows are derived
  from the key map (`KEY_TIPS` -> `keyTipRows`). Dismissible, remembered
  per browser in localStorage.
- `PortalKeyCap`: the one `<kbd>` recipe for the key list, the tips and the
  search field.

Requirements: core-agent.md 5.21a AC-1/9 amended, AC-11 and AC-12 added.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ollow-up)

The panel was a heading, four rows and a footer button (213px). It is now
two rows of two with the close and open-the-list controls stacked beside
them (80px), and nothing above or below.

- `keyHintCompact` packs a chord pair that differs only in its last key
  into one cap (`⌥↑↓`, `Alt+Shift+↑↓`); anything it cannot pack without
  losing something falls back to `keyHint`.
- Columns size to their content; when the rail is dragged narrow a label
  shortens with an ellipsis (full text on hover) while a key cap never
  wraps and a row never becomes two.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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