Files
ServerKit/frontend
Juan DenisandClaude Opus 5 5180ad4360 fix(dashboard): line up the control row, and let series pick a colour
The bar was a ragged line of mismatched pills: the segmented control, the
refresh select, the icon buttons and Edit each came from a different place with
its own padding and height. Every control in the row is now pinned to 32px and
centred, asserted in one rule rather than trusted from four sources.

Edit, Discard, Add widget and Done were bare `.btn`s, so they floated as loose
labels beside bordered pills. They share the icon buttons shell now.

The refresh select was rendering as an unstyled native control — it kept the
class name of the header that was deleted, and even with the right name it was
missing `appearance: none`, so the browser painted its own light box and system
chevron over everything. Styled properly, with its own chevron and named option
colours so a dark theme cannot produce white-on-white.

Load average shared --accent-bright with CPU, so a chart of both drew two
identical lines. The six metrics now map 1:1 onto the six themeable semantic
tokens; load takes red, which is also what load spiking usually means.

Beyond that, series colour is now yours to set: a swatch row per series in the
editor, offering the semantic tokens rather than hex, so a chart follows
whatever theme is running instead of pinning a colour a skin cannot repaint.

And charts can be stepped again. A sampled metric IS a series of discrete
readings, so holding each value until the next one is arguably the more honest
shape — the squared-off look from before, back as an option next to Legend and
Area fill rather than as the only choice.

Also styles five classes the markup emitted with no rules behind them (TV-mode
bar, empty-board actions, the error hint), caught by sweeping emitted class
names against the compiled CSS.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-25 21:35:32 -04:00
..

React Dashboard Template

A modern React dashboard application boilerplate built with Vite, featuring routing, charts, and a sidebar layout for building data-driven web interfaces.

Features

  • React 18 with functional components and hooks
  • Vite for fast development and building
  • React Router for client-side routing
  • Recharts for data visualization
  • Lucide React for icons
  • ESLint for code linting
  • Responsive sidebar layout
  • Dashboard page with sample components

Getting Started

Prerequisites

  • Node.js 16+ and npm

Installation

  1. Clone or download this template
  2. Install dependencies:
npm install

Development

Start the development server:

npm run dev

The app will be available at http://localhost:41921.

Building for Production

Build the app for deployment:

npm run build

The output will be in the dist/ directory.

Preview Production Build

npm run preview

Project Structure

src/
├── App.jsx              # Main app with routing
├── main.jsx             # Entry point
├── index.css            # Global styles
├── components/
│   └── Sidebar.jsx      # Navigation sidebar
├── layouts/
│   └── DashboardLayout.jsx  # Main layout wrapper
└── pages/
    └── Dashboard.jsx    # Main dashboard page

Customization

  • Modify components in src/components/
  • Add new pages in src/pages/
  • Update routes in App.jsx
  • Customize styles in index.css or component files

Environment Variables

Create a .env file in the root for environment variables:

VITE_API_URL=https://api.example.com

Access them in code via import.meta.env.VITE_API_URL.

Contributing

See the documentation files for AI agent permissions and guidelines.