Skip to content

Add Esc shortcut to cancel task edit#321

Merged
dkhalife merged 2 commits into
mainfrom
dkhalife/esc-cancel-task-edit
Jun 3, 2026
Merged

Add Esc shortcut to cancel task edit#321
dkhalife merged 2 commits into
mainfrom
dkhalife/esc-cancel-task-edit

Conversation

@dkhalife
Copy link
Copy Markdown
Owner

@dkhalife dkhalife commented Jun 3, 2026

Editing or creating a task previously required clicking the Cancel button to back out. This adds an Esc keyboard shortcut so users can quickly dismiss the task edit view without reaching for the mouse.

The TaskEdit component now registers a keydown listener on mount and removes it on unmount. Pressing Escape triggers the same onCancelClicked handler used by the Cancel button, navigating back to the home view.

Copilot AI review requested due to automatic review settings June 3, 2026 17:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a keyboard shortcut to improve UX when editing/creating tasks by allowing users to cancel the TaskEdit view via the Escape key, aligning the behavior with the existing Cancel button flow.

Changes:

  • Register a document keydown listener on TaskEdit mount.
  • Unregister the listener on unmount to avoid leaks.
  • Trigger onCancelClicked() when Escape is pressed.
Show a summary per file
File Description
frontend/src/views/Tasks/TaskEdit.tsx Adds global Escape key handling to cancel out of the task edit/create view.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment thread frontend/src/views/Tasks/TaskEdit.tsx
@dkhalife dkhalife merged commit 52bdc0c into main Jun 3, 2026
5 of 6 checks passed
@dkhalife dkhalife deleted the dkhalife/esc-cancel-task-edit branch June 3, 2026 18:11
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