Skip to content

Choose the connection method with a radio group of choice cards - #2364

Merged
kmcginnes merged 3 commits into
mainfrom
connection-method-radio-group
Oct 6, 2026
Merged

kmcginnes merged 3 commits into
mainfrom
connection-method-radio-group

Conversation

@kmcginnes

@kmcginnes kmcginnes commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

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.

 <CreateConnection>
   Name
   Database URL
   Query Language
+  <ConnectionMethodField>                  "Connection method"
+    <MethodCard "Via proxy server">        selected by default
+      <IamSettings>                        Use AWS IAM authentication
+                                             AWS Region, Service Type
+    <MethodCard "Directly via browser">
   <Collapsible "Advanced options">
     Fetch Timeout
     Neighbor Expansion Limit
-    "Connect directly from the browser"    checkbox
  • Each card carries one sentence on what that method supports and what it gives up. The whole card is a click target.
  • The IAM settings sit in the proxy card, because only the proxy server can sign a request. Under "Directly via browser" they are hidden, and their values stay in the form but are not saved.
  • Checking IAM states that the Graph Explorer server signs requests with its own AWS credentials, not yours.
  • RadioGroup is a new primitive in src/components, wrapping the Radix radio group the way the other shadcn-derived components do.
  • The error messages, the Database URL validation message, the docs, both decision records and the glossary follow the new wording.

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:

Via proxy server selected by default

AWS IAM authentication enabled inside the proxy card

Directly via browser selected, with the IAM settings hidden

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

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I have verified pnpm checks passes with no errors.
  • I have verified pnpm test passes with no failures.
  • I have covered new added functionality with unit tests if necessary.
  • I have updated documentation if necessary.

@kmcginnes kmcginnes changed the title Stop locking the query language when Neptune Analytics is chosen Choose the connection method with a radio group of choice cards Oct 6, 2026
@kmcginnes
kmcginnes changed the base branch from main to undeprecate-direct-connections October 6, 2026 01:07
@kmcginnes
kmcginnes added this pull request to stack #2370 October 6, 2026 01:07
@kmcginnes
kmcginnes force-pushed the connection-method-radio-group branch 4 times, most recently from 99c5d90 to 2526f82 Compare October 6, 2026 01:36
Base automatically changed from undeprecate-direct-connections to main October 6, 2026 01:36
@kmcginnes
kmcginnes force-pushed the connection-method-radio-group branch 3 times, most recently from 8dabd91 to f38387e Compare October 6, 2026 02:13
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
kmcginnes force-pushed the connection-method-radio-group branch from f38387e to 12fa5ae Compare October 6, 2026 02:19
@kmcginnes
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.

@kmcginnes kmcginnes left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Approved

@kmcginnes
kmcginnes merged commit a57996b into main Oct 6, 2026
3 checks passed
@kmcginnes
kmcginnes deleted the connection-method-radio-group branch October 6, 2026 20:57
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