Commit graph

887 commits

Author SHA1 Message Date
Nexus Dev
8edee91d26 feat(22-05): wire ChatPanel and ChatInput with all Phase 22 features
- ChatPanel integrates useStreamingChat, ChatAgentSelector, ChatStopButton
- Agent routing via resolveAgentFromContent for slash commands and @mentions
- handleEdit: editMessage + truncateMessagesAfter + re-stream with edited content
- handleRetry: finds actual prior user message, truncates from user message onward, re-streams
- Build agentMap from agents for message identity bars
- ChatInput: slash command popover (triggered by / at start of input)
- ChatInput: @mention popover (triggered by @word pattern)
- Input disabled during streaming with 'Waiting for response...' placeholder
- Stop button shown conditionally when isStreaming
- Agent selector in header for per-conversation agent switching
- Remove ScrollArea wrapper (replaced by virtualizer's own scroll in ChatMessageList)
2026-04-04 03:55:47 +00:00
Nexus Dev
954e7819c6 feat(22-05): virtualize ChatMessageList and add chat API edit/truncate methods
- Rewrite ChatMessageList with @tanstack/react-virtual useVirtualizer (estimateSize: 80, overscan: 5)
- Dynamic height measurement via measureElement ref
- Streaming message appended as synthetic __streaming__ entry
- virtualizer.measure() called on streamingContent change (Pitfall 3)
- Jump-to-bottom button when scrolled >200px from bottom
- 3 Skeleton loading placeholders
- Add editMessage, truncateMessagesAfter, deleteMessage to chatApi
- Add postMessageAndStream and savePartialMessage (were missing from prior plan)
- Fix duplicate ChatConversation type exports in packages/shared/src/index.ts (Rule 1 - Bug)
2026-04-04 03:55:47 +00:00
Nexus Dev
724e2b2bd8 feat(22-04): ChatMentionPopover component
- Create ChatMentionPopover (200px, opens upward, agent icon + name + role label)
- Agents filtered by query, max 5 visible, No agents found empty state
- 3 skeleton rows loading state, onOpenAutoFocus prevented for textarea focus
- Include agent-role-colors dependency for worktree build
2026-04-04 03:55:47 +00:00
Nexus Dev
8f0367d0b4 feat(22-04): slash command routing utility and ChatSlashCommandPopover
- Create ui/src/lib/slash-commands.ts with SLASH_COMMANDS (5 commands) and resolveAgentFromContent
- Create ChatSlashCommandPopover (260px, opens upward, /search greyed with Coming soon)
- Add test coverage for routing logic (slash commands, @mentions, fallback)
2026-04-04 03:55:47 +00:00
Nexus Dev
be431c9492 feat(22-03): extend ChatMessage with inline edit mode and action callbacks
- Add id, isAnyStreaming, onEdit, onRetry props to ChatMessageProps
- User messages show edit Pencil on hover via ChatMessageActions
- Edit pencil opens inline textarea with Save/Discard buttons
- Save edit calls onEdit(id, newContent), disabled when textarea empty
- Discard edit reverts to read-only bubble
- Assistant messages show retry RefreshCw via ChatMessageActions
- All edit/retry actions disabled when isAnyStreaming is true
- Update test stubs to reflect new prop surface
2026-04-04 03:55:47 +00:00
Nexus Dev
d88d846b1e feat(22-03): add ChatStopButton and ChatMessageActions components
- ChatStopButton: centered outline button with Square icon and 'Stop generating' label
- ChatMessageActions: edit Pencil for user messages (absolute, group-hover)
- ChatMessageActions: retry RefreshCw for assistant messages (right-aligned, group-hover)
- Both action buttons return null when isStreaming is true
- Proper aria-labels and tooltips on all interactive elements
2026-04-04 03:55:47 +00:00
Nexus Dev
c7887c73ca feat(22-02): ChatAgentSelector component with agent dropdown and role colors
- Create ChatAgentSelector with Popover+Command dropdown
- Show active agent icon, name, and ChevronDown indicator
- 'Select agent' placeholder when no agent selected
- 'No agents configured' empty state via CommandEmpty
- Agent list shows icon, name, and role label per item
- Selection calls onAgentChange and PATCHes conversation via chatApi
- Role-specific colors from agentRoleColors applied to agent icons
- Loading state shows Skeleton placeholder
- Create chat.ts API client with updateConversation supporting agentId
- Create shared types/chat.ts with ChatMessage, ChatConversation types
- Create ChatCodeBlock prerequisite from phase-21 base
- TypeScript compiles clean
2026-04-04 03:55:47 +00:00
Nexus Dev
cf73f3481c feat(22-02): ChatMessageIdentityBar, ChatStreamingCursor, and extended ChatMessage
- Create ChatMessageIdentityBar with agent icon, name, timestamp, and streaming dot
- Create ChatStreamingCursor with animate-cursor-blink and aria-hidden
- Extend ChatMessage with agentName, agentIcon, agentRole, timestamp, isStreaming props
- Wrap assistant messages in group div for hover actions (Plan 03)
- Create agent-role-colors.ts with 11 distinct role colors (light + dark variants)
- Create ChatMarkdownMessage prerequisite from phase-21 base
- All 4 ChatMessageIdentityBar tests pass
2026-04-04 03:55:47 +00:00
Nexus Dev
0d876ced26 feat(22-01): add useStreamingChat hook, chat API stream method, and unit tests
- Add postMessageAndStream and savePartialMessage to chatApi (fetch ReadableStream for POST SSE)
- Create useStreamingChat hook with startStream, stop, streamingContent, isStreaming
- startTransition wraps token updates to avoid blocking user input (PERF-02)
- AbortController used for stop functionality (CHAT-12)
- stop() saves partial content with [stopped] suffix to DB
- Add @testing-library/react devDependency to enable renderHook testing
- 5 passing unit tests: token accumulation, lifecycle, stop/abort, error, null guard
2026-04-04 03:55:47 +00:00
Nexus Dev
b0b849fd62 test(22-00): add Wave 0 test stubs for Phase 22 components and hooks
- useStreamingChat.test.ts (5 todos)
- ChatAgentSelector.test.tsx (5 todos)
- ChatMessage.test.tsx (8 todos)
- ChatSlashCommandPopover.test.tsx (5 todos)
- ChatMentionPopover.test.tsx (4 todos)
- ChatMessageIdentityBar.test.tsx (4 todos)
- ChatMessageList.test.tsx (5 todos)
2026-04-04 03:55:47 +00:00
Nexus Dev
645535195b feat(22-00): DB migration, shared types, react-virtual, agent-role-colors, CSS animation
- Add updatedAt column to chat_messages schema (nullable)
- Create migration 0048_add_chat_messages_updated_at.sql
- Add updatedAt: string | null to ChatMessage shared type
- Install @tanstack/react-virtual in ui workspace
- Create agent-role-colors.ts with 11 distinct themed roles (THEME-03)
- Add agent-role-colors.test.ts (4 tests all passing)
- Add cursor-blink CSS animation with prefers-reduced-motion guard
2026-04-04 03:55:47 +00:00
Nexus Dev
f6067ed749 feat(21-06): add conversation search input and Cmd+K shortcut
- Add Search/X icons and Input to ChatConversationList with 300ms debounce
- Listen for nexus:focus-chat-search event to focus search input
- Add onSearch handler to useKeyboardShortcuts (fires before input guard)
- Wire Layout Cmd+K to open chat panel and dispatch focus event
2026-04-04 03:55:47 +00:00
Nexus Dev
d6ff48c0f3 feat(21-06): add search and agentId filter to listConversations
- Add ilike import and search/agentId conditions in chatService.listConversations
- Extract search and agentId from req.query in GET /conversations route
- Extend chatApi.listConversations opts with search and agentId params
- Update useChatConversations to accept opts.search and include in queryKey
2026-04-04 03:55:47 +00:00
Nexus Dev
fecab1bcc2 feat(21-05): wire full chat UI with conversation list, message thread, and ChatPanel integration
- Add ChatConversationItem with DropdownMenu actions (Rename, Pin/Unpin, Archive, Delete) and active highlight
- Add ChatConversationList with IntersectionObserver infinite scroll, loading skeletons, delete confirmation dialog, and CRUD handlers
- Add ChatMessageList with auto-scroll-to-bottom on new messages and empty state
- Update ChatPanel to render ChatConversationList (left column) and ChatMessageList (right column); handleSend uses two paths: direct chatApi for new conversations, hook mutation for existing ones
2026-04-04 03:55:47 +00:00
Nexus Dev
c268f2d03e feat(21-05): create chat API client and TanStack Query hooks
- Add ui/src/api/chat.ts with chatApi (7 methods: list/create/get/update/delete conversations + list/post messages)
- Add ui/src/hooks/useChatConversations.ts with useInfiniteQuery + placeholderData + CRUD mutations
- Add ui/src/hooks/useChatMessages.ts with useInfiniteQuery + sendMutation + flattened/reversed messages array
- Fix [Rule 3 - Blocking]: export ChatConversation, ChatMessage, ChatConversationListResponse, ChatMessageListResponse from packages/shared/src/index.ts (types existed in types/chat.ts but were not re-exported at package root)
2026-04-04 03:55:47 +00:00
Nexus Dev
036dee3ef1 feat(21-04): create ChatPanel shell and wire into Layout and main.tsx
- ChatPanel: 380px right-side drawer with transition-[width] and hidden md:flex
- Two-column skeleton: 160px conversation list + flex thread area with ChatInput
- Layout: import ChatPanel, MessageSquare, useChatPanel; add chat toggle button
- Layout: useEffect closes PropertiesPanel when chatOpen becomes true
- Layout: ChatPanel rendered before PropertiesPanel in flex row
- main.tsx: ChatPanelProvider wrapping app inside PanelProvider
2026-04-04 03:55:47 +00:00
Nexus Dev
cbce70a50a feat(21-04): create ChatPanelContext, ChatInput, and ChatMessage components
- ChatPanelContext with localStorage persistence (nexus:chat-panel-open)
- ChatInput with Enter/Shift+Enter/Escape keyboard shortcuts and auto-resize
- ChatMessage renders user bubbles (bg-secondary) and assistant markdown via ChatMarkdownMessage
- ChatInput.test.tsx with 6 passing tests (keyboard shortcuts, max-height, submit state)
2026-04-04 03:55:47 +00:00
Nexus Dev
fde1e0eacb feat(21-02): create ChatCodeBlock and ChatMarkdownMessage components
- ChatMarkdownMessage: renders markdown with rehype-highlight syntax highlighting
- ChatCodeBlock: pre override with language label and copy button (1500ms success state)
- Uses ExtraProps from react-markdown for correct TypeScript types
- All tests pass, TypeScript compiles without errors
2026-04-04 03:55:47 +00:00
Nexus Dev
df44e1eef7 test(21-02): add failing tests for ChatMarkdownMessage and ChatCodeBlock 2026-04-04 03:55:47 +00:00
Nexus Dev
d94879e85b feat(21-02): install rehype-highlight and add hljs theme CSS overrides
- Add rehype-highlight ^7.0.2 to ui/package.json dependencies
- Add highlight.js syntax theme CSS overrides to ui/src/index.css
- Cover Catppuccin Mocha (.dark), Tokyo Night (.theme-tokyo-night), Catppuccin Latte (:root)
2026-04-04 03:55:47 +00:00
Nexus Dev
ecc293a49c test(21-00): add Wave 0 test stubs for chat service, routes, markdown, and input 2026-04-04 03:55:47 +00:00
6812e5504f feat(06-02): replace Select a company empty states + CLI Paperclip strings
- 14 UI pages: all Select a company empty states use VOCAB.company.toLowerCase()
- AgentConfigForm: 3 error throws use VOCAB.company
- AgentDetail: additional Select a company upload error replaced
- CLI run.ts: Starting/Could not locate/failed to start messages use VOCAB.appName
- CLI deployment-auth-check: repairHint uses VOCAB.appName
- CLI agent-jwt-secret-check: repairHint uses VOCAB.appName
- CLI allowed-hostname: restart message uses VOCAB.appName
- Added VOCAB import to all files missing it
2026-04-04 03:55:47 +00:00
13fa9c3708 [nexus] fix(audit): resolve integration checker findings — straggler strings, query param pre-fill, orphaned import 2026-04-04 03:55:47 +00:00
6787e4aa2e fix(03-05): grep audit fixes — CEO→Project Manager in export readme, Board→Owner in local user, test assertion updates
- company-export-readme.ts: ROLE_LABELS ceo changed from 'CEO' to 'Project Manager' [nexus]
- server/index.ts: LOCAL_BOARD_USER_NAME changed from 'Board' to 'Owner' [nexus]
- cli/__tests__/company.test.ts: assertions updated to Workspace vocabulary
- cli/__tests__/http.test.ts: assertion updated to 'Nexus API' from 'Paperclip API'
- ui/OnboardingWizard.tsx: added explicit string type annotation for useState<string>
2026-04-04 03:55:47 +00:00
22c6080bef feat(03-03): replace display strings in page files A-D with VOCAB constants
- AgentDetail: hire verb uses VOCAB.hire
- ApprovalDetail: Board identity uses VOCAB.board
- CliAuth: appName and board uses VOCAB; client fallback uses 'nexus cli'
- Companies: button labels use VOCAB.company
- CompanyExport: CEO role label, README text, export header use VOCAB
- CompanySettings: breadcrumb, Staffing section, approval labels, OpenClaw template use VOCAB
- CompanySkills: paperclip skill source label uses VOCAB.appName
- Dashboard: welcome and select messages use VOCAB.appName and VOCAB.company
- Approvals: VOCAB imported (no string changes needed)
2026-04-04 03:55:46 +00:00
621b66247e feat(03-02): replace display strings in OnboardingWizard, LiveUpdatesProvider, and assignees lib
- OnboardingWizard.tsx: DEFAULT_TASK_DESCRIPTION uses VOCAB.ceo/company/hire; useState uses VOCAB.ceo; task title updated to Nexus vocabulary; step tab label uses VOCAB.company; placeholder uses VOCAB.ceo; launch summary uses VOCAB.company
- LiveUpdatesProvider.tsx: resolveActorLabel returns VOCAB.board instead of hardcoded 'Board'
- assignees.ts: formatAssigneeUserLabel returns VOCAB.board for local-board user
- assignees.test.ts: updated expectation to 'Owner' (VOCAB.board value)
2026-04-04 03:55:46 +00:00
b478bffdb1 [nexus] fix(audit): resolve integration checker findings — straggler strings, query param pre-fill, orphaned import 2026-04-04 03:55:46 +00:00
6dda85ec91 feat(20-02): add compatibleAdapters prop to SkillCard and wire Browse/Trending tabs
- Add optional compatibleAdapters prop to SkillCardProps interface
- Render 'Works with: ...' line when compatibleAdapters is provided and non-empty
- Pass COMPATIBLE_ADAPTER_LABELS to all Browse tab SkillCard renders
- Pass COMPATIBLE_ADAPTER_LABELS to all Trending tab SkillCard renders (gainingTraction, recentlyUpdated, youMightLike)
- Installed tab SkillCards intentionally omit compatibleAdapters (already agent-scoped)
2026-04-04 03:55:42 +00:00
8a392a568b feat(20-02): add adapter labels and unsupported install guard to SkillBrowser
- Import getUIAdapter and resolveAdapterSkillConfig/listAdapterSkillConfigs
- Show adapter type label in parentheses next to agent name in Installed tab selector
- Show adapter type label in install dialog agent list
- Guard handleInstallForAgent: show unsupportedMessage if adapter does not support install
- Dismissible error alert in install dialog for unsupported adapter attempts
- Clear unsupportedMessage on dialog open/close
- Compute COMPATIBLE_ADAPTER_LABELS at module level for Task 2
2026-04-04 03:55:42 +00:00
cef656264e [nexus] feat(20-01): expand HermesLocalConfigFields with model, toolsets, persistSession, timeoutSec
- Add Model field (both create + edit modes) using CreateConfigValues.model
- Add Toolsets field (both create + edit modes) using extraArgs in create, adapterConfig.toolsets in edit
- Add Persist Session checkbox (edit mode only) wired to adapterConfig.persistSession
- Add Timeout (seconds) field (edit mode only) wired to adapterConfig.timeoutSec
- Restructure component to use fragment with conditional hideInstructionsFile guard
- TypeScript compiles cleanly
2026-04-04 03:55:42 +00:00
da3a43e349 [nexus] feat(19-03): dual-section Installed tab and read-only SkillCard for native skills
- SkillCard: add isReadOnly and source props; hide update/rollback/install when isReadOnly
- SkillCard: show Native badge when isReadOnly or source=native
- SkillBrowser: remove agentSkillsDir state and text input from install dialog
- SkillBrowser: add selectedAgentId state for per-agent installed skills view
- SkillBrowser: add agentInstalledSkills query using skillGroupsApi.listAgentSkills
- SkillBrowser: split installed skills into managedSkills/nativeSkills sections
- SkillBrowser: render Managed/Native section headings when nativeSkills.length > 0
- SkillBrowser: uninstall dialog now carries agentId and calls skillRegistryApi.uninstall
- SkillBrowser: install dialog sends agentId directly (no agentSkillsDir text input)
2026-04-04 03:55:42 +00:00
6b205b9f21 [nexus] feat(19-03): update API client to use agentId instead of agentSkillsDir
- Add AgentSkillEntry type with skillId, source, installedAt fields
- install() now sends agentId in body not agentSkillsDir
- uninstall() new function that sends agentId as query param
- rollback() now sends agentId in body not agentSkillsDir
- skillGroups.assignGroup/removeGroup no longer accept agentSkillsDir param
- listAgentSkills now returns AgentSkillEntry[] not string[]
- Fix AgentDetail.tsx callers and entry rendering for new AgentSkillEntry type
- Fix SkillDetail.tsx callers to use agentId param
2026-04-04 03:55:42 +00:00
7d96ecd339 feat(12-02): SkillDetail Ratings tab and Overview usage stats
- Add Ratings tab (4th tab) with rate form, personal history, community section
- Overview tab: conditionally render taskCount, avgCostUsd, lastUsedAt rows
- Import StarRating, Separator, Skeleton, Textarea, EmptyState, TooltipProvider
- saveRatingMutation calls addRating, invalidates ratings query on success
- ratingsQuery loads personal history with loading/empty/error states
2026-04-04 03:55:42 +00:00
86d4de87e3 feat(12-02): StarRating component, API extensions, DesignGuide entry
- Create StarRating component with interactive/readonly modes, amber stars, size sm/md
- Add PersonalRating type and taskCount/avgCostUsd/lastUsedAt to SkillListItem
- Add getRatings and addRating to skillRegistryApi
- Add Rating System section to DesignGuide with all variants
- Fix SkillCard fixture and DesignGuide examples to include new SkillListItem fields
2026-04-04 03:55:42 +00:00
3c05d8c503 feat(11-04): extend AgentSkillsTab with groups section and dialogs
- Add imports: skillGroupsApi, SkillGroupRow, GroupBadge, Dialog, Separator, ScrollArea, Textarea
- Add agentGroups + allGroups + agentEffectiveSkills queries in AgentSkillsTab
- Add assignGroup + removeGroup + createGroup mutations
- Add state for add/create/remove dialogs, search, new group fields
- Insert Assigned Groups section with loading/empty/populated states
- Insert Combined Effective Skills collapsible section with ScrollArea
- Insert Additional Individual Skills label above existing skill list
- Add Add Skill Group, Create Skill Group, Remove group from agent dialogs
- Add Skill Groups section to DesignGuide with all GroupBadge variants
2026-04-04 03:55:42 +00:00
bc89b58a06 feat(11-04): create GroupBadge component
- Built-in variant: Badge secondary, no dismiss, hover:bg-accent/30
- Custom variant: Badge outline, X dismiss button with spinner, hover:bg-accent/50
- Tooltip on both variants showing name · built-in · N skills or name · N skills
- text-sm font-semibold typography per UI-SPEC (no font-bold or font-medium)
2026-04-04 03:55:42 +00:00
bd38700876 feat(11-03): add skill groups frontend API client and query keys
- Create ui/src/api/skillGroups.ts with skillGroupsApi object
- All 14 methods covering group CRUD, members, export/import, agent assignments
- removeGroup uses raw fetch for DELETE-with-body (api.delete has no body support)
- Add skillGroups namespace to ui/src/lib/queryKeys.ts with 6 key factories
2026-04-04 03:55:42 +00:00
b0857a95a0 fix(10): correct toast error messages in SkillDetail — Update/Uninstall not Install/Rollback 2026-04-04 03:55:42 +00:00
0df345acf7 feat(10-03): update DesignGuide SkillCard section with all 5 required variants
- Expand grid to lg:grid-cols-3 for 5-card layout
- Add Loading (updating) variant (5th card per UI-SPEC requirement)
- Add onRollback/onUninstall props to installed variants
- Add descriptive comments for each variant state
2026-04-04 03:55:42 +00:00
d915f82759 feat(10-03): implement SkillDetail page with Overview, Versions, Diff tabs
- Full SkillDetail.tsx replacing stub (Overview, Versions, Diff tabs)
- Separate installMutation and updateMutation with distinct toast messages
- VersionDiff component using diffLines from diff package
- Version selector with Select dropdowns in Diff tab
- ScrollArea for version list in Versions tab
- Install/Update/Uninstall dialogs with confirmation
- PageSkeleton variant=detail for loading state
- SkillDetail.test.tsx with 4 SSR smoke tests (all passing)
- diff + @types/diff packages installed in ui workspace
2026-04-04 03:55:42 +00:00
807837a510 test(10-02): add SkillBrowser SSR smoke tests
- 4 node-environment tests using renderToStaticMarkup
- Verifies page title, search input, refresh button, and tab labels render
- Mocks react-query, router, context providers for SSR compatibility
2026-04-04 03:55:42 +00:00
0b8bddb9d1 feat(10-02): build SkillBrowser page with Browse tab, dialogs, and 5 mutations
- Replace stub with full three-tab page (Browse, Installed, Trending placeholders)
- Five separate mutations: fetch, install, update, rollback, remove with distinct toasts
- Agent selector dialog with skills directory input for install/update flow
- Uninstall confirmation dialog with destructive button
- Browse tab: search, source filter, category filter, sort, FilterBar, card grid, EmptyState
- Breadcrumbs wired via useBreadcrumbs, data via TanStack Query
2026-04-04 03:55:42 +00:00
52d1dd1e87 feat(10-01): add SkillCard component, tests, route wiring, and design guide entry
- Create SkillCard.tsx with 3-row layout per UI-SPEC (name link, description, source/rating/actions)
- Create SkillCard.test.tsx with 8 passing unit tests using renderToStaticMarkup
- Create SkillBrowser.tsx and SkillDetail.tsx stub pages
- Update App.tsx: remove CompanySkills import, add skills and skills/detail/:skillId routes
- Add SkillCard to DesignGuide.tsx with 4 variants (default, installed, update available, loading)
2026-04-04 03:55:42 +00:00
bf0a61a9db feat(10-01): add skillRegistry API client and query keys
- Create ui/src/api/skillRegistry.ts with typed methods for all 7 endpoints
- Use two-segment URL paths (/sourceId/slug) for Express 5 compatibility
- Add skillRegistry namespace to queryKeys.ts (list/detail/versions)
2026-04-04 03:55:42 +00:00
32db9f62f1 feat(08-02): add Generalist agent creation to onboarding wizard
- Third agentsApi.create() call with role: "general", name: "Generalist"
- metadata: { pendingSkillGroups: ["Creative"] } records Phase 11 intent
- Updated description text: mentions all 3 agents (PM, engineer, generalist)
- Placed BEFORE queryClient.invalidateQueries for clean ordering
2026-04-04 03:55:42 +00:00
b3302f601c [nexus] fix: replace radix DialogPortal with createPortal in NexusOnboardingWizard 2026-04-04 03:55:42 +00:00
21ffa90455 feat(07-02): update Layout toggle to cycle three themes with next-theme label
- Add THEME_CYCLE map for mocha->tokyo-night->latte->mocha
- Compute nextThemeLabel for descriptive aria-label/title on toggle button
- Update both desktop and mobile toggle button aria-label/title to 'Switch to [theme]'
- Icon logic unchanged: Sun in dark mode, Moon in light mode
2026-04-04 03:55:42 +00:00
8d7de460f9 feat(07-02): add theme picker section to InstanceGeneralSettings
- Import useTheme, THEME_META, type Theme from ThemeContext
- Add ORDERED_THEMES constant with three theme IDs
- Add theme picker section as first section in General Settings
- Color swatches use inline backgroundColor (hardcoded hex, not CSS vars)
- Active theme highlighted with border-primary bg-primary/10
2026-04-04 03:55:42 +00:00
4abaa43f09 feat(07-01): update index.html flash-prevention script for three themes
- Update theme-color meta tag default from #18181b to #1e1e2e (Catppuccin Mocha)
- Replace binary dark/light script with three-theme handler
- Toggles .dark and .theme-tokyo-night classes before React mounts
- Falls back to catppuccin-mocha for unknown/old localStorage values
- Removes old #18181b hardcoded color constant
2026-04-04 03:55:42 +00:00
44be367ada feat(07-01): extend ThemeContext to support three named themes with THEME_META export
- Expand Theme type to catppuccin-mocha | tokyo-night | catppuccin-latte
- Export THEME_META with label, dark boolean, bg hex, primary hex per theme
- applyTheme toggles .dark and .theme-tokyo-night classes correctly
- toggleTheme cycles all three themes (Mocha -> Tokyo Night -> Latte -> Mocha)
- readStoredTheme falls back to catppuccin-mocha for old localStorage values
- Fix Layout.tsx: replace theme === 'dark' comparison with THEME_META[theme].dark
- Fix MarkdownBody.tsx: replace theme === 'dark' comparisons with THEME_META[theme].dark
2026-04-04 03:55:42 +00:00