Feature : Migrate telemetry UI from Create React App to Vite#793
Feature : Migrate telemetry UI from Create React App to Vite#793hemanthsavasere wants to merge 25 commits into
Conversation
|
Happy with this in theory -- can you provide:
|
elijahbenizzy
left a comment
There was a problem hiding this comment.
Tested this end-to-end against the worktree — built UI assets, installed burr[start] from the branch, mounted the Vite build into burr/tracking/server/build/, ran the FastAPI server on :7241, and confirmed the migrated UI loads, serves the /assets/index-*.{js,css} bundle from the new mount point, and hits /api/v0/projects correctly against demo data. Nice work — DX win on dev-server boot time alone (85ms vs CRA's ~30s).
One real bug + two non-blocking nits:
🔴 vite.config.ts:9 proxy port
proxy: {
'/api': 'http://localhost:8000' // <-- should be 7241
}The documented dev workflow in docs/contributing/iterating.rst:71 is:
It currently assumes that the tracking server is running on port 7241. The proxy is configured in
vite.config.ts.
After this merges, anyone following those docs (start tracking server on 7241, start Vite on 3000) will silently get 404s on every /api/* call. One-character fix. Could you flip to 7241?
🟡 telemetry/ui/scripts/model_costs.json mega-diff
The +9728/-1 is verified noise, not a data update — same 1594 model entries before and after, zero added or removed. It's purely prettier reformatting of a previously-minified file that got swept into the formatting commit. Harmless, but it'd be cleaner to split it into its own "format model_costs.json" commit so future git log -- model_costs.json is actually useful. Not blocking.
🟡 @types/node floor
Jumped ^16 → ^22 while the engine floor is now Node 18. Pinning to ^20 would more accurately reflect the supported floor. Cosmetic, optional.
Everything else I audited cleanly:
- TypeScript strictness preserved (
strict: trueintact; onlymoduleResolution: node→bundler, required for Vite). - No surviving
/static/URL references anywhere in source/docs/CLI/examples. - No
REACT_APP_*env var leftovers. __BURR_BASE_PATH__migration is correct (declared invite-env.d.ts, read sites inApp.tsx/OpenAPI.ts/appcontainer.tsx/StreamingChatbot.tsxall work, server-side injection inrun.py:413unchanged).vite.config.tssecurity-neutral (no wide bind, nofs.allow, no prod sourcemaps, nodefinesecrets).- Test coverage delta = 0 (the original CRA smoke test asserted
getByText(/learn react/i)against a string that has never existed in Burr's UI — it was effectively dead). .gitignorealready covers build artifacts; no.env/build/.DS_Storesmuggled in.- Other CI workflows (
release-validation.yml,build-site.yml) already on Node 20+, so the 16 → 18 bump here doesn't strand them.
Backend /static → /assets mount + the HTML rewrite logic in run.py:404 for sub-app mounting under a root_path is correctly updated and works in the smoke test.
Flip the proxy port and I'll come back and approve. Thanks for the careful migration write-up.
2127c62 to
f3e9563
Compare
…ormatting - Add postcss.config.js, vite.config.ts, vitest.config.ts to .eslintignore (these use Node.js globals but ESLint env only has browser:true) - Apply prettier formatting fixes from npm run format:fix - Ensures CI workflow (ui.yml) passes cleanly with Node.js 18.x
f3e9563 to
3655700
Compare
|
Thanks for the detailed review, really appricate your time. I have addressed all the comments. Can you please take a look at it again |
Migrate the telemetry UI from Create React App (CRA) to Vite + Vitest, update documentation, and fix post-migration issues, fixing #780
Changes
How I tested this
Notes
Checklist