Astra: regression catalogue, runner robustness, idempotent Agent Studio contract, key-screen design (2182ef729b22)
152e0c1 verified |
Download docs/design/BEUI.md from EnergyVenom/patchwise-agent-studio: direct link, hf CLI and curl.
- Browser
- Download file 5.87 kB
-
https://huggingface.co/spaces/EnergyVenom/patchwise-agent-studio/resolve/main/docs/design/BEUI.md
- Command line
-
hf download hf://spaces/EnergyVenom/patchwise-agent-studio/docs/design/BEUI.md
-
curl -L -o BEUI.md https://huggingface.co/spaces/EnergyVenom/patchwise-agent-studio/resolve/main/docs/design/BEUI.md
5.87 kB
| > **Historical record.** This page describes the product as it was when it was written, under an earlier name, and is not kept up to date. For the current system (Astra) read [DESIGN_SYSTEM.md](../DESIGN_SYSTEM.md) for the UI, and [ARCHITECTURE.md](../ARCHITECTURE.md), [DEPLOYMENT.md](../DEPLOYMENT.md), [RUNBOOK.md](../RUNBOOK.md), [REMOTE_RUNNER.md](../REMOTE_RUNNER.md) and [SECURITY.md](../SECURITY.md). | |
| # beUI in Patchwise | |
| Branch `beui-ui-upgrade`. beUI (https://beui.dev) components are added one screen at a time on top of the existing | |
| Mantine UI. Sources read first: https://beui.dev/llms.txt, https://beui.dev/docs/ai-agents, https://beui.dev/docs/theme. | |
| ## Dependencies added (one at a time) | |
| | Package | Version | Why | | |
| |---|---|---| | |
| | react, react-dom (upgrade) | 18.3 to 19.2 | beUI components use React 19 APIs (ref as a prop). Mantine 7.17, React Query 5, React Router 6 and Testing Library accept 19. | | |
| | @types/react, @types/react-dom | 19.2 | matching types (`JSX.Element` became `ReactElement` in one file) | | |
| | tailwindcss, @tailwindcss/vite | 4.1.14 (dev) | beUI is styled with Tailwind 4 utility classes | | |
| | motion | 12.23 | beUI's animations | | |
| | clsx, tailwind-merge | 2.1, 3.3 | the `cn()` class helper beUI components import | | |
| | lucide-react | 0.548 | icons inside beUI components (the app keeps Tabler icons elsewhere) | | |
| | three (+ @types/three, dev) | 0.180 | the 3D hero on the sign-in page (`pages/login/ReleaseScene.tsx`); loaded on demand after the form | | |
| ## How it fits next to Mantine | |
| - `src/beui.css` loads Tailwind's theme and utilities **without its base reset** (Mantine styles the base elements). | |
| - Tailwind only scans `src/components/ui` and the screens converted so far (`@source` lines), so existing class | |
| names in the rest of the app never turn into Tailwind utilities. | |
| - Colours are the app's own tokens (`apple.css`): beUI's `primary` is the graphite action colour, `destructive` the | |
| app's red, borders the app's separators. The app's `--accent` is not redefined (shadcn's "accent" is a hover surface; | |
| it maps to `--fill`). Dark mode follows Mantine (`data-mantine-color-scheme`), not a `.dark` class. | |
| - beUI files live in `src/components/ui/motion/` and `src/lib/` (`ease.ts`, `presence-gate.tsx`, | |
| `hooks/use-hover-capable.ts`), as published. ESLint relaxes two style rules for that folder only. | |
| - Install: the `@beui/<name>` namespace did not resolve with shadcn 3.5.0; the direct registry URLs work: | |
| `npx shadcn@3.5.0 add https://beui.dev/r/<item>.json`. The CLI writes to `src/@components` and `src/@lib`; move the | |
| files to `src/components/ui` and `src/lib` and change `@/@lib/` imports to `@/lib/`. | |
| ## Screens converted | |
| | Screen | beUI parts | Notes | | |
| |---|---|---| | |
| | Sign in (`pages/LoginPage.tsx`), third design | `input`, `checkbox`, `button-stateful`, `alert`, plus a three.js hero | Always dark. Left: the Patchwise mark, the promise and a live 3D scene (a release core, three agents on orbits, a shell of test points that turn green as a test wave passes). Right: a glass card with the form. Reduced motion: one still frame. No WebGL: a gradient. Same labels, hooks and behaviour. | | |
| | Create account, forgot password, reset password | `input`, `button-stateful`, `alert` in the shared `AuthShell` frame | Same frame as sign-in (3D hero + glass card). Password strength as a meter with words. All four account pages load on demand and share one chunk. | | |
| | Home summary card, run Testing step | three.js `ScenarioGlobe` (`components/three`) | Every scenario as a point on a sphere that fills from the bottom by status (passed, failed, waiting, not run); live on a running test with a ring at the testing front. Real counts from the readiness API; the same counts in text beside it and for screen readers. Drawn only while visible; still with reduced motion. three.js is one shared chunk (sign-in scene and globe). | | |
| ## Bundle | |
| | Build | Main JS | Sign-in chunk | CSS | | |
| |---|---|---|---| | |
| | Before beUI (React 19) | 904 kB (274 kB gzip) | in main | 355 kB | | |
| | Sign-in on beUI, eager | 1,075 kB (331 kB gzip) | in main | 366 kB | | |
| | Sign-in on beUI, lazy | 902 kB (273 kB gzip) | 173 kB (56 kB gzip), only on /login | 366 kB (+11 kB) | | |
| | Sign-in redesigned (input, checkbox) | 902 kB (273 kB gzip) | 190 kB (62 kB gzip), only on /login | 374 kB (+19 kB) | | |
| | Third design with the 3D hero | 902 kB (273 kB gzip) | 190 kB + 3D scene 477 kB (121 kB gzip), both only on /login, the scene after the form | 377 kB | | |
| | All four account pages on the shared frame | 894 kB (271 kB gzip) | shared frame 186 kB (61 kB gzip) + pages 1-3 kB each + 3D scene 477 kB (121 kB gzip) | 377 kB | | |
| ## Accessibility | |
| - Reduced motion: both components read `prefers-reduced-motion` (Motion's `useReducedMotion`): the button and the | |
| alert only cross-fade, nothing moves. | |
| - The stateful button keeps one accessible name ("Sign in"; the animated letters are hidden from screen readers), | |
| sets `aria-busy` while signing in and announces state changes politely. Focus uses the app's global focus ring. | |
| - The error alert has `role="alert"`. | |
| - The app has no Tailwind reset, so converted screens clear browser defaults themselves (`m-0`, `list-none`, | |
| `border-0` on native buttons and inputs). beUI fields draw their own focus ring; `.beui-field` stops the app's global | |
| outline from doubling it. | |
| - The show/hide control is named "Show what you typed", so "Password" stays the only label of that name. | |
| ## License | |
| The beUI pages call the components "free, open-source"; no license name is shown on the pages read. Check the | |
| repository's LICENSE (https://github.com/starc007/ui-components) before shipping to a client. | |
| ## Not changed | |
| No backend code, API calls, state logic or routes (the sign-in route now loads its page on demand; same path). | |