Skip to content

fix(ui): render "then" separator between hotkey tokens and shortcuts in Tooltip - #5516

Open
nandanadileep wants to merge 1 commit into
macro-inc:mainfrom
nandanadileep:fix/tooltip-then-separator
Open

fix(ui): render "then" separator between hotkey tokens and shortcuts in Tooltip#5516
nandanadileep wants to merge 1 commit into
macro-inc:mainfrom
nandanadileep:fix/tooltip-then-separator

Conversation

@nandanadileep

Copy link
Copy Markdown

Closes #5338

Summary

In apps/web/src/components/ui/components/Tooltip.tsx, when a Tooltip renders both a hotkey token list and a custom shortcut list, the "then" separator was missing between the last hotkey token and the first shortcut.

The separator guard only checked ndx() < tokens().length - 1, which is false on the last token, so nothing was rendered before the first shortcut item.

Fix

The "then" separator now also renders when there are remaining shortcut items:

<Show when={ndx() < tokens().length - 1 || shortcuts().length > 0}>

Multi-step sequences like cmd+k then <shortcut> now render "then" correctly across the hotkey/shortcut boundary.

Verification

  • bun run check (type-check + biome) passes in apps/web.

When a Tooltip renders both a hotkey token list and a custom shortcut
list, the last token never emitted the "then" separator because the
condition only checked tokens().length. Include shortcuts().length in
the guard so multi-step sequences render correctly across the boundary.
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 8203ed20-e29e-4230-85a7-e18ea44cc44d

📥 Commits

Reviewing files that changed from the base of the PR and between a4e2525 and 7a341a2.

📒 Files selected for processing (1)
  • apps/web/src/components/ui/components/Tooltip.tsx

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Improved tooltip shortcut formatting by displaying the “then” separator correctly between registered hotkeys and raw shortcuts.

Walkthrough

The tooltip now renders the “then” separator after the final registered hotkey when raw shortcuts follow it.

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title uses conventional commits format and describes the change, but it is 79 characters and exceeds the 72-character limit. Shorten the title to 72 characters or fewer while preserving the fix scope.
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly explains the missing separator, the code change, and the verification result.
Linked Issues check ✅ Passed The Tooltip condition update directly satisfies issue #5338 by rendering "then" between hotkey tokens and custom shortcuts.
Out of Scope Changes check ✅ Passed The change is limited to the Tooltip separator condition and matches the scope of issue #5338.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

fix(ui): missing "then" separator between hotkey tokens and shortcuts in Tooltip

1 participant