Commit Graph
545 Commits
Author SHA1 Message Date
Willie 095d076bc1 fix(ui): remove all left-border stripes, fix modifier HUD bug, refine components
Replace left-border colored stripes with severity dots across all pages
(AuditPage, AuditRulesPage, InstallForm, GitSyncPage, SkillsPage) and
components (Card accent variant, ConfirmDialog, Select). Card accent now
uses a thicker border instead of a left stripe.

Fix Cmd+S modifier HUD staying visible by resetting state immediately
after shortcut fires and adding a 2-second auto-dismiss safety timer.

Additional refinements: extract Checkbox/Select/Spinner/Tooltip into
standalone components, update Button link variant to pencil colors,
replace SkillsPage FilterChips with SegmentedControl connected, and
update style guide to mark left-border stripes as an anti-pattern.
2026-03-12 16:45:02 +08:00
Willie bb6b3f56d2 fix(ui): replace useEffect with render-time state adjustment in SkillsTable
Removes the anti-pattern of calling setState synchronously inside
useEffect to reset pagination when skills list changes. Uses React's
recommended "adjusting state during rendering" pattern instead, which
avoids cascading re-renders.
2026-03-12 16:45:02 +08:00
Willie 7ade470557 refactor(ui): rename oMLX references to skillshare-inspired
Remove external brand references from code comments, design tokens,
and style guide. The design philosophy is our own.
2026-03-12 16:45:02 +08:00
Willie cb8b5b530a feat(ui): add modifier keyboard shortcuts, HUD overlay, and sync progress animation
- Add Cmd/Ctrl+S shortcut to navigate to Sync page (cross-platform)
- Show floating HUD bar when holding Cmd/Ctrl to reveal modifier shortcuts
- Add indeterminate shimmer progress bar during sync operations
- Animate SVG pipeline dashed lines with flow effect while syncing
- Update KeyboardShortcutsModal to render modifier key combos (⌘/Ctrl)
- Add ScrollToTop button for long-scrolling pages
- Migrate page styles to use shared design tokens (radius, shadows)
2026-03-12 16:45:02 +08:00
Willie b4288ac7b1 fix(ui): redesign sidebar bottom bar with nav-consistent style
Replace horizontal icon+text buttons with vertical layout matching
the nav item style (icon + label, same padding/gap). Add keyboard
shortcuts toggle button and global shortcut hook integration.
2026-03-12 16:45:02 +08:00
Willie 99335ccf56 feat(ui): add sticky group headers in SkillsPage grouped view
Replace Virtuoso with GroupedVirtuoso for the grouped view so that
directory sub-headers stick below the toolbar while scrolling.
GroupedVirtuoso's TopItemList component is customized with the
measured toolbar height offset to position headers correctly.
2026-03-12 16:45:02 +08:00
Willie d6616a7cf1 fix(ui): improve SegmentedControl dark mode visibility, adjust sticky padding
- Add border to active button in connected SegmentedControl so it's
  visible in dark mode (bg-surface was nearly invisible against container)
- Increase sticky toolbar bottom padding (pb-2 → pb-4) for breathing
  room between filter chips and content
2026-03-12 16:45:02 +08:00
Willie 4c41443b7d fix(ui): refine sticky toolbar spacing, soften SegmentedControl and Input styles
- Tighten sticky toolbar gaps (search mb-4→mb-2, chips mb-6→mb-0)
- SegmentedControl connected mode: add p-1 inner padding + gap-0.5,
  active state from solid black to white surface with shadow
- Input: border-radius 4px→8px, focus ring matches pencil palette
2026-03-12 16:45:02 +08:00
Willie d6cbfc82d9 feat(ui): add sticky search/filters toolbar on SkillsPage, clean up LogPage
Wrap search bar, sort dropdown, view toggle, and filter chips in a
sticky container so they stay pinned while scrolling through skills
in all three view modes (grid/grouped/table).

Also clean up LogPage: remove unused imports, simplify status rendering
from Badge to inline dot+text, add pagination page size control, and
streamline section comments.
2026-03-12 16:45:02 +08:00
Willie 3227400958 refactor(ui): extract PageHeader component, tone down Badge and StatusBadge
- Extract shared PageHeader with icon/title/subtitle/actions props,
  replacing duplicated header markup across all 16 pages
