SPB Git
2.5 KB · 31 lines typescript
1/** Shared (server + client) dashboard layout types and defaults. */2export const WIDGET_TYPES = ["quick_capture", "recent_pages", "pinned", "tasks_due", "active_projects", "research_activity", "recently_modified", "ai_summary", "graph_highlights", "ai_chat", "usage"] as const;3export type WidgetType = (typeof WIDGET_TYPES)[number];4export type WidgetSize = "half" | "wide" | "third";5export type Widget = { id: string; type: WidgetType; size: WidgetSize; config?: Record<string, unknown> };6export const DEFAULT_WIDGETS: Widget[] = [7  { id: "w-capture", type: "quick_capture", size: "half" },8  { id: "w-tasks", type: "tasks_due", size: "half" },9  { id: "w-recent", type: "recent_pages", size: "third" },10  { id: "w-pinned", type: "pinned", size: "third" },11  { id: "w-projects", type: "active_projects", size: "third" },12  { id: "w-summary", type: "ai_summary", size: "half" },13  { id: "w-research", type: "research_activity", size: "half" },14  { id: "w-graph", type: "graph_highlights", size: "third" },15  { id: "w-usage", type: "usage", size: "third" },16  { id: "w-modified", type: "recently_modified", size: "third" },17];18export const WIDGET_META: Record<WidgetType, { label: string; description: string; defaultSize: WidgetSize }> = {19  quick_capture: { label: "Quick capture", description: "Jot a note into My Notes, or ask the AI instead.", defaultSize: "half" },20  recent_pages: { label: "Recent pages", description: "Pages you opened or edited last.", defaultSize: "third" },21  pinned: { label: "Pinned", description: "Your pinned pages.", defaultSize: "third" },22  tasks_due: { label: "Tasks due", description: "Overdue and next 7 days, check off inline.", defaultSize: "half" },23  active_projects: { label: "Active projects", description: "Projects and research in progress.", defaultSize: "third" },24  research_activity: { label: "Research activity", description: "Recent research pages, experiments and references.", defaultSize: "half" },25  recently_modified: { label: "Recently modified", description: "Last edited pages.", defaultSize: "third" },26  ai_summary: { label: "AI weekly summary", description: "Summarize what you worked on this week.", defaultSize: "half" },27  graph_highlights: { label: "Graph highlights", description: "Most connected pages and pending link suggestions.", defaultSize: "third" },28  ai_chat: { label: "AI chat", description: "An embedded assistant conversation.", defaultSize: "half" },29  usage: { label: "AI usage", description: "Today's AI spend and calls.", defaultSize: "third" },30};31
Files · main
Menu

Theme