Skip to content

feat: Cmd+Enter to submit comments, Esc to close card#1

Open
nickmeinhold wants to merge 13 commits into
mainfrom
feature/keyboard-shortcuts
Open

feat: Cmd+Enter to submit comments, Esc to close card#1
nickmeinhold wants to merge 13 commits into
mainfrom
feature/keyboard-shortcuts

Conversation

@nickmeinhold

Copy link
Copy Markdown

Summary

  • Cmd/Ctrl+Enter submits comments from the TipTap rich text editor, via a new onModEnter callback prop on the Editor component and a handleKeyDown handler in editor props
  • Escape closes the card view and navigates back to the board, using the existing useKeyboardShortcut infrastructure — respects modal state (won't fire if a modal is open) and input focus (won't fire when typing in inputs/contentEditable)

Fixes kanbn#389, kanbn#390

Test plan

  • Open a card, type a comment, press Cmd+Enter (Mac) or Ctrl+Enter (Windows/Linux) — comment should submit
  • Verify Cmd+Enter doesn't interfere with slash commands or @mentions in the editor
  • Open a card, press Escape while not focused on any input — should navigate back to the board
  • Verify Escape while a modal is open (e.g. delete card confirmation) closes the modal, not the card
  • Verify Escape while typing in the TipTap editor does NOT close the card
  • Verify Escape shows up in the keyboard shortcut legend (Cmd+/)

🤖 Generated with Claude Code

nickmeinhold and others added 11 commits April 15, 2026 16:57
Add optional webhook functionality to notify external services
when cards are created, updated, moved, or deleted.

Configuration:
- WEBHOOK_URL: URL to POST webhook payloads to
- WEBHOOK_SECRET: Optional secret for HMAC signature verification

Webhook payload includes:
- Event type (card.created, card.updated, card.moved, card.deleted)
- Card data (id, title, description, dueDate, listId, boardId)
- User who performed the action
- Changes object (for updates) showing old/new values

The webhook is fire-and-forget (non-blocking) to avoid
impacting API response times. Failures are logged but don't
affect the main operation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Resolving branch conflicts
- Add 10s timeout to webhook fetch using AbortController
- Fix dueDate type to string (reflects JSON serialization)
- Remove email from user payload for privacy

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add database schema for per-workspace webhook configuration:
- workspaceWebhooks table with url, secret, events, active fields
- Foreign keys to workspace and user tables
- Row-level security enabled

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add repository functions for workspace webhooks:
- create, update, getByPublicId, hardDelete
- getAllByWorkspaceId for listing
- getActiveByWorkspaceId for sending webhooks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add webhook router with endpoints:
- list: Get all webhooks for workspace
- create: Add new webhook
- update: Modify webhook settings
- delete: Remove webhook
- test: Send test payload

All endpoints require admin role.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update card create/update/delete to send webhooks to all
active workspace webhooks instead of just env var webhook.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add React components for webhook management:
- WebhookList: Table with edit/test/delete actions
- NewWebhookModal: Create/edit form with event checkboxes
- DeleteWebhookConfirmation: Confirmation dialog

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add WebhookSettings page with modals
- Add webhooks.tsx page route
- Add Webhooks tab to settings navigation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove WEBHOOK_URL/WEBHOOK_SECRET env var fallback.
Webhooks are now only configured via the database/UI.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add comprehensive test coverage for webhook functionality:
- webhook.test.ts: Tests for createCardWebhookPayload, sendWebhookToUrl,
  and sendWebhooksForWorkspace utility functions
- webhook.test.ts (router): Tests for list, create, update, delete, and
  test procedures including authorization checks

Also adds vitest to @kan/api package for running tests.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Two keyboard shortcuts for faster card interaction:
- Cmd/Ctrl+Enter submits comments from the TipTap editor
- Escape navigates back to the board from the card view (respects
  modal state and input focus)

Fixes kanbn#389, kanbn#390

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@D3lK1ch1 D3lK1ch1 force-pushed the feature/keyboard-shortcuts branch from 3e3b147 to 0daa859 Compare April 15, 2026 08:35
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.

Add Cmd+Enter shortcut to submit comments

2 participants