- Shrink Badge to text-xs with tighter padding for subtler appearance
- Change StatusBadge normal states (merged/copied/linked) to default
  grey variant — only anomalies (warning/danger) use color
- TargetsPage: move delete button to top-right, restore dashed separator
  between path and mode row
2026-03-12 16:45:02 +08:00
Willie dfd62ee19c fix(ui): compact TargetsPage card layout, remove version stat from dashboard
- Move filter link and skill count inline with sync mode dropdown,
  eliminating separate rows and the dashed separator
- Use ghost variant for Filters button to match neutral B/W theme
- Show filter tags with Edit link when filters exist, inline link when empty
- Remove redundant Version card from DashboardPage stats grid
2026-03-12 16:45:02 +08:00
Willie 6b2d94776a fix(ui): allow Select dropdown to expand for full descriptions, improve TargetsPage filters
- Change dropdown panel from w-full to min-w-full so it can grow
  wider than the trigger when descriptions need more space
- Remove truncate from option description text
- Restructure TargetsPage filter section: only show filter UI for
  merge/copy modes, add inline filter badge display with +/− labels
2026-03-12 16:45:02 +08:00
Willie 19a27202e8 feat(ui): redesign Select dropdown, add shared DialogShell/IconButton/Pagination/SegmentedControl
- Redesign Select with size variants (sm/md), B/W color scheme,
  dropdown animation, and consistent height with Button/Input
- Extract DialogShell for unified modal styling across all dialogs
- Add IconButton for icon-only actions with ghost/outline variants
- Add Pagination component for table views
- Add SegmentedControl for tab-like toggle groups
- Update Button: add link variant, border-2 for stronger presence
- Migrate all pages to use shared components, remove inline styles
2026-03-12 16:45:02 +08:00
Willie fff0711e36 feat(ui): add table view with pagination, virtualize grouped view, improve audit dialogs
Skills page gains a third "table" view with paginated list (10/25/50),
hover tooltips via createPortal, and localStorage persistence for the
selected view. Grouped view now uses Virtuoso for smooth scrolling with
large skill sets.

Install/audit dialogs refactored to card-based findings with severity
filter badges, structured grouping, and increased max-height. Confirm
dialog buttons bumped to medium size.
2026-03-12 16:45:02 +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 46265ae2e7 feat(ui): match oMLX style — dark sidebar active, clean borders, 8px btn radius 2026-03-12 16:45:02 +08:00
Willie bcf72d52fc feat(ui): apply oMLX button palette — dark primary, outline secondary 2026-03-12 16:45:02 +08:00
Willie 773ce9ba08 chore(ui): final cleanup — remove CSS stubs and compat shims
- Remove all --color-postit-* and --color-tracked-* stub CSS variables
  from both @theme and .dark blocks in index.css
- Remove `postit` variant and `decoration` prop from Card.tsx
- Replace bg-postit Tailwind classes with bg-paper/bg-surface equivalents
- Replace animate-spin-slow/animate-pulse-gentle with standard animate-spin/animate-pulse
2026-03-12 16:45:02 +08:00
Willie fb34809b2f refactor(ui): rename HandButton→Button, HandInput→Input + remove deprecated aliases
- Rename HandButton.tsx → Button.tsx, export default function Button
- Rename HandInput.tsx → Input.tsx, rename exports: HandInput→Input,
  HandTextarea→Textarea, HandSelect→Select, HandCheckbox→Checkbox
