-
Notifications
You must be signed in to change notification settings - Fork 6
feat(ui): add React + HeroUI admin dashboard for keys, users, and usage #227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
njbrake
wants to merge
9
commits into
main
Choose a base branch
from
feat/web-dashboard
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8afbf65
feat(ui): add React + HeroUI admin dashboard for keys, users, and usage
njbrake eb21a1c
fix(ui): set master key before first request and validate at sign-in
njbrake 1b006d0
feat(ui): link to the welcome page from the dashboard sign-in screen
njbrake 0f8bf62
feat(ui): simplify dashboard to an overview plus table-only pages
njbrake a7bcddc
feat(ui): add a Pricing page to view and edit per-model token prices
njbrake 775f6c3
feat: surface genai-prices default fallback and enable it on Railway
njbrake f3092f1
feat(ui): list full model catalog and backfill costs for newly-priced…
njbrake 6b8c347
fix(ui): address review findings and regenerate Postman collection
njbrake f8d895d
feat(ui): surface effective (default genai-prices) pricing on Models …
njbrake File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| name: Otari Dashboard | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main, develop ] | ||
| paths: | ||
| - 'web/**' | ||
| - 'src/gateway/static/dashboard/**' | ||
| - '.github/workflows/otari-dashboard.yml' | ||
| pull_request: | ||
| branches: [ main ] | ||
| paths: | ||
| - 'web/**' | ||
| - 'src/gateway/static/dashboard/**' | ||
| - '.github/workflows/otari-dashboard.yml' | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| dashboard: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| defaults: | ||
| run: | ||
| working-directory: web | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | ||
| with: | ||
| node-version: 22 | ||
| cache: npm | ||
| cache-dependency-path: web/package-lock.json | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Type-check | ||
| run: npm run typecheck | ||
|
|
||
| - name: Test | ||
| run: npm test | ||
|
|
||
| - name: Build | ||
| run: npm run build | ||
|
|
||
| - name: Verify committed bundle is up to date | ||
| run: | | ||
| if ! git diff --quiet -- ../src/gateway/static/dashboard; then | ||
| echo "::error::The committed dashboard bundle in src/gateway/static/dashboard is stale." | ||
| echo "Run 'npm --prefix web run build' and commit the result." | ||
| git --no-pager diff --stat -- ../src/gateway/static/dashboard | ||
| exit 1 | ||
| fi | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major
Consider hardening the checkout step to protect the workflow token.
Great work on getting this CI pipeline set up! I noticed a small but important security detail in the checkout step. By default,
actions/checkoutpersists theGITHUB_TOKENinto the local Git configuration. Since the following steps run your build scripts (which can process PR-controlled code), that token is unnecessarily accessible to untrusted input.Let's tighten that up with a best practice: disable credential persistence and explicitly set read-only permissions for the job. It's a quick tweak that makes the workflow significantly more secure.
Suggested hardening
jobs: dashboard: runs-on: ubuntu-latest + permissions: + contents: read defaults: run: working-directory: web steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + with: + persist-credentials: false📝 Committable suggestion
🧰 Tools
🪛 zizmor (1.26.1)
[warning] 26-26: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
🤖 Prompt for AI Agents