feat(dashboard): link provider name to filtered models page#352
Conversation
|
Warning Review limit reached
Next review available in: 1 minute 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: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
WalkthroughChangesProvider-filtered model navigation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
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 |
There was a problem hiding this comment.
Pull request overview
Adds a dashboard UX shortcut so selecting a provider in the Providers page deep-links to the Models page with that provider pre-selected via a ?provider= query parameter, matching existing query-param driven flows.
Changes:
- Providers table provider names are now links to
/models?provider=<instance>. - Models page reads the
providerquery parameter on initial render to seed the provider filter. - Adds/updates dashboard unit tests to cover link generation and query-param initialization; rebuilds the bundled dashboard
index.htmlasset reference.
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| web/src/pages/ProvidersPage.tsx | Renders provider instances as router links pointing at the Models page with ?provider=. |
| web/src/pages/ProvidersPage.test.tsx | Wraps page in a router and asserts provider links include the expected href. |
| web/src/pages/ModelsPage.tsx | Initializes the provider filter from the provider query parameter. |
| web/src/pages/ModelsPage.test.tsx | Adds a test that verifies the provider filter is pre-populated from ?provider=. |
| src/gateway/static/dashboard/index.html | Updates the hashed JS bundle reference after rebuilding the dashboard. |
khaledosman
left a comment
There was a problem hiding this comment.
LGTM. encodeURIComponent on the instance, token-based hover styling, and the useState(searchParams.get(...)) mount-read all match existing patterns (?target= on AliasesPage, NavLink in AppShell). Tests cover both the link and the URL-driven filter. No changes requested.
Review created by Claude Code.
Clicking a provider's name on the Providers page now navigates to the Models page with ?provider=<instance>, pre-selecting that provider's filter so the list shows only their models. The ModelsPage reads the provider query parameter on mount to initialize the filter state. Fixes #349 Co-authored-by: Laguna S 2.1 <noreply@poolside.ai>
ae3beed to
81119d8
Compare
Seeding the Models page provider filter straight from the URL query parameter left two rough edges: an empty value (/models?provider=) and a stale or misspelled provider name both rendered the native select blank and filtered the table to zero rows, a confusing dead end for bookmarks or hand-edited URLs. Collapse an empty param to "all", and once the catalogue has loaded drop an unknown provider value back to "all" so the control stays usable and the models stay visible. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…vigates-to-filtered-models # Conflicts: # src/gateway/static/dashboard/index.html
Description
Clicking a provider's name on the Providers page now navigates to the Models page with
?provider=<instance>, pre-selecting that provider's filter so the list shows only their models. The ModelsPage reads theproviderquery parameter on mount to initialize the filter state, following the same?target=pattern already used for the "Make an alias" flow.PR Type
Relevant issues
Fixes #349
Checklist
web/src/pages/ProvidersPage.test.tsx,web/src/pages/ModelsPage.test.tsx).npm --prefix web run typecheck,npm --prefix web test,npm --prefix web run build).uv run python scripts/generate_openapi.py). -- N/A, no API changes.AI Usage
AI Model/Tool used: Laguna S 2.1 (pi.dev)
Any additional AI details you'd like to share:
🤖 Generated by Laguna S 2.1
Summary