Skip to content

Fix Providers empty state blocking first provider setup - #2329

Closed
slider23 wants to merge 1 commit into
cheaper-inference:release/v3.8.0from
slider23:main
Closed

slider23 wants to merge 1 commit into
cheaper-inference:release/v3.8.0from
slider23:main

Conversation

@slider23

Copy link
Copy Markdown
Contributor

Today I tried installing OmniRoute for the first time. I used the Docker image diegosouzapw/omniroute:latest. I found a bug in the UI on the page - it’s impossible to add any providers.

img_20260517_130041

Code analysis revealed a deadlock on the page - if no providers have been created, the provider block isn’t displayed. I’ve made a fix and am proposing it for merge.

@slider23
slider23 requested a review from diegosouzapw as a code owner May 17, 2026 10:53

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the provider dashboard to improve the onboarding experience and filtering logic. It introduces utility functions to manage the 'configured only' filter and the visibility of the first-provider onboarding hint, which is now displayed as a conditional card rather than a full-page state. Corresponding unit tests were added to validate these utilities. Feedback was provided regarding the 'Show Configured Only' toggle, noting that tying its visual state to the effective filter value (which is forced to false when no providers exist) could lead to an inconsistent user experience when the first provider is connected.

Comment on lines +683 to +686
checked={effectiveShowConfiguredOnly}
onChange={setShowConfiguredOnly}
label={t("showConfiguredOnly")}
disabled={connections.length === 0}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The Toggle component's checked state is tied to effectiveShowConfiguredOnly, which is forced to false when connections.length === 0. While this correctly reflects that the filter is inactive, it creates a slightly jarring UX where the toggle might suddenly flip to 'checked' and the list of providers might shrink as soon as the user adds their first provider (if their stored preference was true).

Consider if it would be better to keep checked={showConfiguredOnly} so the toggle reflects the user's intent, even if the filter is not currently 'effective' due to the empty state logic. However, since the toggle is disabled when empty, the current implementation is also acceptable as it accurately represents the active filtering state.

@diegosouzapw
diegosouzapw changed the base branch from main to release/v3.8.0 May 17, 2026 22:36
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Thank you @slider23 for this fix! 🙏

Your change to resolve the providers page empty-state deadlock has been integrated into the release/v3.8.0 branch via cherry-pick.

What was applied:

  • Added and utilities in
  • Fixed the providers page to show a setup hint when no providers are configured yet, instead of showing an empty list and hiding the "Show All" button

Note: Because the PR was opened against main from your fork's default branch, GitHub won't automatically mark it as "Merged" — but your contribution is credited in our CHANGELOG and will ship in the upcoming v3.8.0 release. Thanks again for catching and fixing this UX blocker!

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Thank you so much for this contribution @slider23! The changes were highly valuable and have been manually integrated (cherry-picked) into our upcoming v3.8.0 release branch. Since there were merge conflicts that we resolved directly during the release staging, we are closing this PR. However, rest assured that your exact implementation is included and you have been officially credited in our CHANGELOG.md. Thanks again for your great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants