mirror of
https://github.com/AmanTahiliani/box-box.git
synced 2026-08-07 19:56:18 -04:00
1.8 KiB
1.8 KiB
Prompt For Cursor: Phase 12 Data Library UI
You are working in the box-box repository on Phase 12. Build a practical Web
UI surface for inspecting local data coverage and ingestion status.
Read First
Open these files first:
documentations/refactor/20-phase-12-data-library-ui.mdfrontend/src/components/LocalDataNavigator.tsxfrontend/src/pages/RaceHubPage.tsxfrontend/src/api.tsfrontend/src/types.tsfrontend/src/main.tsxfrontend/src/styles/app.csstests/race-hub.spec.ts
Only open older docs if you are blocked.
Goal
Let a user inspect what is in the local database and understand what is missing without needing to open every Race Hub session manually.
APIs Available
GET /api/v1/seasonsGET /api/v1/meetings?year=<year>&source=localGET /api/v1/weekend?meeting_key=<key>GET /api/v1/race-hub?session_key=<key>
Do not fetch OpenF1 from React.
Work To Do
- Add a Data Library route or reachable section in the React app.
- Show local years/meetings/sessions and dataset coverage.
- Make partial vs complete sessions visually clear.
- Include copyable/reference CLI commands, such as:
box-box --ingest-year 2025box-box --ingest-meeting <meeting_key>box-box --ingest-session <session_key>
- Preserve direct Race Hub navigation.
- Add focused frontend tests and update e2e if stable.
Design Notes
- Keep it operational and table-like.
- Avoid decorative cards and generic dashboard clutter.
- Use the existing dataset/status visual language where possible.
- Mobile should remain usable.
Verification
Run:
cd frontend && npm test -- --run
cd frontend && npm run build
npm run test:e2e
Report Back
Summarize:
- files changed;
- Data Library behavior added;
- tests run and results;
- follow-up API or design gaps.