Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f209763
feat(ui): add Vite configuration
hemanthsavasere May 29, 2026
9cffc83
feat(ui): add Vitest configuration
hemanthsavasere May 29, 2026
b6ff070
feat(ui): add tsconfig.node.json for Vite config
hemanthsavasere May 29, 2026
73e89e0
feat(ui): update tsconfig.json for Vite compatibility
hemanthsavasere May 29, 2026
adb6657
feat(ui): add root index.html for Vite
hemanthsavasere May 29, 2026
31712d6
feat(ui): replace react-app-env.d.ts with vite-env.d.ts
hemanthsavasere May 29, 2026
6c78f30
feat(ui): replace Jest setupTests.ts with Vitest setup
hemanthsavasere May 29, 2026
abc89bb
fix(ui): replace broken CRA smoke test with render-without-crashing test
hemanthsavasere May 29, 2026
b270d18
feat(ui): remove CRA reportWebVitals and its usage
hemanthsavasere May 29, 2026
7cee6e9
feat(ui): remove CRA public/index.html template (replaced by root ind…
hemanthsavasere May 29, 2026
78b86a8
feat(ui): swap CRA deps for Vite/Vitest, update scripts
hemanthsavasere May 29, 2026
a8650dd
feat(ui): regenerate package-lock.json with Vite deps
hemanthsavasere May 29, 2026
11d8a17
feat(server): update asset mount from /static to /assets for Vite
hemanthsavasere May 30, 2026
76dce91
ci: update Node.js version from 16.x to 18.x for Vite
hemanthsavasere May 30, 2026
da9c4a9
docs(ui): replace CRA README with Vite content
hemanthsavasere May 30, 2026
54c4891
docs: update proxy configuration reference from package.json to vite.…
hemanthsavasere May 30, 2026
c385e3c
docs: fix UI directory path from burr/ui to telemetry/ui
hemanthsavasere May 30, 2026
bf41de5
fix(ui): correct .eslintrc.js typo in .prettierignore
hemanthsavasere May 30, 2026
5a758a9
fix(ui): add postcss.config.js and autoprefixer for Tailwind CSS v3 w…
hemanthsavasere May 30, 2026
1832a48
fix(ui): add build config files to .eslintignore and apply prettier f…
hemanthsavasere Jun 2, 2026
6d08f66
chore: format model_costs.json with prettier
hemanthsavasere Jun 2, 2026
46031d9
changes to resolve npm warnings
hemanthsavasere May 30, 2026
3655700
Changes in the tracking server to be running on port 7241
hemanthsavasere Jun 2, 2026
4174802
ci: bump Node.js from 18.x to 22.x in ui.yml
hemanthsavasere Jun 2, 2026
3d72971
chore: pin @types/node to ^20 to match supported Node floor
hemanthsavasere Jun 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
working-directory: telemetry/ui
strategy:
matrix:
node-version: [16.x]
node-version: [22.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Not part of the CLI (yet), but running just the UI is simple:

.. code-block:: bash

$ cd burr/ui
$ cd telemetry/ui
$ npm run start

Package data
Expand Down
18 changes: 9 additions & 9 deletions burr/tracking/server/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,15 +363,15 @@ async def version() -> dict:

if serve_static:
base_asset_directory = str(files("burr").joinpath("tracking/server/build"))
static_directory = os.path.join(base_asset_directory, "static")
assets_directory = os.path.join(base_asset_directory, "assets")

ui_app.mount(
"/static",
StaticFiles(directory=static_directory),
"/static",
"/assets",
StaticFiles(directory=assets_directory),
"/assets",
)
# public assets in create react app don't get put under build/static,
# we need to route them over
# public assets (favicon, manifest, logo, etc.) are in the build root,
# routed under /public for the UI to reference
ui_app.mount("/public", StaticFiles(directory=base_asset_directory, html=True), "/public")

# Read index.html once at startup
Expand All @@ -392,8 +392,8 @@ async def manifest_json():
async def react_app(req: Request, rest_of_path: str):
"""Serves the React app, rewriting asset paths to respect the mount prefix.

When mounted as a sub-app (e.g. under /burr), the CRA build's hardcoded
absolute paths (/static/js/..., /api/v0/...) need to be prefixed with the
When mounted as a sub-app (e.g. under /burr), the build's hardcoded
absolute paths (/assets/..., /api/v0/...) need to be prefixed with the
mount path so the browser fetches them from the correct location.

This rewrites both the HTML (href/src attributes) and injects a script that
Expand All @@ -404,7 +404,7 @@ async def react_app(req: Request, rest_of_path: str):

root_path = req.scope.get("root_path", "")
if root_path:
# Rewrite CRA's absolute paths to include the mount prefix
# Rewrite absolute paths to include the mount prefix
html = _index_html_template.replace('href="/', f'href="{root_path}/')
html = html.replace('src="/', f'src="{root_path}/')
# Inject a script before </head> that patches the OpenAPI BASE config
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Not part of the CLI (yet), but running just the UI is simple:

.. code-block:: bash

$ cd burr/ui
$ cd telemetry/ui
$ npm run start

Package data
Expand Down
4 changes: 2 additions & 2 deletions docs/contributing/iterating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ Then, you can run the following commands:
$ npm run start

This will start the UI on port 3000. You can then navigate to ``http://localhost:3000`` to see the UI.
It currently assumes that the tracking server is running on port 7241. The proxy is set up in the
``package.json`` file.
It currently assumes that the tracking server is running on port 7241. The proxy is configured in
``vite.config.ts``.

Note that if you want to just develop off the server you'll first have to build the UI and symlink the
``tracking/server/build`` directory to the ``telemetry/ui/build`` directory. We have this structure to
Expand Down
3 changes: 3 additions & 0 deletions telemetry/ui/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@

build/*
tailwind.config.js
postcss.config.js
vite.config.ts
vitest.config.ts
.eslintrc.js
src/api # generated code
2 changes: 1 addition & 1 deletion telemetry/ui/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@

build/*
tailwind.config.js
.eslitrc.js
.eslintrc.js
37 changes: 12 additions & 25 deletions telemetry/ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
Expand All @@ -17,49 +17,36 @@
under the License.
-->

# Getting Started with Create React App
# Burr Tracking UI

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
Burr's telemetry tracking UI, built with React and Vite.

## Available Scripts

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.\
Runs the app in development mode with hot module replacement.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.\
You will also see any lint errors in the console.

### `npm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
Runs the test suite with Vitest in watch mode.

### `npm run build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `npm run eject`

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
### `npm run preview`

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
Previews the production build locally using Vite's preview server.

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
### `npm run lint`

## Learn More
Runs ESLint on the project.

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
### `npm run lint:fix`

To learn React, check out the [React documentation](https://reactjs.org/).
Runs ESLint with auto-fix on the project.
36 changes: 36 additions & 0 deletions telemetry/ui/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

<!doctype html>
<html lang="en" class="h-full bg-white">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Burr tracking UI" />
<link rel="manifest" href="/manifest.json" />
<title>Burr</title>
</head>
<body class="h-full">
<noscript>You need to enable JavaScript to run this app.</noscript>
<script type="module" src="/src/index.tsx"></script>
<div id="root"></div>
</body>
</html>
Loading
Loading