Repository navigation
Choose the connection method with a radio group of choice cards - #2364
Merged
Merged
Conversation
kmcginnes
added this pull request to stack #2370
October 6, 2026 01:07
kmcginnes
force-pushed
the
connection-method-radio-group
branch
4 times, most recently
from
October 6, 2026 01:36
99c5d90 to
2526f82
Compare
kmcginnes
force-pushed
the
connection-method-radio-group
branch
3 times, most recently
from
October 6, 2026 02:13
8dabd91 to
f38387e
Compare
The way requests reach the database moves out of Advanced options into a Connection method field beside the Database URL. Two choice cards, Via proxy server and Directly via browser, list what each route supports, and the IAM settings sit in the proxy card because only the proxy can sign a request. The error messages tell the reader to set Connection method to Via proxy server. Adds a RadioGroup component based on the shadcn Radix radio group.
kmcginnes
force-pushed
the
connection-method-radio-group
branch
from
October 6, 2026 02:19
f38387e to
12fa5ae
Compare
kmcginnes
marked this pull request as ready for review
October 6, 2026 02:19
The browser card read "must allow CORS, and IAM, cancellation and logging are unavailable", which parses as "must allow CORS and IAM" even though a direct connection never uses IAM. Each card now names who sends the requests and what that costs, and the proxy card names server-side logging alongside the other capabilities it alone has.
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.
Description
The connection method used to be a checkbox at the bottom of Advanced options, so the most consequential choice in the form was also the hardest to find, and the IAM fields appeared and vanished with nothing on screen explaining why. Direct connections are supported again as of #2369, so the form now presents both methods as a visible choice.
RadioGroupis a new primitive insrc/components, wrapping the Radix radio group the way the other shadcn-derived components do.Validation
Before: the method was a checkbox labelled "Connect directly from the browser" at the bottom of Advanced options, and the recovery messages told the reader to uncheck it there.
After:
New tests cover the default method, arrow-key selection, selecting by clicking a card, the signing notice, hiding and restoring the IAM settings, saving each method, the URL validation on the browser method, and editing a stored connection of either kind.
Verified live: exercised in Safari against a local dev server. Clicking a card's title, description, padding or corners selects it, arrow keys move between the cards, and the IAM controls inside the proxy card stay usable without changing the selection. An empty region blocks save, a relative URL on the browser method shows its validation message, and editing a saved direct connection opens on "Directly via browser" with Advanced options collapsed. The dialog logged no console errors.
Merge Danger
Door: two-way
Impact: connection form layout
Stored and exported connections keep their shape, so reverting needs no migration.
Related Issues
Check List
pnpm checkspasses with no errors.pnpm testpasses with no failures.