feat: global search and keyboard shortcuts

Ctrl/⌘ K (or /) opens a search over the projects and tickets of all my
projects, driven by the keyboard. g plus a letter moves between project
pages, c creates a ticket on the board, e edits the open ticket and ?
lists every shortcut. My work can now be searched by text through the API.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 18:32:07 +02:00
parent 4148335457
commit d6a434ca1d
24 changed files with 584 additions and 21 deletions

View File

@@ -9,6 +9,7 @@ import {
Component,
computed,
effect,
HostListener,
inject,
input,
signal,
@@ -43,6 +44,7 @@ import {
boardFilterOf,
IssuePriority,
IssueSummary,
isTyping,
overWip,
POINT_SCALE,
ReleaseStatus,
@@ -843,6 +845,23 @@ export class BoardPage {
);
}
/** `c`: new ticket (not while typing, nor with a drawer open). */
@HostListener('document:keydown', ['$event'])
protected onKey(event: KeyboardEvent): void {
if (
event.key !== 'c' ||
event.ctrlKey ||
event.metaKey ||
event.altKey ||
isTyping(event.target) ||
!this.project.canContribute() ||
document.querySelector('[role="dialog"]')
)
return;
event.preventDefault();
this.openCreate();
}
protected openCreate(): void {
const types = this.typeOptions();
if (!types.some((t) => t.value === this.newType()))