From 564e8f72dcd4eecd5585d511716af3837bbd6c66 Mon Sep 17 00:00:00 2001 From: saravanakumardb1 Date: Mon, 6 Apr 2026 08:19:35 -0700 Subject: [PATCH] =?UTF-8?q?feat(web):=20add=20Smart=20Actions=20UI=20?= =?UTF-8?q?=E2=80=94=20prompt=20client,=20SmartActionsPanel,=20prompts=20p?= =?UTF-8?q?age?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase 3 of Smart Actions Roadmap: - Create web/src/lib/prompt-client.ts: typed API client for all prompt endpoints - listPromptTemplates, getPromptTemplate, createPromptTemplate, deletePromptTemplate - runPrompt, suggestTags, checkDuplicates, suggestLinks, getReadingTime - compareNotes, mergeNotes, getKnowledgeGaps - Add Smart Actions types to web/src/lib/types.ts: - PromptTemplate, RunPromptInput, RunPromptOutput, SimilarNote, KnowledgeGap - Create SmartActionsPanel component: - Reading time display, tag suggestion with accept/dismiss - Category filter tabs, 2-column template grid - One-click prompt execution with loading state - Inline result display with copy/dismiss - Create /prompts template library page: - Browse built-in + custom templates with category filter - Grid layout with input/output type badges - Delete custom templates - Wire SmartActionsPanel into note detail sidebar (above MetadataPanel) - Add 'Prompts' nav item to Sidebar (Sparkles icon) - Web typecheck passes, all 131 backend tests pass --- web/src/app/(app)/notes/[noteId]/page.tsx | 8 + web/src/app/(app)/prompts/page.tsx | 175 +++++++++++++++++++ web/src/components/Sidebar.tsx | 1 + web/src/components/SmartActionsPanel.tsx | 198 ++++++++++++++++++++++ web/src/lib/prompt-client.ts | 127 ++++++++++++++ web/src/lib/types.ts | 47 +++++ 6 files changed, 556 insertions(+) create mode 100644 web/src/app/(app)/prompts/page.tsx create mode 100644 web/src/components/SmartActionsPanel.tsx create mode 100644 web/src/lib/prompt-client.ts diff --git a/web/src/app/(app)/notes/[noteId]/page.tsx b/web/src/app/(app)/notes/[noteId]/page.tsx index 3aa0564..157f453 100644 --- a/web/src/app/(app)/notes/[noteId]/page.tsx +++ b/web/src/app/(app)/notes/[noteId]/page.tsx @@ -11,6 +11,7 @@ import { TaskReviewPanel } from "@/components/TaskReviewPanel"; import { ExtractedTasksPanel } from "@/components/ExtractedTasksPanel"; import { ArtifactPanel } from "@/components/ArtifactPanel"; import { AgentTimeline } from "@/components/AgentTimeline"; +import { SmartActionsPanel } from "@/components/SmartActionsPanel"; import { LinkNoteModal } from "@/components/LinkNoteModal"; import { archiveNote, @@ -268,6 +269,13 @@ export default function NoteDetailPage() {