Skip to content

Activity → History: keyboard support for the entry list (↑/↓ navigation + ⌘C to copy) #567

Description

@Fe2-O3

Feature request

Make the Activity → History entry list keyboard-navigable:

  1. ↑ / ↓ move the selection within the History list when the list is focused (click into it, then arrow up/down to move between entries — today the arrows move the sidebar selection instead: Stats ↔ History ↔ File Transcription).
  2. ⌘C copies the selected entry (respecting the search field, so it never shadows text copy there). Return/Enter could also copy or open.

Why

Once you're browsing history, reaching for the mouse to change rows is friction. Arrow-key navigation + ⌘C is the standard macOS list interaction (Finder, Mail, Notes) and pairs naturally with the copy gestures.

Root cause (why it doesn't work today)

The history entry list is a custom ScrollView + LazyVStack of .buttonStyle(.plain) Button rows with a manual @State selectedEntryID, not a focusable List(selection:) / Table. Because the list never becomes the keyboard first responder:

  • arrow keys are handled by the sidebar's navigation instead of the list, and
  • the standard Copy command never reaches the list, so a .onCopyCommand on it doesn't fire — which is why ⌘C currently does nothing for a selected history entry.

Possible approaches

  • Make the list container focusable and handle .onMoveCommand / .onKeyPress for ↑/↓ plus .onCopyCommand for ⌘C, keeping the current custom row visuals; or
  • Migrate the custom list to a List(selection:), which gives arrow-key navigation and the Copy command "for free" (at the cost of a larger visual/layout change to reconcile with the existing row styling).

Relationship to #566

Split out from #566, which adds double-click, right-click, and Copy-button copying to the History list (with a small "Copied" toast near the cursor) — all of which work without keyboard focus. ⌘C was attempted in #566 via .onCopyCommand but couldn't fire because of the focus issue above, so it's tracked here to be implemented properly alongside arrow-key navigation. Happy to take this on as a follow-up PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions