Skip to content

Shadcn UI port - #1

Draft
Chriscbr wants to merge 5 commits into
marcbrooker:mainfrom
Chriscbr:shadcn-ui-port
Draft

Chriscbr wants to merge 5 commits into
marcbrooker:mainfrom
Chriscbr:shadcn-ui-port

Conversation

@Chriscbr

@Chriscbr Chriscbr commented Apr 25, 2026

Copy link
Copy Markdown

Port the UI to shadcn for a (maybe?) cleaner look. The only changes made were to the UI components (nothing affecting the simulation engine etc).

This was pretty much all vibe coded, so mostly just wanted to share as a potential idea (I didn't review the 4000 lines changed so I'm not trying to suggest anyone else should either). Happy to close the PR if it doesn't fit the goals of the project.

Before:
Screenshot 2026-04-25 at 3 17 06 PM

After:
Screenshot 2026-04-25 at 3 17 00 PM

Chriscbr and others added 5 commits April 25, 2026 14:19
Replace hand-rolled CSS in App.css with Tailwind utility classes and
a curated set of shadcn primitives (Button, Input, Select, Slider,
Dialog, DropdownMenu, Tooltip, etc.) under src/components/ui/.

Engine, stores, persistence, and worker boundary are unchanged —
only the UI layer was migrated. All 276 existing tests pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Theme tokens shifted to canonical shadcn zinc dark palette (true
  neutrals instead of the indigo-tinted custom palette)
- All component-type emojis replaced with lucide icons via a single
  COMPONENT_VISUALS registry shared between palette, canvas nodes,
  and properties panel header
- ComponentPalette items now look like card-styled menu rows with a
  small colored icon container instead of saturated full-color fills
- Canvas nodes (SimNode) use the same card-with-accent pattern, so
  the visual identity carries from palette → canvas → property panel
- Per-component node wrapper files collapsed into a single makeNode()
  factory in nodes/index.tsx
- Top toolbar: transport buttons grouped in a subtle pill, status
  rendered as a Badge with run/pause/idle variants, random-seed
  toggle moved behind a Shuffle icon button
- Properties panel: cleaner empty state (dashed border + cursor icon),
  uppercase section header, info icons use real lucide Info
- Failure scenarios panel: section header + count chip, scenario rows
  use destructive-tinted card with proper Zap icon
- Dashboard: metric chips include an X icon, status moved out (lives
  in toolbar now)
- Dialog still uses radix backdrop blur, recharts theme harmonized
  with new tokens

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Toolbar was wrapping onto multiple rows once the viewport got below
~1280px, and the "Stability Sim" title was breaking onto two lines.

Changes:
- Title is whitespace-nowrap and hides at <sm (640px); the toolbar
  itself uses flex-nowrap with min-w-0 so children can shrink instead
  of triggering wrap.
- Duration and Seed inputs moved behind a Settings2 icon button that
  opens a Popover (new shadcn primitive). The popover keeps the same
  random-seed Shuffle toggle that was inline before.
- "by Marc Brooker · GitHub" footer moves from lg:inline to xl:inline
  so it disappears earlier rather than competing for toolbar space.
- Speed cluster trimmed: dropped the "Speed" prefix label, kept the
  slider + multiplier readout.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a small Activity (heartbeat) icon in a foreground-tinted square
next to the "Stability Sim" title and bumps the title from text-sm
to text-base. The icon doubles as a recognizable mark when the text
hides at narrow widths (<sm).

Same mark appears in the About dialog header so the visual identity
is consistent across the app.

Header py bumped from 2 to 2.5 to give the larger title breathing
room.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Chart tooltips were rendering raw float values like 8.193448087564818.
Adds a fmt() helper that targets 3-4 significant digits across the
typical range produced by the simulator and applies it to:
- Tooltip values (formatter prop)
- Tooltip x-axis label (labelFormatter prop)
- Y-axis ticks (tickFormatter prop)
- All three chart panes: latency percentiles, throughput, custom
  metric groups

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant