feat(desktop): settings + theme + command palette + better preview states#10
Merged
feat(desktop): settings + theme + command palette + better preview states#10
Conversation
…ates Polish the renderer shell with Tier-1 building blocks: - Settings overlay with 4 tabs (Models stub, Appearance with light/dark picker, Storage config-file pointer, Advanced placeholder) - Preview states: EmptyState with 3 starter chips, pure-CSS shimmer LoadingState, friendly ErrorState card with Retry + Copy Error - TopBar with wordmark + 3 icon buttons (command palette, theme, settings) - Sidebar extracted from App.tsx — chat-only panel, autosizing textarea - PreviewPane composes EmptyState / LoadingState / ErrorState / iframe and mounts the existing PreviewToolbar unchanged - Keyboard shortcuts: Cmd/Ctrl+Enter sends, Cmd+, opens Settings, Cmd+K opens command palette, Esc closes overlays - Multi-toast Zustand slice (4s auto-dismiss, stack bottom-right) - Dark mode with FOUC-free localStorage hydration in index.html - Command palette with 4 actions (New Design / Toggle Theme / Open Settings / Export stub) and keyboard navigation Tier-1 building blocks only: CSS keyframes, addEventListener, no Radix Dialog, no react-hotkeys, no react-toastify, no framer-motion, no new prod deps. Onboarding gate and existing exportActive / toastMessage slices preserved for backward compat (dismissToast accepts an optional id to keep PreviewToolbar working). Adds tokens: --color-toast-success, --color-toast-error, --color-overlay. Adds packages/ui: IconButton, Tooltip (CSS-only, 400ms hover delay). Signed-off-by: hqhq1025 <[email protected]>
This was referenced Apr 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Polishes the renderer shell with Tier-1 UX building blocks. Onboarding gate is preserved; this PR is purely additive on top of the chat shell, plus an extraction of the existing chat / preview into named components.
UX improvements
App.tsx; autosizing textarea, Enter sends / Shift+Enter newlines, generating dot indicatorPreviewToolbarmounted unchangedRetry(re-runs last user prompt) andCopy ErroractionsCmd/Ctrl+Entersends prompt,Cmd+,opens Settings,Cmd+Kopens palette,Esccloses overlayslocalStorageon mount, applies.darkto<html>before React paints (FOUC-free inline script inindex.html), persists on toggleTier-1 / no-bloat confirmation
lucide-react,zustand, React 19. CSS keyframes for all overlay / panel / toast / shimmer animations. PlainaddEventListenerfor keyboard shortcuts.var(--color-*),var(--text-*),var(--space-*),var(--radius-*)tokens. Added 3 missing tokens (--color-toast-success,--color-toast-error,--color-overlay); no hex / px in component code.import typefor type-only imports, noany.Backward-compat notes
config,configLoaded,loadConfig,completeOnboarding,messages,previewHtml,isGenerating,errorMessage,toastMessage,sendPrompt,exportActive,dismissToast). Adds:theme,settingsOpen,commandPaletteOpen,toasts,lastError,retryLastPrompt,clearError,setTheme,toggleTheme,open/closeSettings,open/closeCommandPalette,pushToast.dismissToastaccepts an optionalidso the existingPreviewToolbar(which callsdismissToast()to clear the legacytoastMessage) keeps working unchanged. New multi-toast viewport callsdismissToast(id).if (config === null || !config.hasKey) return <Onboarding />) andloadConfigeffect preserved at the top ofApp.tsx.Integration notes
wt/reliability-v2onApp.tsx— both wrap the panes. The ErrorBoundary integration (wrapping<TopBar/>+ grid + overlays) should land in a follow-up commit oncewt/reliability-v2merges. No conflicting structural changes here beyond the slim shell.PreviewToolbar.tsxis intentionally unmodified — the newPreviewPanemounts it. Toolbar'stoastMessageslice continues to fire on export status; new multi-toast pipeline is used for generation success/failure and command-palette feedback.Modelstab is a deliberate stub. Provider key entry stays in onboarding; richer in-place provider switching lands once the schema supports multiple providers.§5b checks
useKeyboardhook for all shortcuts; one Tooltip primitive (CSS-only with 400ms hover delay); IconButton primitive shared across TopBar / ThemeToggleTest plan
pnpm install && pnpm -r typecheck && pnpm lint && pnpm -r testall green locally (verified)Cmd+Kopens palette; arrow keys + Enter run an action; Esc closesCmd+,opens Settings; clicking outside / pressing Esc closes