Open the connection form when Settings > Connections has nothing to list by shimmyshimmer · Pull Request #9157 · unslothai/unsloth · GitHub
Skip to content

Open the connection form when Settings > Connections has nothing to list - #9157

Merged
shimmyshimmer merged 2 commits into
mainfrom
studio/connections-empty-opens-form
Aug 18, 2026
Merged

Open the connection form when Settings > Connections has nothing to list#9157
shimmyshimmer merged 2 commits into
mainfrom
studio/connections-empty-opens-form

Conversation

@shimmyshimmer

Copy link
Copy Markdown
Member

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:

  • The decision reads the synced backend response, not the local snapshot, so a stale empty list cannot flash the form at someone who already has connections.
  • It waits for a loaded provider registry, so the form never opens with an empty dropdown when only that request failed. Hidden registry entries are excluded, since those are never offered in the dropdown.
  • It fires once per visit. The back arrow, saving a connection, and deleting the last connection all leave the user where they navigated to, and the empty list is still there for anyone who backs out.

Testing

  • studio/frontend/tests/connections-empty-opens-form.test.ts covers the three points above: the check reads syncedProviders and the selectable registry, the latch is a ref that is never reset, and closeForm still returns to the list.
  • Full frontend suite passes, 3681 tests.
  • tsc -b clean, eslint unchanged from baseline on the touched file, and vite build succeeds.

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.
@shimmyshimmer

Copy link
Copy Markdown
Member Author

chatgpt-codex-connector[bot]

This comment was marked as resolved.

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.
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

@shimmyshimmer
shimmyshimmer merged commit c675be1 into main Aug 18, 2026
34 of 36 checks passed
@shimmyshimmer
shimmyshimmer deleted the studio/connections-empty-opens-form branch August 18, 2026 09:02
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.

1 participant