Skip to content

fix: scope task hotkeys to hovered table - #477

Open
RohitSutar1823 wants to merge 1 commit into
CCExtractor:mainfrom
RohitSutar1823:fix/task-hotkeys-hover-scope
Open

RohitSutar1823 wants to merge 1 commit into
CCExtractor:mainfrom
RohitSutar1823:fix/task-hotkeys-hover-scope

Conversation

@RohitSutar1823

Copy link
Copy Markdown

Summary

Fixes #425.

Task hotkeys were firing globally even when the cursor was outside the task table. This change:

  • Adds an enabled flag to the shared useHotkeys hook.
  • Enables task hotkeys only while the task table is hovered.
  • Applies the same guard to ArrowUp, ArrowDown, and Enter handling.
  • Adds regression coverage for disabled hotkeys.

Validation

  • 13 targeted Jest tests passed.
  • Production build passed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Thank you for opening this PR!

Before a maintainer takes a look, it would be really helpful if you could walk through your changes using GitHub's review tools.

Please take a moment to:

  • Check the "Files changed" tab
  • Leave comments on any lines for functions, comments, etc. that are important, non-obvious, or may need attention
  • Clarify decisions you made or areas you might be unsure about and/or any future updates being considered.
  • Finally, submit all the comments!

More information on how to conduct a self review:
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request

This helps make the review process smoother and gives us a clearer understanding of your thought process.

Once you've added your self-review, we'll continue from our side. Thank you!

@RohitSutar1823

Copy link
Copy Markdown
Author

Self-review

I reviewed the three changed files and confirmed the implementation is limited to issue #425:

  • useHotkeys preserves existing behavior by default and now supports an optional enabled flag.
  • Tasks.tsx disables shared hotkeys and ArrowUp/ArrowDown/Enter handling when the pointer leaves the task table.
  • Existing hover handlers provide the state; no new interaction model was introduced.
  • Added regression coverage for disabled hotkeys.

No unrelated files were changed. Validation passed: 13 targeted Jest tests and the production build.

This branch has not been deployed

No deployments
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.

bug: hotkeysEnabled state is set but never checked before executing hotkeys

1 participant