- Rename internal interface names (ButtonProps, InputProps, etc.)
- Update all 21 import sites across components/ and pages/
- Remove deprecated `wobbly` and `colors` exports from design.ts
2026-03-12 16:45:02 +08:00
Willie e8a850d757 feat(ui): clean all pages — remove hand-drawn decorations
Replace wobbly->radius, colors->palette, animate-sketch-in->animate-fade-in.
Remove all fontFamily var(--font-hand/heading) inline styles, decoration="tape",
variant="postit", and decorative rotate transforms. Rewrite SkillsPage card
components to use uniform surface-background cards with accent border-l for
tracked skills, dropping the postit/trackedColors arrays and getRotation helper.
2026-03-12 16:45:02 +08:00
Willie ef4e51abcf feat(ui): simplify remaining components — remove hand-drawn styling
Replace wobbly→radius, colors→palette, animate-sketch-in→animate-fade-in,
animate-pulse-gentle→animate-pulse across Skeleton, Toast, ConfirmDialog,
EmptyState, ErrorBoundary, StreamProgressBar, FilterTagInput, BlockStamp,
RiskMeter, FileViewerModal, SkillPickerModal, HubManagerModal, InstallForm.
Remove fontFamily overrides (now inherited from body), decoration="tape"
props from Card, dashed borders, rotation transforms, and hard-coded shadows.
BlockStamp simplified to clean inline-flex badge, no rotation.
2026-03-12 16:45:02 +08:00
Willie cf92a221b2 feat(ui): simplify core components — Card, Button, Input, Badge
Replace hand-drawn skeuomorphic styles (wobbly borders, shadow-translate
hover effects, handwriting font) with clean, minimal equivalents using
the updated radius/shadows tokens. Preserve all props and keyboard
navigation for backward compatibility.
2026-03-12 16:45:02 +08:00
Willie 06ca4696e2 feat(ui): rewrite design tokens — radius, palette, clean CodeMirror theme
- design.ts: replace wobbly border-radius with clean radius constants (4-12px),
  add semantic palette export; keep deprecated colors/wobbly aliases for migration
- codemirror-theme.ts: switch font to SFMono stack, replace dashed gutter border
  with 1px solid, swap postit highlights for info-light/warning-light
- audit/helpers.ts: migrate from colors.blue to palette.info
2026-03-12 16:45:02 +08:00
Willie 8f8991382c feat(ui): rewrite CSS tokens — minimal palette, remove hand-drawn effects 2026-03-12 16:45:02 +08:00
Willie 7b6f0e8f09 feat(ui): swap Google Fonts from Inter to DM Sans 2026-03-12 16:45:02 +08:00
Willie 69038611c3 feat(ui): add Extras page, API client, and Dashboard card
- ExtrasPage with list, sync, remove, and add-extra modal
- API client types and methods for extras endpoints
- Dashboard stat card showing extras count/files/targets
- Nav item and route registration
2026-03-12 16:45:02 +08:00
salmonumbrella 1e07a77681 fix(ui): share copy button behavior 2026-03-12 09:38:31 +08:00
salmonumbrella 92bf8b6898 feat(ui): add copy-to-clipboard for skill paths
Add a copy button (overlapping-squares icon) to the skill detail page:
- Next to the "Path" label in the Metadata card, copies the full
  absolute source path
- In the file viewer modal header, copies the full file path

Clicking shows a brief checkmark with "Copied!" confirmation.
2026-03-12 09:38:31 +08:00
Willie 7e072c33c9 feat(ui): replace "Show more" pagination with virtualized scrolling
AuditPage: use Virtuoso with useWindowScroll for skill audit cards.
SyncPage: use Virtuoso with fixed-height container for diff items
(100+ threshold), flat render for small lists.
2026-03-05 02:13:21 +08:00
Willie 344b067806 feat(ui): add SSE streaming for update, check, and diff pages
Replace sequential POST loops and blocking useQuery calls with
Server-Sent Events for real-time progress feedback on Update, Check,
and Diff operations. Extract shared helpers to reduce duplication:

- initSSE() in middleware.go consolidates SSE preamble across 4 handlers
- createSSEStream() in client.ts unifies EventSource lifecycle management
- StreamProgressBar component replaces 3 near-identical progress bars
- handleDiff now delegates to computeTargetDiff (eliminates ~150 lines)
- Paginate audit results (20 cards + 10 findings per card) to prevent
  DOM overload with large skill counts
2026-03-05 02:13:21 +08:00
Willie 76c1904afb feat(ui): add SSE-based audit streaming and real-time progress
Add server-sent events endpoint for audit scans so the web UI can
display per-skill progress instead of waiting for the full batch.

