{{ message }}
Open the connection form when Settings > Connections has nothing to list - #9157
Merged
Conversation
An install with no connections opened that page onto a single "No connections yet" row, which never says what a connection is or how to add one. Open the "New connection" form instead when the first sync comes back empty. The check reads the synced backend response rather than the local snapshot, so a stale empty list cannot flash the form at someone who already has connections, and it waits for a loaded provider registry so the form never opens with an empty dropdown. It fires once per visit: the back arrow, saving, and deleting the last connection all leave the user where they navigated to.
Member
Author
The Add connection row stays live while the first sync runs, so a user can open the form and go back before it lands. Only the sync consumed the one-shot, so it then pulled them back in. Every navigation the user drives consumes it now.
Member
Author
|
@codex review |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Problem
On a fresh install, Settings > Connections opens onto a list with a single "No connections yet" row. Nothing on that screen explains what a connection is, which providers are supported, or that the small "Add connection" row at the top is the way in. The one state where the page has to teach the most is the state where it shows the least.
Change
When the first sync returns no connections, the page opens the "New connection" form instead of the empty list. The provider dropdown, the models panel, and the explanation of which Studio tools run locally are all right there.
Three things keep it from getting in the way:
Testing
studio/frontend/tests/connections-empty-opens-form.test.tscovers the three points above: the check readssyncedProvidersand the selectable registry, the latch is a ref that is never reset, andcloseFormstill returns to the list.tsc -bclean,eslintunchanged from baseline on the touched file, andvite buildsucceeds.