Skip to content

Cmd+enter hotkey for every #183

Open
gregor-tokarev wants to merge 3 commits intostylessh:mainfrom
gregor-tokarev:gregor-tokarev/cmd-enter-action
Open

Cmd+enter hotkey for every #183
gregor-tokarev wants to merge 3 commits intostylessh:mainfrom
gregor-tokarev:gregor-tokarev/cmd-enter-action

Conversation

@gregor-tokarev
Copy link
Copy Markdown
Contributor

@gregor-tokarev gregor-tokarev commented May 1, 2026

Summary

Added hotkey submission for every form in web app

Changes

  • markdown-editor.tsx
  • every place where it's used and can be submitted

Test Plan

  • go to issue(for example) write reply and hit cmd+enter while been focused in textarea

Summary by CodeRabbit

Release Notes

  • New Features
    • Added keyboard shortcut support (Ctrl/Cmd+Enter) to submit forms, comments, replies, and reviews across the dashboard for faster submission without clicking the submit button
    • Enhanced visual feedback with improved cursor styling on interactive elements to clearly indicate clickability

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: eb321216-edbb-4646-9a9e-d1795bcd8363

📥 Commits

Reviewing files that changed from the base of the PR and between 94ca240 and 2f54a0a.

📒 Files selected for processing (10)
  • apps/dashboard/src/components/compare/compare-form.tsx
  • apps/dashboard/src/components/details/comment-reply-form.tsx
  • apps/dashboard/src/components/details/detail-activity.tsx
  • apps/dashboard/src/components/issues/new/new-issue-page.tsx
  • apps/dashboard/src/components/pulls/detail/pull-body-section.tsx
  • apps/dashboard/src/components/pulls/detail/pull-detail-activity.tsx
  • apps/dashboard/src/components/pulls/review/review-file-diff-block.tsx
  • apps/dashboard/src/components/pulls/review/review-submit-popover.tsx
  • packages/ui/src/components/markdown-editor.tsx
  • packages/ui/src/styles/globals.css

📝 Walkthrough

Walkthrough

This PR adds keyboard shortcut support across the dashboard by introducing a new onModEnter callback prop to the MarkdownEditor component and adding Mod+Enter (Ctrl+Enter or Cmd+Enter) handlers to form inputs and editors in nine components. Global CSS styling updates cursor appearance for interactive elements.

Changes

Cohort / File(s) Summary
MarkdownEditor Enhancement
packages/ui/src/components/markdown-editor.tsx
Added onModEnter optional callback prop that triggers when user presses Ctrl/Cmd+Enter, preventing default behavior and stopping propagation.
Content Creation & Editing
apps/dashboard/src/components/compare/compare-form.tsx, apps/dashboard/src/components/issues/new/new-issue-page.tsx, apps/dashboard/src/components/pulls/detail/pull-body-section.tsx
Wired Mod+Enter keyboard shortcuts to title inputs and markdown editors for quick form submission and saving; each includes guards against invalid states (empty input, in-progress operations).
Comment & Reply Submissions
apps/dashboard/src/components/details/comment-reply-form.tsx, apps/dashboard/src/components/details/detail-activity.tsx, apps/dashboard/src/components/pulls/review/review-file-diff-block.tsx, apps/dashboard/src/components/pulls/review/review-submit-popover.tsx
Added Mod+Enter handlers to comment and reply markdown editors with validation guards (non-empty input, no pending uploads, no in-flight requests) to submit comments without using the button.
Pull Request Flows
apps/dashboard/src/components/pulls/detail/pull-detail-activity.tsx
Integrated Mod+Enter support for both merge commit form (title and description inputs) and review reply editor, with appropriate state guards for each operation.
Global Styling
packages/ui/src/styles/globals.css
Added comprehensive CSS rules setting cursor: pointer on interactive elements (buttons, links, inputs, labels, ARIA roles) and cursor: not-allowed on disabled states.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title 'Cmd+enter hotkey for every' is incomplete, vague, and fails to clearly summarize the main change—it cuts off mid-sentence and doesn't explain what feature is being added. Complete the title with a clear, concise summary such as 'Add Cmd+Enter hotkey submission for all forms' to properly convey the changeset's primary purpose.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description covers the summary and provides a basic test plan, but it lacks detailed explanation of changes and is missing the required Screenshots section from the template.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

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

@stylessh
Copy link
Copy Markdown
Owner

stylessh commented May 3, 2026

hey, you have changes from #181 in this pr. can you remove them?

@gregor-tokarev
Copy link
Copy Markdown
Contributor Author

done

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.

2 participants