feat(poweruser): quick capture + inbox keyboard nav + undo toasts

- Global quick capture modal (Cmd+Shift+C) with NL parse preview
- Task/note/event type selector, create with active domain
- Toast with undo button after creation
- Inbox page: j/k keyboard navigation, Enter to open
- Quick capture input at top of inbox
- Undo toasts for task/note/habit deletion (recreates via POST)
- StatusBar + QuickCapture mounted in _app layout
This commit is contained in:
2026-09-09 01:32:01 +00:00
parent c98e1c69f2
commit b4d09387ed
8 changed files with 521 additions and 197 deletions
+12 -1
View File
@@ -14,6 +14,7 @@ import { Badge } from "@/components/ui/badge";
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "@/components/ui/alert-dialog";
import { ScrollArea } from "@/components/ui/scroll-area";
import { cn } from "@/lib/utils";
import { showUndoToast } from "@/lib/undo/use-undo-toast";
import type { Note, PaginatedResponse } from "@/lib/types";
import { format, parseISO } from "date-fns";
@@ -218,7 +219,17 @@ function NotesPage() {
const deleteMutation = useMutation({
mutationFn: (id: string) => api.delete("/notes/" + id),
onSuccess: () => {
onSuccess: (_, deletedId) => {
const note = notes.find((n) => n.id === deletedId) || selectedNoteRef.current;
if (note) {
showUndoToast(
"note",
deletedId,
{ title: note.title, content: note.content, domain: note.domainId || undefined },
queryClient,
["notes"],
);
}
queryClient.invalidateQueries({ queryKey: ["notes"] });
selectedNoteRef.current = null;
setSelectedNoteId(null);