8 Commits
Author SHA1 Message Date
Willie 053ecb428d fix(ui): equal-height skill cards and improved theme param handling
- Add h-full + flex-col to SkillPostit cards so grid rows align evenly
- Make ?theme=clean/playful also set light mode explicitly
- Add postMessage listener for theme-push from parent window (Tauri shell)
2026-03-21 00:48:42 +08:00
Willie bfec6c8b36 feat(ui): read URL ?theme= param to set style and mode
Read the ?theme= query parameter on page load and popstate events
to override the current theme. Supported values: dark, light (mode),
playful, clean (style). Persists to localStorage so the preference
survives navigation.
2026-03-20 18:29:05 +08:00
Willie d572d1be25 feat: add branch switcher to Git Sync page
Allow non-technical users to switch git branches from the Web UI
without needing a terminal.

Backend:
- Add ListLocalBranches, ListRemoteBranches, Checkout to git layer
- Add GET /api/git/branches and POST /api/git/checkout endpoints
- Dirty-check guard prevents checkout with uncommitted changes

Frontend:
- Branch dropdown (HandSelect) with local/remote branch options
- Refresh button to fetch latest remote branches
- Repo Info Card restructured with status bar layout
- Push/Pull merged into single card with dashed grid divider
2026-03-14 04:01:10 +08:00
Willie 6fb99035af feat(ui): add multi-theme system with Playful (hand-drawn) style
Add a two-dimensional theme system: Style (Clean/Playful) × Mode (Light/Dark/System).

Theme infrastructure:
- ThemeContext with style + mode state, matchMedia listener, localStorage persistence
- ThemePopover in sidebar for switching style and mode
- FOUC prevention via inline script in index.html
- CSS custom properties for radius, shadows, fonts (resolved per theme)
- design.ts migrated to CSS variable refs

Playful theme features:
- Wobbly border-radius on cards, buttons, badges, inputs, dialogs
- Hard offset shadows (no blur) for sketch aesthetic
- Caveat handwritten font for headings, DM Sans for body text
- Dotted paper texture background
- Skill cards as pastel sticky notes with masking tape strips
- Wavy underlines on links
- Dashed sidebar border with Caveat section headers
- Per-card wobble variety (6 unique border-radius patterns)

Component enhancements:
- ss-* CSS class hooks on all themed components for CSS-only overrides
- SegmentedControl: aria-pressed for theme targeting, clean defaults
- SkillDetailSkeleton: custom loading skeleton matching detail page layout
- Dashboard Quick Action cards: hover animations (pulse/bounce)
- AuditPage: fix tour step targeting

Clean theme unchanged — all Playful styles scoped under [data-theme="playful"].
2026-03-12 23:23:28 +08:00
Willie 64a4c91c99 fix(ui): refine minimal redesign — dark mode B/W, link style, button polish
- Dark mode: replace blue accent with neutral gray for true B/W inversion
- Brighten dark mode semantic colors (success, warning, danger) for readability
- Links: replace wavy underlines with oMLX-style border-bottom (link-subtle class)
- Buttons: pill radius, outlined danger, subtle secondary/ghost hover
- Replace inline fontFamily monospace with global font-mono class (15+ files)
- Card: add overflow prop instead of global overflow-hidden removal
- ConfirmDialog/ExtrasModal: widen for better readability
- SkillsPage: neutral filter chips and badges (no blue/red in dark mode)
- BlockStamp/RiskMeter: consistent sizing with items-stretch
- Sidebar version: dynamic from API instead of hardcoded
2026-03-12 16:45:02 +08:00
Willie b24a80f861 feat(ui): add dark theme with toggle, aligned to website color palette
- Add .dark CSS variable overrides (warm brown bg, gold primary, muted shadows)
- Add ThemeContext with localStorage persistence and prefers-color-scheme detection
- Add theme toggle button (sun/moon) fixed at top-right of main content
- Replace all bg-white with bg-surface for theme-aware backgrounds
- Rewrite CodeMirror theme to use @lezer/highlight HighlightStyle for proper
  syntax highlighting in both light and dark modes
- Convert design.ts shadows from hardcoded hex to CSS variable references
- Add dark: variants for elements that need different active states per theme
- Add postit/tracked CSS custom properties with dark mode translucent overrides
2026-02-28 19:15:57 +08:00
Willie 29e97fcb4b feat(ui): migrate to TanStack Query and virtualize SkillsPage
Replace custom useApi hook with @tanstack/react-query across all 14
pages and InstallForm. Add react-virtuoso VirtuosoGrid to SkillsPage
for handling 46K+ skills without freezing the browser.

Key changes:
- Add queryClient with shared defaults (staleTime, gcTime, retry)
- Add centralized queryKeys factory for prefix-based invalidation
- Wire QueryClientProvider + ReactQueryDevtools in App.tsx
- Migrate AppContext to useQuery (shares cache with DashboardPage)
- Migrate all pages: useApi → useQuery, handlers → invalidateQueries
- SkillsPage grid view: VirtuosoGrid with useWindowScroll, overscan,
  ScrollSeekPlaceholder, and React.memo on card components
- Add resolve.dedupe for React to prevent duplicate instance in dev
- Add vendor-tanstack-query manual chunk for build splitting
- Delete unused useApi.ts hook
2026-02-25 07:02:54 +08:00
Willie 14bd568b9a feat: add project mode support to web dashboard (skillshare ui -p)
The web dashboard now fully supports project-level skills. When launched
with `-p` or when `.skillshare/config.yaml` is auto-detected, the UI
adapts: Git Sync and Backup pages are hidden, Config edits the project
config, Install reconciles ProjectConfig.Skills[], and targets resolve
from project-level definitions.

Server: add NewProject constructor, IsProjectMode/configPath/saveConfig/
reloadConfig helpers, branch all handlers for project mode.

Frontend: AppContext propagates isProjectMode, Layout filters nav items,
Git/Backup pages show unavailable message, Config/Dashboard adapt.

Extract ReconcileProjectSkills to internal/config for reuse by both CLI
and server. Add unit tests and integration tests for project UI.

Update docs, README, and Docker playground with project mode demo project
and skillshare-ui-p alias.
2026-02-08 17:15:59 +08:00