fix(dashboard): polish demo and provider management - #569
Conversation
|
Warning Review limit reached
Next review available in: 22 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe changes update dashboard layouts, incremental model rendering, token and provider-status displays, provider credential masking, and provider registry cleanup. Documentation and tests cover authentication, audit logging, masking behavior, rendering, and stale model removal. ChangesDashboard UI and documentation
Provider credential masking
Provider registry cleanup
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Confidence Score: 4/5The provider refresh reconciliation race needs to be fixed before merging. Same-name registration lets stale inventory from a replaced provider pass the new filter. Requests can route through the old provider instance and credentials until another refresh succeeds. The remaining dashboard and redaction changes match their documented behavior. internal/providers/registry_init.go and internal/providers/registry_provider_refresh.go
What T-Rex did
Reviews (1): Last reviewed commit: "perf(dashboard): render model inventory ..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/admin/dashboard/static/js/modules/virtual-models.test.cjs`:
- Around line 108-159: Add a test covering scheduleModelRenderBatch aborting
when navigation leaves the Models page: initialize a large model list, call
syncDisplayModels, change module.page away from 'models' before callbacks run,
then execute the queued animation-frame and timer callbacks and assert
modelRenderLimit remains at the initial batch size. Use the existing
createAliasesModule setup and verify no further batch progression occurs.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 93814881-be96-4bc6-af5a-a5b468f0772f
📒 Files selected for processing (7)
internal/admin/dashboard/static/css/dashboard.cssinternal/admin/dashboard/static/js/dashboard.jsinternal/admin/dashboard/static/js/modules/dashboard-display.test.cjsinternal/admin/dashboard/static/js/modules/dashboard-layout.test.cjsinternal/admin/dashboard/static/js/modules/virtual-models.jsinternal/admin/dashboard/static/js/modules/virtual-models.test.cjsinternal/admin/dashboard/templates/page-models.html
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/admin/dashboard/templates/layout.html`:
- Around line 87-89: Complete the demo-banner link contract: in
internal/admin/dashboard/templates/layout.html:87-89, add documentation and
GitHub anchors beside the website link while preserving safe external-link
attributes; in internal/admin/dashboard/dashboard_test.go:102-111, replace
negative assertions with table-driven positive checks for all required links; in
internal/admin/dashboard/static/js/modules/dashboard-layout.test.cjs:105-110,
assert that the documentation and GitHub links are present.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 29746ad7-4c8d-40b8-b448-bec39dc969bd
📒 Files selected for processing (3)
internal/admin/dashboard/dashboard_test.gointernal/admin/dashboard/static/js/modules/dashboard-layout.test.cjsinternal/admin/dashboard/templates/layout.html
| <nav class="demo-mode-banner-links" aria-label="GoModel website"> | ||
| <a href="https://gomodel.enterpilot.io/" target="_blank" rel="noopener noreferrer">gomodel.enterpilot.io</a> | ||
| </nav> |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Complete the demo-banner link contract.
The template omits two links required by the PR objective, and both tests currently enforce that omission.
internal/admin/dashboard/templates/layout.html#L87-L89: add documentation and GitHub anchors alongside the website link, preserving safe external-link attributes.internal/admin/dashboard/dashboard_test.go#L102-L111: replace the negative assertions with table-driven positive checks for all required links.internal/admin/dashboard/static/js/modules/dashboard-layout.test.cjs#L105-L110: assert that the documentation and GitHub links are present rather than absent.
📍 Affects 3 files
internal/admin/dashboard/templates/layout.html#L87-L89(this comment)internal/admin/dashboard/dashboard_test.go#L102-L111internal/admin/dashboard/static/js/modules/dashboard-layout.test.cjs#L105-L110
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@internal/admin/dashboard/templates/layout.html` around lines 87 - 89,
Complete the demo-banner link contract: in
internal/admin/dashboard/templates/layout.html:87-89, add documentation and
GitHub anchors beside the website link while preserving safe external-link
attributes; in internal/admin/dashboard/dashboard_test.go:102-111, replace
negative assertions with table-driven positive checks for all required links; in
internal/admin/dashboard/static/js/modules/dashboard-layout.test.cjs:105-110,
assert that the documentation and GitHub links are present.
Source: Coding guidelines
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
internal/providers/registry_unregister_test.go (1)
139-144: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winInclude
sourceProvidersto properly exercise the unregistration check.The
fetchedInventoryliteral is missing thesourceProvidersmap. Because reading from a nil map in Go returnsok = false,fetchedProviderStillRegisteredLockedwill return early and drop the provider simply because it is missing fromsourceProviders, rather than because itsregisteredflag is false inproviderRuntime.Adding
sourceProvidersensures the test exercises the actual unregistration state validation.💚 Proposed fix
registry.applyFetchedInventory(map[core.Provider]string{drop: "test"}, fetchedInventory{ models: map[string]*ModelInfo{"stale-model": staleModel}, modelsByProvider: map[string]map[string]*ModelInfo{"drop": {"stale-model": staleModel}}, runtimeUpdates: map[string]providerRuntimeState{"drop": {registered: true}}, + sourceProviders: map[string]core.Provider{"drop": drop}, totalModels: 1, }, 1)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@internal/providers/registry_unregister_test.go` around lines 139 - 144, Update the fetchedInventory literal in the registry unregistration test to include a sourceProviders entry for “drop”, so fetchedProviderStillRegisteredLocked reaches and validates the providerRuntime registered state instead of returning early for a missing map entry.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@internal/providers/registry_unregister_test.go`:
- Around line 139-144: Update the fetchedInventory literal in the registry
unregistration test to include a sourceProviders entry for “drop”, so
fetchedProviderStillRegisteredLocked reaches and validates the providerRuntime
registered state instead of returning early for a missing map entry.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: b0d1064e-d56e-473b-a1d1-b80acd995234
📒 Files selected for processing (4)
internal/admin/dashboard/static/js/modules/virtual-models.test.cjsinternal/providers/registry_init.gointernal/providers/registry_provider_refresh.gointernal/providers/registry_unregister_test.go
Summary
Behavior notes
Tests
go test ./cmd/... ./internal/... ./config/...node --test internal/admin/dashboard/static/js/modules/*.test.cjsSummary by CodeRabbit
Models page performance follow-up