Skip to content

Commit 8b2b03d

Browse files
Calcium-Iont0ng7uQuentinHsu
authored
feat(web/default): unified UI overhaul — Base UI migration, theme presets, rankings dashboard, and table toolbar refactor (#4633)
* 🎨 feat(web/default): add shadcn-style theme presets, radius prefs, and fix selection badges Integrate the qn-platform–style OKLCH color system into the default frontend while keeping the existing blue-tinted dark tokens for the default theme. Add [data-theme-preset] palettes for seven named presets plus the default zinc-like scale, define [data-theme-radius] overrides so user radius beats preset --radius, and align the Tailwind @custom-variant dark helper with .dark usage. Introduce ThemeCustomizationProvider to own preset and radius state, persist choices in cookies (theme-preset, theme-radius), and sync data-theme-preset / data-theme-radius on <html>. Wrap the tree in main.tsx. Extend ConfigDrawer with theme preset swatches (scoped data-theme-preset) and radius previews wired to context; refactor swatch/card markup so selected CircleCheck badges sit outside clipped rows (remove outer overflow-hidden that hid the centered checkmark). Add i18n keys for preset names, radius, and accessibility labels across en, zh, fr, ja, ru, vi. * 🎨 fix(web): align segmented controls with theme radius tokens - Replace hard-coded inner pill radii (rounded-[5px]) on dashboard chart toolbars with radius-md so the active state follows --radius when users change Radius in Theme Settings. - Use nested radii consistent with TabsList/TabsTrigger: outer rounded-lg (var(--radius)) and inner rounded-md (calc(var(--radius) - 2px)) so the track and active thumb stay concentric at small scales (e.g. 0.3rem) instead of a squared “focus” block inside a rounded shell. - Apply the same pattern to pricing SegmentedControl and the segmented groups in consumption-distribution-chart, model-charts, and user-charts. Verified: bun run typecheck (web/default) * ✨ feat(pricing): enrich model details with uptime sparkline and API documentation Add a compact 30-day uptime sparkline (OpenRouter-style bars + aggregate %) with per-day tooltips, surface it in a status row under quick stats and in the per-group performance table, and extend mock data so uptime series are stable and optionally scoped by group. Introduce an API tab with Shiki-highlighted code samples (cURL, Python, TypeScript, JavaScript), endpoint-type switching, authentication guidance, a supported-parameters table, and mock per-group RPM/TPM/RPD limits. Infer vendor, tokenizer, license, and data-retention hints for a provider & data privacy card on the Overview tab (capabilities/modalities stay with model identity; rate limits stay with the API tab). Update i18n for all new user-facing strings across en, zh, fr, ja, ru, and vi. * 🏆 feat(rankings): add comprehensive rankings dashboard Add a mock-data powered rankings experience with period tabs, model, app, and vendor leaderboards, market share and history charts, movers, new releases, and per-category sections while backend analytics are pending. Link ranked models to pricing details and ranked vendors to filtered pricing results, and include localized copy for all supported frontend locales. * fix(theme): correct theme preset selection state - update Base UI Radio selectors to use data-checked/data-unchecked states. - fix unchecked theme options still showing selected indicators. - isolate the default theme preview tokens to prevent preset changes from leaking into it. * fix(setup): correct usage mode radio state - use Base UI data-checked/data-unchecked states for RadioGroup styling. - hide radio indicators when options are unchecked to avoid setup page display issues. - drive usage mode card and icon selection styles from Base UI state. * fix(auth): submit sign-in and sign-up forms * 🎨 refactor: Align default theme with shadcn Base Nova and prune legacy customization Migrate shadcn UI to Base UI primitives via CLI (`base-nova` / `components.json`) and reinstall full component registry with `--overwrite`, including Hugeicons-backed widgets and newly added registry components. - Remove custom multi-preset/theme-radius system (`ThemeCustomizationProvider`, cookies, preset UI from config drawer); rely on official semantic CSS tokens + light/dark only. - Replace `theme.css` with shadcn’s documented neutral `:root`/`.dark` palette and `@theme inline` mappings (plus skeleton token vars for existing shimmer usage). - Update global styles for Base UI: collapsible animation uses `--collapsible-panel-height`; clarify scroll-lock override comment. Application compatibility: - Keep minimal shims where app code diverged from official APIs (popover collision props, combobox legacy `options` callers, Spinner prop typing). - Switch interactive styling from Radix-era `data-state` / `--radix-*` selectors to Base UI semantics (`data-open`, `data-popup-open`, `data-panel-open`, `--anchor-width`, etc.) Tooling / docs / build: - Rename Rsbuild vendor chunk grouping to `@base-ui` + transitive `@radix-ui`. - Refresh AGENTS.md / CLAUDE.md / classic→default sync skill for Base UI stack. - Bump `package.json` / lockfile for shadcn-postinstall deps (Hugeicons, chart stack, themes, etc.) Verified: `bun run typecheck` passes. Note: `bun run lint` still reports pre-existing hooks rule violations elsewhere; not addressed in this change. * 🎨 chore(web/default): unify table toolbar, relocate usage stats, refine filters - Refactor DataTableToolbar to a single wrapping flex row with a right-aligned action cluster (Reset / Search / View / Expand) for a cleaner Ant Design Pro–style filter bar; remove the dedicated stats row and the toolbar `stats` prop. - Move Common Logs summary badges (Usage / RPM / TPM) and the sensitive- data visibility toggle into the page header via CommonLogsHeaderActions and SectionPageLayout.Actions so the toolbar stays focused on filters. - Slim CommonLogsFilterBar props (no stats / preActions eye control). - Improve CompactDateTimeRangePicker: show minute-precision labels on the trigger (seconds omitted; aligns with datetime-local inputs); widen the trigger on sm+ breakpoints so the full range is visible without truncation; apply the same width in task logs filters. - Simplify DataTableViewOptions: text-only “View” trigger, no sliders icon. - Earlier layout tweak: extra top padding on SectionPageLayout scroll content so control focus rings are not clipped by overflow. * feat(web/default): Base UI migration and component foundation Migrate from Radix UI to Base UI, rewrite core UI primitives, update dependencies (recharts, date-fns, next-themes), add shadcn agent skill documentation, and refresh AI element components. This is the foundational work from the v2/localmain lineage that was not covered by the individual feature commits above. --------- Co-authored-by: t0ng7u <dev@aiass.cc> Co-authored-by: QuentinHsu <xuquentinyang@gmail.com>
1 parent dac55f0 commit 8b2b03d

317 files changed

Lines changed: 19871 additions & 7008 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/classic-to-default-sync/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Read every changed file in `web/classic`. Identify the **logical changes** (new
2626
For each logical change found in Step 1, locate the equivalent file(s) in `web/default/src/`. Use Glob/Grep/SemanticSearch as needed. Consider that:
2727

2828
- `web/classic` uses **React 18 + Vite + Semi Design**
29-
- `web/default` uses **React 19 + Rsbuild + Radix UI + Tailwind CSS**
29+
- `web/default` uses **React 19 + Rsbuild + Base UI + Tailwind CSS**
3030
- Component names, file paths, and API shapes may differ; match by **functionality**, not filename.
3131

3232
### Step 3 — Triage each change
@@ -46,7 +46,7 @@ For each **⚠️** or **❌** item:
4646
1. **Read the target file(s) in `web/default`** before editing (required by project conventions).
4747
2. Implement using `web/default` conventions:
4848
- React 19 patterns (hooks, Suspense, etc.)
49-
- Radix UI primitives where applicable
49+
- Base UI primitives where applicable
5050
- Tailwind CSS for styling (no inline styles or Semi Design imports)
5151
- `useTranslation()` + `t('English key')` for all user-visible strings
5252
- TypeScript — explicit types, no `any`

.agents/skills/shadcn-ui/SKILL.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
---
2+
name: shadcn-ui
3+
description: >-
4+
Give the assistant project-aware shadcn/ui context: components.json,
5+
composition patterns, CLI, registries, theming, and MCP. Use when working on
6+
web/default UI, shadcn components, or presets. Overview aligns with
7+
https://ui.shadcn.com/docs/skills.md; full upstream skill text is vendored
8+
under vendor/shadcn/.
9+
---
10+
11+
<!-- Canonical overview: https://ui.shadcn.com/docs/skills.md -->
12+
13+
# Skills (shadcn/ui)
14+
15+
Skills give AI assistants project-aware context about shadcn/ui. When used, the assistant knows how to find, install, compose, and customize components using the correct APIs and patterns for your project.
16+
17+
For example, you can ask:
18+
19+
- _"Add a login form with email and password fields."_
20+
- _"Create a settings page with a form for updating profile information."_
21+
- _"Build a dashboard with a sidebar, stats cards, and a data table."_
22+
- _"Switch to --preset [CODE]"_
23+
- _"Can you add a hero from @tailark?"_
24+
25+
The skill reads your project's `components.json` and provides your framework, aliases, installed components, icon library, and base library so it can generate correct code on the first try.
26+
27+
---
28+
29+
## Install (ecosystem vs this repo)
30+
31+
Official install from [Skills — shadcn/ui](https://ui.shadcn.com/docs/skills.md):
32+
33+
```bash
34+
npx skills add shadcn/ui
35+
```
36+
37+
That installs the skill where the `skills` CLI is available. **This repository** keeps the same intent under `.agents/skills/shadcn-ui/` (overview here + **vendored** upstream docs in [`vendor/shadcn/`](./vendor/shadcn/)) and runs the shadcn CLI from the frontend app root:
38+
39+
```bash
40+
cd web/default && bunx shadcn@latest info --json
41+
```
42+
43+
Learn more about skills at [skills.sh](https://skills.sh).
44+
45+
---
46+
47+
## What's included (and where)
48+
49+
### Project context
50+
51+
Run **`shadcn info --json`** (here: `cd web/default && bunx shadcn@latest info --json`) for framework, Tailwind version, aliases, base (`radix` | `base`), icon library, installed components, and resolved paths.
52+
53+
### CLI commands
54+
55+
Full command reference (vendored): [`vendor/shadcn/cli.md`](./vendor/shadcn/cli.md).
56+
57+
### Theming and customization
58+
59+
Vendored: [`vendor/shadcn/customization.md`](./vendor/shadcn/customization.md). Live docs: [Theming](https://ui.shadcn.com/docs/theming).
60+
61+
### Registry authoring
62+
63+
Not duplicated as a single file in the vendor tree; see [Registry](https://ui.shadcn.com/docs/registry) and `build` in [`vendor/shadcn/cli.md`](./vendor/shadcn/cli.md).
64+
65+
### MCP server
66+
67+
Vendored: [`vendor/shadcn/mcp.md`](./vendor/shadcn/mcp.md). Live docs: [MCP Server](https://ui.shadcn.com/docs/mcp).
68+
69+
---
70+
71+
## How it works
72+
73+
1. **Project detection** — Applies when `components.json` exists (here: `web/default/components.json`).
74+
2. **Context injection** — Use `shadcn info --json` as ground truth for imports and APIs.
75+
3. **Pattern enforcement** — Follow rules in [`vendor/shadcn/SKILL.md`](./vendor/shadcn/SKILL.md) and [`vendor/shadcn/rules/`](./vendor/shadcn/rules/).
76+
4. **Component discovery**`shadcn docs`, `shadcn search`, MCP, or registries — see vendored SKILL + MCP doc.
77+
78+
---
79+
80+
## Learn more (web)
81+
82+
- [CLI](https://ui.shadcn.com/docs/cli) — complements [`vendor/shadcn/cli.md`](./vendor/shadcn/cli.md)
83+
- [Theming](https://ui.shadcn.com/docs/theming)
84+
- [Registry](https://ui.shadcn.com/docs/registry)
85+
- [skills.sh](https://skills.sh)
86+
87+
---
88+
89+
## Vendored upstream bundle (deep rules)
90+
91+
Snapshot from [shadcn-ui/ui `skills/shadcn`](https://github.com/shadcn-ui/ui/tree/main/skills/shadcn); revision note in [`vendor/shadcn/UPSTREAM.txt`](./vendor/shadcn/UPSTREAM.txt).
92+
93+
| Doc | Path |
94+
| --- | --- |
95+
| Full official skill body | [`vendor/shadcn/SKILL.md`](./vendor/shadcn/SKILL.md) |
96+
| CLI reference | [`vendor/shadcn/cli.md`](./vendor/shadcn/cli.md) |
97+
| Theming / customization | [`vendor/shadcn/customization.md`](./vendor/shadcn/customization.md) |
98+
| MCP | [`vendor/shadcn/mcp.md`](./vendor/shadcn/mcp.md) |
99+
| Forms | [`vendor/shadcn/rules/forms.md`](./vendor/shadcn/rules/forms.md) |
100+
| Composition | [`vendor/shadcn/rules/composition.md`](./vendor/shadcn/rules/composition.md) |
101+
| Icons | [`vendor/shadcn/rules/icons.md`](./vendor/shadcn/rules/icons.md) |
102+
| Styling | [`vendor/shadcn/rules/styling.md`](./vendor/shadcn/rules/styling.md) |
103+
| Base vs Radix | [`vendor/shadcn/rules/base-vs-radix.md`](./vendor/shadcn/rules/base-vs-radix.md) |
104+
105+
**Workflow:** Prefer this **root** `SKILL.md` for repo paths (`web/default`, Bun). Read **`vendor/shadcn/SKILL.md`** for the complete upstream workflow, patterns, and CLI quick reference. Use **`vendor/shadcn/rules/*.md`** when validating concrete markup.

0 commit comments

Comments
 (0)