Backend:
- Extract discoverAuditSkills and processAuditResults from handler
- Add handler_audit_stream.go with SSE streaming endpoint
- Register GET /api/audit/stream route with read-lock middleware
- Add CORS headers for SSE connections in middleware

Frontend:
- Add AuditStreamPanel and AuditResultCard components
- Wire streaming audit into AuditPage with start/stop controls
- Add useAuditStream hook and streamAudit API client method
- Add per-skill audit action on SkillDetailPage
- Add check-based update detection on UpdatePage
- Configure Vite proxy for SSE endpoint
2026-03-05 02:13:21 +08:00
Willie 459c322308 feat(audit): add category breakdown to summary across all output channels
Surface per-category finding counts (e.g., injection:3 exfiltration:2)
in CLI summary, TUI footer, markdown report, JSON output, and web API.
Adds Result.CountByCategory(), formatCategoryBreakdown() with compact
mode for TUI, and byCategory field to all audit summary structs.
2026-03-03 16:08:11 +08:00
Willie 0d04399ba9 feat(audit): surface Phase 2 fields (ruleId, analyzer, category) across all output channels
Previously the Phase 2 finding fields (ruleId, analyzer, category,
confidence, fingerprint) were only emitted in JSON and SARIF output.
This propagates them to CLI text, TUI detail panel, Markdown reports,
Server API responses, and the React frontend — each channel showing
the subset most useful for its audience.

- Server API: all 5 fields (omitempty) in auditFindingResponse
- CLI text: dim [ruleID / analyzer] line between severity and snippet
- TUI: cyan ruleID / analyzer / category line + search index
- Markdown: Rule ID and Category table columns
- Frontend: ruleId · analyzer · category dim metadata line
2026-03-03 16:08:11 +08:00
Willie a97cf9e34e refactor(audit): simplify rules code, fix N+1 I/O, and extract shared helpers
- Remove duplicate readOrCreateRulesFile (use loadUserRules)
- Consolidate severity normalization with shorthand aliases (c/h/m/l/i)
- Merge enable/disable into shared cmdAuditRulesToggle
- Cache builtinYAML() with sync.Once to avoid repeated YAML parsing
- Cache rulesPath/patterns/sevCounts on TUI model, use SetItems over list.New
- Extract execMutation helper, remove dead expandAll/collapseAll/buildTitle
- Fix TestScanContent_InsecureHTTP test pollution via resetForTest()
- Add batch ToggleRules/SetSeverityBatch to eliminate N+1 file I/O
- Extract shared severity helpers to ui/src/lib/severity.ts
- Merge 9 filter() calls into single-pass useMemo in AuditRulesPage
- Add 7 tests for batch toggle and severity operations
2026-03-03 16:08:11 +08:00
Willie dbe759ecfe feat(audit): add CLI rules subcommand, severity override, reset, and redesign Web UI
- Add `audit rules` CLI subcommand with list, enable, disable, severity,
  and reset commands for managing audit rules without editing YAML
- Add SetSeverity/SetPatternSeverity/ResetRules mutations in audit package
- Redesign TUI with severity tabs, two-level pattern→rule navigation,
  inline severity picker (1-5 keys), and reset-all support
- Add compiled rules API endpoints (GET /api/audit/compiled, PATCH toggle)
- Redesign AuditRulesPage with severity-colored stripes, stat cards,
  expand/collapse, toggle switches, and dark-mode-aware CSS variables
- Redesign LogPage with status-colored row stripes, reusable PillButton,
  improved stats cards with left border stripes, default 10 entries/page
- Remove system-writes audit pattern (noisy, low value)
- Fix dark mode contrast across both pages by replacing hardcoded
  design.ts colors with var(--color-*) CSS variable references
2026-03-03 16:08:11 +08:00
Willie aa4b3ec311 feat(ui): improve update page empty state and targets sync mode UX
- UpdatePage: replace EmptyState with postit card, add phase state
  machine (idle/updating/done), per-item status tracking with
  staggered animations, and result summary panel
- HandSelect: add optional description field to SelectOption, render
  multi-line dropdown items with description text
- TargetsPage: add sync mode descriptions, widen dropdown (w-32→w-44),
  add dashed border separator above sync mode row
