Skip to content

Commit 2d59bd8

Browse files
authored
Merge pull request #11 from nova-rey/codex/migrate-to-eslint-flat-config-and-prettier
2 parents e79834f + 5bbdafd commit 2d59bd8

39 files changed

Lines changed: 1878 additions & 234 deletions

.eslintrc.cjs

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Build UI Bundle
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88

99
jobs:
1010
build:

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dist
2+
node_modules
3+
coverage
4+
*.log

.prettierrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

.prettierrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"printWidth": 100,
3+
"singleQuote": false,
4+
"trailingComma": "all",
5+
"semi": true,
6+
"arrowParens": "always"
7+
}

NOVA_AGENT_ENTRYPOINT.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
project: csc-webui
22
current_phase: 2
3-
current_checkpoint: 6
4-
checkpoint_title: Spec Builder MVP complete
3+
current_checkpoint: 7
4+
checkpoint_title: ESLint Flat Config + Prettier + Builder Smoke Test
55
allow_behavior_change: false
66
docs_truth_source:
77
- docs/WEBUI_SNAPSHOT.yaml

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,20 @@
33
A modern, browser-based UI for **CrapsSim-Control (CSC)**.
44

55
## What it is
6+
67
- **Spec authoring & visualization** — build craps strategy specs via a visual editor.
78
- **Run orchestration** — start and monitor runs (seeded, explain mode).
89
- **Replay viewer** — inspect roll-by-roll events.
910
- **History & artifacts** — browse prior runs, download CSVs, view summaries.
1011

1112
## Compatibility
13+
1214
- UI **v0.3.x** targets **CSC API v1** (`/api/v1/...`).
1315
- Configure the API root with `VITE_CSC_BASE_URL` (e.g., `http://localhost:8080/api/v1`).
1416

1517
## Quickstart
16-
1. Copy `.env.example``.env.local`.
18+
19+
1. Copy `.env.example``.env.local`.
1720
2. Set:
1821
- `VITE_CSC_BASE_URL=http://localhost:8080/api/v1`
1922
- `VITE_CSC_TOKEN=` (optional)
@@ -22,6 +25,8 @@ A modern, browser-based UI for **CrapsSim-Control (CSC)**.
2225
```bash
2326
npm ci
2427
npm run dev
28+
```
29+
2530
```
2631
2732
4. Open:
@@ -52,3 +57,4 @@ A modern, browser-based UI for **CrapsSim-Control (CSC)**.
5257
5358
See `docs/PHASE_CHECKLIST.md` for checkpoint tracking and `docs/WEBUI_SNAPSHOT.yaml` for current state.
5459
60+
```

docs/ARCHITECTURE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,40 @@
11
# Architecture — csc-webui
22

33
## Overview
4+
45
- **Frontend only**: React + TypeScript (Vite).
56
- **Design system**: minimal, accessible (Tailwind in P0·C1).
67
- **Data layer**: small fetch/axios wrapper targeting `/api/v1/*`.
78
- **Packaging**: `dist/``ui_static.tar.gz` for optional CSC embedding.
89

910
## Modules (planned)
11+
1012
- `api/` — typed client for `spec/*`, `runs*`, `summarize`, `replay`.
1113
- `routes/``/builder`, `/runs`, `/replay`, `/about`.
1214
- `builder/` — MVP: hierarchical form; later: graph editor.
1315
- `replay/` — timeline renderer; playback throttle.
1416
- `components/` — small, composable UI primitives.
1517

1618
## Config
19+
1720
- `VITE_CSC_BASE_URL` — API root (e.g., `http://localhost:8080/api/v1`).
1821
- `VITE_CSC_TOKEN` — optional bearer for endpoints requiring auth.
1922

2023
## Guardrails
24+
2125
- No direct coupling to CSC internals; only the HTTP contract.
2226
- All calls go through the API client; no stray `fetch()` in components.
2327
- Semantic commits; version tags parallel to CSC.
2428

2529
## API Client (Phase 1)
30+
2631
- All HTTP lives in `src/api/` with a small axios wrapper.
2732
- Env: `VITE_CSC_BASE_URL`, `VITE_CSC_TOKEN`, optional `VITE_CSC_USE_MOCK=true`.
2833
- Response shape is normalized to `{ ok, status, data }` or `{ ok:false, status, message }`.
2934
- Mock mode serves JSON from `/mock-data/*` when the API is unavailable.
35+
3036
## Spec Builder (Phase 2)
37+
3138
- Authoring types in `src/spec/`.
3239
- Conversion `authoring → draft` via `src/spec/convert.ts`.
3340
- `/builder` provides navigator, editor forms, and an output panel with Normalize.

docs/CSC_BIBLE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# CSC Bible
2+
3+
### Checkpoint 7 — ESLint Flat Config + Prettier + Builder Smoke Test
4+
5+
Converted ESLint to the modern flat config (`eslint.config.js`), integrated Prettier with repo-wide scripts, and added a Vitest smoke test that mounts `Builder.tsx` under jsdom. This removes ESLint deprecation warnings and gives CI a minimal but real test.

docs/DEV_WORKFLOW.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
11
# Dev Workflow — csc-webui
22

33
## Rhythm
4-
1) **Brief → No-flavor agent prompt → Agent run → Validation → Doc sync**
5-
2) One checkpoint = one reversible commit (PR).
4+
5+
1. **Brief → No-flavor agent prompt → Agent run → Validation → Doc sync**
6+
2. One checkpoint = one reversible commit (PR).
67

78
## Semantics
9+
810
- Commits use: `feat:`, `fix:`, `docs:`, `chore:`, `refactor:`, `build:`.
911
- Versioning follows SemVer; UI starts at **v0.1.0**.
1012

1113
## Phase 0 Plan
14+
1215
- **P0·C0** (Docs-only): establish scope and guardrails.
1316
- **P0·C1**: Vite+React+TS scaffold; Tailwind setup; basic scripts.
1417
- **P0·C2**: React Router routes; env wiring; API client stub.
1518
- **P0·C3**: `scripts/build_ui_bundle.sh` + GitHub Action to publish `ui_static.tar.gz`.
1619

1720
## Lint/Format (coming in P0·C1)
21+
1822
- ESLint + Prettier with sensible defaults.
1923
- EditorConfig optional, but enforce via ESLint where possible.
2024

2125
## CI (seed in P0·C3)
26+
2227
- Node LTS matrix build (install → build → upload artifact).

0 commit comments

Comments
 (0)