Skip to content

fix(Ask Terax): make Ask Terax Ctrl+L shortcut work - #1058

Open
Aryan-Srivastava wants to merge 2 commits into
crynta:mainfrom
Aryan-Srivastava:fix/ask-terax-shortcutkey
Open

fix(Ask Terax): make Ask Terax Ctrl+L shortcut work#1058
Aryan-Srivastava wants to merge 2 commits into
crynta:mainfrom
Aryan-Srivastava:fix/ask-terax-shortcutkey

Conversation

@Aryan-Srivastava

@Aryan-Srivastava Aryan-Srivastava commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

What

The Ask Terax popup showed Ctrl+L, but pressing it did nothing. Only clicking the button worked. This fix makes Ctrl+L work again and keeps the badge in sync with the real shortcut.

Why

Closes #1057

How

  • Set the shortcut back to Ctrl+L (⌘L on Mac)
  • Show the real shortcut on the popup instead of a hardcoded label
  • Close the popup when the shortcut is used, same as clicking the button

Testing

  • pnpm lint clean
  • pnpm check-types clean
  • pnpm test clean
  • Manual smoke-test of the affected feature
  • (If you touched src-tauri/) cargo clippy --all-targets --locked -- -D warnings clean
  • (If you touched src-tauri/) cargo nextest run --locked clean (or cargo test --locked)
  • (If you changed a #[tauri::command] signature) called out below so the FE caller can be updated in lockstep
  • (If UI) tested in pnpm tauri dev
  • Platforms tested: Windows
  • Shells tested (if relevant):

Screenshots / GIFs

Notes for reviewer

Summary by CodeRabbit

  • New Features

    • Updated the “Ask Terax” keyboard shortcut to Mod+L (was Mod+J).
    • Keyboard shortcut labels now automatically display the configured binding and platform-specific formatting.
  • Bug Fixes

    • Improved selection-based AI requests to reliably use the current action when triggered via the keyboard shortcut.

@Aryan-Srivastava
Aryan-Srivastava requested a review from crynta as a code owner July 28, 2026 11:39
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

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: cdfe662d-d95b-455c-a4e9-d5b2b6c4795f

📥 Commits

Reviewing files that changed from the base of the PR and between f6dfde9 and b4d5be6.

📒 Files selected for processing (1)
  • src/modules/ai/components/SelectionAskAi.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/modules/ai/components/SelectionAskAi.tsx

📝 Walkthrough

Walkthrough

Changes

Ask Terax shortcut

Layer / File(s) Summary
Shortcut binding and popup label
src/modules/shortcuts/shortcuts.ts, src/modules/ai/components/SelectionAskAi.tsx
The default ai.askSelection binding changes from Mod+J to Mod+L, and the popup displays the configured shortcut dynamically with adjusted width and truncation.
Shortcut handler callback wiring
src/app/App.tsx
The keyboard handler now invokes onAskFromSelection and updates the memoization dependencies accordingly.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title follows Conventional Commits and clearly describes the shortcut fix for Ask Terax.
Linked Issues check ✅ Passed The changes address the reported shortcut bug, update the binding to Mod+L, and keep the popup action aligned with the displayed shortcut.
Out of Scope Changes check ✅ Passed No unrelated code changes stand out; the UI width and label tweaks support the shortcut fix.

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/modules/ai/components/SelectionAskAi.tsx`:
- Line 60: Update the popup width constant W used by the positioning logic in
SelectionAskAi to 130, matching the button’s min-w-[130px] geometry. Preserve
the existing positioning calculations so the popup remains aligned near viewport
edges.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f035f455-cd5f-4c36-8589-2be0a7dab605

📥 Commits

Reviewing files that changed from the base of the PR and between d23e16f and f6dfde9.

📒 Files selected for processing (3)
  • src/app/App.tsx
  • src/modules/ai/components/SelectionAskAi.tsx
  • src/modules/shortcuts/shortcuts.ts

Comment thread src/modules/ai/components/SelectionAskAi.tsx Outdated
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.

Shortcut Key for "Ask Terax" is not working

1 participant