2026-02-28 20:56:34 +08:00
Willie f7483fdbe7 feat(ui): add dedicated update page with batch selection 2026-02-28 20:56:34 +08:00
Willie ba7752f85d feat(ui): enhance install skill picker with descriptions and into-dir field
Include skill description from SKILL.md frontmatter in the discover API
response, add the optional description field to the DiscoveredSkill
TypeScript interface, and render it inline in the SkillPickerModal.
Filter search also matches against descriptions. The --into directory
input already existed in InstallForm, so no change was needed there.
2026-02-28 20:56:34 +08:00
Willie 6def2a254a feat(ui): add security overview card to dashboard
Enhance the existing Security Audit section on the Dashboard with:
- Risk label badge (clean/low/medium/high/critical) next to the title
- Severity breakdown badges (CRITICAL/HIGH/MEDIUM/LOW/INFO) for non-zero counts
- ShieldAlert icon in red when CRITICAL findings exist
- Card variant="accent" highlight when CRITICAL findings are present
- Green "All Clear" message with ShieldCheck icon when no findings
- Renamed section title from "Security Audit" to "Security Overview"
- Renamed last stat box from "Critical" to "Failed" for accuracy
2026-02-28 20:56:34 +08:00
Willie 18cfaa984c feat(ui): add sync mode selector to targets page 2026-02-28 20:56:34 +08:00
Willie 208b34d8a0 fix(ui): add accessibility improvements — aria-labels, focus trap, ErrorBoundary, htmlFor 2026-02-28 20:56:34 +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 a37c458740 fix(ui): support subdir URL discovery and fix modal scroll-away bug
handleDiscover and handleInstallBatch now use DiscoverFromGitSubdir
when the source URL contains a subdirectory path, enabling the skill
picker modal to appear for multi-skill subdirectories.

Fix SkillPickerModal content disappearing on checkbox click caused by
Card's overflow-hidden creating a scroll container — browser's
scrollIntoView on the sr-only input would scroll content out of view.
Use overflow-clip instead to preserve border-radius clipping without
creating a scroll context.

Issue #56 (workaround)
2026-02-28 18:26:48 +08:00
Willie 96f65725dd fix(ui): compare last_operation timestamps as dates, not strings
RFC3339 string comparison fails with different timezone offsets.
Parse to Date before comparing to ensure correct ordering.
2026-02-26 22:27:23 +08:00
Willie 32a5794b6c fix(ui): compute stats from both ops and audit logs on all tab
The stats bar only fetched ops stats when the all tab was active,
producing misleading analytics (e.g. audit commands showing rows but
zero in the stats panel). Now fetches both sources and merges them
client-side via useMemo.
2026-02-26 22:27:23 +08:00
Willie fbab56f86b feat(ui): add log stats bar with success rate and command breakdown
Wire up the new GET /api/log/stats endpoint in the frontend:
- api.getLogStats() + CommandStats/LogStatsResponse types in client.ts
- logStats query key in queryKeys.ts
- LogStatsBar component on Log page showing success rate, top 4
  commands with ok/error/partial counts, and last operation badge
- Stats bar respects tab (ops/audit) and active filters
- Refresh and clear actions invalidate both log and log-stats queries
2026-02-26 22:27:23 +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 a50639b0b6 feat(ui): enhance restore modal with validation preview and conflict warnings
Modal now calls /api/restore/validate on open to show backup size,
symlink status, and file conflicts before confirming. Button text
dynamically changes to "Restore (overwrite)" when conflicts exist.
Removes hardcoded force:true — only sends force when user acknowledges.
2026-02-25 07:02:54 +08:00
Willie 0af62f5aaa feat(ui): add validateRestore API type and function 2026-02-25 07:02:54 +08:00
Willie c9e10faeb7 feat(log): record update command options in oplog and add dedicated formatters
logUpdateOp now captures mode, all, force, dry_run, skip_audit, threshold,
and diff flags. Dedicated formatUpdateLogPairs/Detail formatters replace the
generic fallback in both the TUI log viewer and the web UI LogPage.
2026-02-25 07:02:54 +08:00