Skip to content

Add Esc shortcut to close card view #390

@nickmeinhold

Description

@nickmeinhold

Summary

Add a keyboard shortcut (Escape) to close the card detail view and navigate back to the board.

Context

Cards are displayed as full route-based pages (/cards/[cardId]), not modals. Currently the only way to close is via the X button or browser back. The codebase has an existing keyboard shortcut system (apps/web/src/providers/keyboard-shortcuts.tsx) that can be used here.

Edge case: TipTap editor menus

The TipTap editor's slash-command menu and @mention dropdown both use Escape to close themselves. The implementation must ensure that pressing Escape while one of these menus is open closes the menu — not the card view. This can be handled via event propagation (TipTap menus stop propagation) or by checking editor state.

Acceptance Criteria

  • Pressing Escape while on the card view navigates back to the board
  • Pressing Escape while a TipTap slash-command or mention menu is open closes the menu, not the card
  • Pressing Escape while editing a checklist item cancels the edit, not the card view
  • Works alongside existing keyboard shortcut infrastructure

Files to modify

  • apps/web/src/views/card/index.tsx — add Escape key handler to navigate back

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions