Download web/README.md from EnergyVenom/patchwise-agent-studio: direct link, hf CLI and curl.
- Browser
- Download file 7.19 kB
-
https://huggingface.co/spaces/EnergyVenom/patchwise-agent-studio/resolve/main/web/README.md
- Command line
-
hf download hf://spaces/EnergyVenom/patchwise-agent-studio/web/README.md
-
curl -L -o README.md https://huggingface.co/spaces/EnergyVenom/patchwise-agent-studio/resolve/main/web/README.md
Astra web app (frontend)
The browser app of Astra: React 18, TypeScript, Vite, Mantine 7 and Tailwind 4. The backend (coworker/, Python) serves
it at / and its API at /api. You need no Oracle pod and no secrets to work on the UI: the backend runs against the
practice pod (mock-app/) on your machine.
Run it
# once
npm --prefix web ci
npm --prefix mock-app ci
python -m venv architecture/.venv && architecture/.venv/Scripts/pip install -r coworker/requirements.txt
# every time (three terminals)
node mock-app/server.js # the practice pod, :3100
architecture/.venv/Scripts/python -m coworker api # the API, :8800
npm --prefix web run dev # this app, http://127.0.0.1:5173 (proxies /api to :8800)
Create a user once: architecture/.venv/Scripts/python -m coworker create-user --username admin --role admin. On Windows
fpt.cmd setup and fpt.cmd up do the same. Point the dev server at another API with FPT_API_TARGET.
Where things are
web/
βββ index.html page shell: title, favicons
βββ public/ static files: astra-logo.png (the CES logo), favicons
βββ e2e/ Playwright end-to-end, accessibility and visual tests
βββ scripts/ gen-api.mjs (typed API client), lighthouse.mjs
βββ src/
βββ main.tsx entry: loads the global styles (in order), Mantine, React Query, the router
βββ App.tsx the route table: which URL shows which page
βββ theme.ts Mantine theme: the brand colour ramp (CES blue), sizes, component defaults
βββ styles/ global CSS, numbered in load order (see "Styling")
βββ pages/ one folder per area of the app (see below)
βββ components/ shared building blocks
β βββ shell/ the frame around every page: top bar, sidebar, icon rail, side panel
β βββ ui/ small animated controls (motion buttons, inputs, checkbox, alert)
β βββ three/ 3D scenes (three.js)
β βββ wensity/ Wensity UI components on the app's tokens
β βββ icons.tsx every icon the app uses (import from '@/components/icons')
βββ api/ the API client and React Query hooks; schema.d.ts and openapi.json are GENERATED
βββ auth/ sign-in state (AuthContext)
βββ account/ account page parts (access tokens)
βββ chat/ the Ask assistant (chat cards, speakers)
βββ notify/ notifications: bell, Telegram link, settings
βββ domain/ the app's own knowledge in plain TypeScript: agents, coworkers, glossary, pod areas,
β run names, what is waiting for a person, desktop notifications
βββ hooks/, lib/ small shared hooks and helpers
βββ test/ test setup and helpers (render with providers, fake API responses)
Pages
| Folder | Screens |
|---|---|
pages/auth/ |
sign in, register, password reset; AuthShell is their shared frame, login/ the brand mark and 3D scene |
pages/home/ |
the home dashboard (HomeBento) and patch readiness |
pages/runs/ |
the list of test runs, the new-run wizard, scheduled runs |
pages/run/ |
everything inside one test run: RunPage β RunWorkspace (tabs) β RunStages (the four phases), scenarios (ScenarioSplit, ScenarioReview), failures (FailureReview, FailedScreen), the live browser (LiveView), report and sign-off (RunReport, SignOffReport), the agent team board |
pages/library/ |
the scenario library and importing test cases |
pages/setup/ |
test environments (PodsPage), Oracle AI Agent Studio, AI monitoring, integrations, settings, admin |
pages/insights/ |
defects and queues, reports, the assistant, the agent team |
pages/account/ |
your account |
pages/dev/ |
fixtures for local development only |
pages/__tests__/ |
tests that cover several pages at once |
A page's own CSS sits next to it (pages/run/cockpit.css is imported by the run page). Tests sit next to the code they
test (TeamBoard.test.tsx beside TeamBoard.tsx).
Styling
Colours, sizes and fonts come from tokens:
styles/00-tokens.css(CSS variables for light and dark) andtheme.ts(Mantine). Change a colour there and it changes everywhere. The brand accent is the CES blue (--accent,--ember,--accent-gradfor the gradient); status colours (green passed, red failed, amber waiting) mean a state and are never used as decoration.Global CSS loads in the order of its number (
main.tsx); a later file wins over an earlier one:File What it does 00-tokens.cssdesign tokens: light and dark 01-base.cssbase element styles 10-14 apple*.cssthe first design layer: components, screens, the run page, other pages 20-surfaces.css,21-type.cssshared surfaces (cards, stat cards, pills, tables) and type 30-tailwind.cssTailwind 4 theme and utilities on the tokens; its @sourcelines list the files that use Tailwind classes40-layout.csslayout across screen sizes 50-run-polish.cssthe reviewed design of the test run page 90-theme.cssthe current look (Astra, CES blue): loaded last Prefer Mantine components and the tokens. Use Tailwind classes only in the files listed under
@sourcein30-tailwind.css; add a file there before using Tailwind in it.Older names you will meet: class prefixes
pw-,fpt-,trio-and the colour namesemberandtriocome from earlier designs (the product was called Patchwise). They still work; new code can use plain names.
Conventions
- Imports:
@/meanssrc/(import { IconX } from '@/components/icons'). - API types: never edit
src/api/schema.d.tsoropenapi.json. After a backend change runnpm --prefix web run gen:api. - Accessibility: every control has a label, focus is visible, colour is never the only signal.
npm --prefix web run test:a11y. - Light and dark: check both (the moon or sun button in the top bar).
- Screens never show secrets: the live browser view masks sign-in pages; do not add passwords, tokens or keys to the UI.
Checks before a pull request
| What | Command |
|---|---|
| Type check, lint, build | npm --prefix web run build and npm --prefix web run lint |
| Unit tests (Vitest) | npm --prefix web test |
| End-to-end (Playwright) | npm --prefix web run e2e |
| Visual snapshots | npm --prefix web run test:visual (update with test:visual:update when a change is intended) |
See also docs/DESIGN_SYSTEM.md (design rules), docs/FRONTEND_AUDIT.md and the root README.md (the whole product).