Skip to content

fix(ui): move through the ☰ menu with the keyboard - #2046

Merged
benceruleanlu merged 3 commits into
mainfrom
mar/title-menu-keyboard
Nov 12, 2026
Merged

benceruleanlu merged 3 commits into
mainfrom
mar/title-menu-keyboard

Conversation

@mariana953

@mariana953 mariana953 commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

The ☰ menu in the title bar could only be used with a mouse. With the keyboard you could open it and close it with Escape, but not pick anything. Now the arrow keys move between the options and Enter opens the one you're on.

Summary

  • Arrow keys move through the ☰ menu items. They skip the dividers and wrap from the last item to the first, and back.
  • Home / End jump to the first and last item.
  • Enter or Space opens the focused item, the same as clicking it.
  • The focused item uses the same highlight as hover, and it only shows when you're using the keyboard (focus-visible).
  • When the popup closes, the focus clears, so the menu reopens with nothing highlighted.
  • The list now has role="menu", to match its menuitem rows.

Why now: #2016 moves Performance Tests and Benchmarks from the sidebar into this menu. In the sidebar they were reachable with the keyboard, so without this they wouldn't be. CodeRabbit flagged it on #2016. The gap was already there on main for every item in the menu, so this fixes it for all of them.

Before / After

Before After (two presses of ↓)
↓ does nothing, no item is highlighted

Telemetry

No new events. Enter goes through the same activate path as a click, so whatever a menu item already logs is unchanged.

Test plan

  • MenuView.test.ts (new): arrows move and wrap past the separator, Home and End, Enter and Space open the focused item, Enter with nothing focused does nothing, focus clears on blur. The title popup tests (113) pass 3 times in a row.
  • Prettier, ESLint and typecheck:web are clean.
  • Checked in the built app: opened the ☰ menu, pressed ↓ twice, and the second item showed the highlight. Enter opened Desktop Settings.

Arrow keys, Home and End move between items, Enter or Space opens the
focused one, and the focus clears when the popup closes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mariana953
mariana953 requested review from a team as code owners November 12, 2026 16:17
@mariana953 mariana953 added the cursor-review Trigger multi-model Cursor code review label Nov 12, 2026
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

MenuView now supports keyboard navigation, activation, and focus reset behavior. The title popup handler ignores item activation messages when the popup is closed. A render-ack test now waits for a notification count increase.

Changes: Title popup interaction

Layer / File(s) Summary
Menu keyboard interactions
src/renderer/src/comfyTitlePopup/MenuView.vue, src/renderer/src/comfyTitlePopup/MenuView.test.ts
MenuView handles arrow-key navigation, Home, End, Enter, and Space. It skips rows without IDs, wraps arrow navigation, and clears focus when the item list changes or the window blurs. Tests cover these behaviors and cases where keyboard handling must not act.
Popup activation and render acknowledgement
src/main/popups/titlePopup.ts, src/renderer/src/comfyTitlePopup/TitlePopupApp.test.ts
The activation handler returns when the popup is closed. The render-ack test waits until the notification count increases.
Merge Risk: Minimal · up to 50b26

This change adds keyboard navigation to the title-bar menu and ignores activations from a hidden popup. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 2

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Simplify code

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: f12771c0-76df-45e1-9f00-7137321b7003
Commits

Reviewing files that changed from the base of the PR and between 33423f8 and 50b26af.

Files selected for processing: 4

  • src/main/popups/titlePopup.ts
  • src/renderer/src/comfyTitlePopup/MenuView.test.ts
  • src/renderer/src/comfyTitlePopup/MenuView.vue
  • src/renderer/src/comfyTitlePopup/TitlePopupApp.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Cursor Review — Consolidated panel

Triggered by @mariana953.

Found 8 finding(s).

Severity Count
🟠 High 2
🟡 Medium 4
🟢 Low 2

Panel: 8/8 reviewers contributed findings.

mariana953 and others added 2 commits November 12, 2026 17:35
- ignore keys while focus is outside the menu or during IME composition
- held Enter/Space opens the item once
- focus resets whenever a new item list arrives
- items map by index; rows without an id stay out of the focus ring
- main ignores item activations from a hidden popup

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeps main's menu item styling from #2016 with keyboard focus on it, and
waits for the rendered ack in TitlePopupApp.test instead of a fixed 20ms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mariana953 added a commit to mariana953/Comfy-Desktop that referenced this pull request Nov 12, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@benceruleanlu
benceruleanlu added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit 3223004 Nov 12, 2026
16 checks passed
@benceruleanlu
benceruleanlu deleted the mar/title-menu-keyboard branch November 12, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cursor-review Trigger multi-model Cursor code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants