Skip to content

fix(ui): pre-fill bundled-demo MinIO defaults on storage-type change#37

Merged
gordonmurray merged 1 commit into
mainfrom
fix/storage-type-prefill
Apr 15, 2026
Merged

fix(ui): pre-fill bundled-demo MinIO defaults on storage-type change#37
gordonmurray merged 1 commit into
mainfrom
fix/storage-type-prefill

Conversation

@gordonmurray
Copy link
Copy Markdown
Owner

@gordonmurray gordonmurray commented Apr 15, 2026

Closes #35.

Before

Picking MinIO from the storage-type dropdown only updated the endpoint placeholder, not the field value. A first-time user who didn't notice the placeholder/value distinction left endpoint blank, the backend defaulted to `s3.amazonaws.com`, and AWS rejected the demo creds with 403. The "click around the bundled demo" path was a dead end.

After

When MinIO is selected, any empty field in {endpoint, accessKey, secretKey, tablePath} is filled with the bundled-demo defaults that mirror `GET /api/demo/connection`:

Field Default
endpoint `http://localhost:9000\`
accessKey `cloudfloe`
secretKey `cloudfloe123`
tablePath `s3://movies/warehouse/demo/movies`

The two-line setIfEmpty helper guarantees we never overwrite a value the user has typed — switching to MinIO out of curiosity after typing AWS S3 creds keeps the typed creds intact.

Also fixes a pre-existing copy bug spotted along the way: the AWS S3 endpoint placeholder was `s3://bucket/path/to/table`, which is a table path, not an endpoint. Now: `s3.amazonaws.com (leave blank for AWS default)`.

Verified end-to-end (headless Chrome via DevTools Protocol)

Two-click demo path — fresh page → pick MinIO → click Test Connection (no typing):

Connection successful. tableInfo panel: Format iceberg-v2 | Rows 37,537 | Files 1 | Last snapshot 7m ago. Suggested query auto-loaded into editor.

No-clobber — fresh page → type custom S3 endpoint/path/keys → pick MinIO from dropdown:

→ All four typed values preserved exactly as entered. The pre-fill no-ops on every field because none was empty.

Picking MinIO from the dropdown only updated the endpoint placeholder,
not the value. First-time users left the field blank, the backend
defaulted to s3.amazonaws.com, and AWS rejected the demo creds with
403 — turning the click-through demo into a dead-end.

Now: when MinIO is selected, fill any empty endpoint / accessKey /
secretKey / tablePath with the bundled-demo defaults that mirror
GET /api/demo/connection. The setIfEmpty helper guarantees we never
overwrite a value the user has typed.

Also fixes a pre-existing copy bug: the AWS S3 endpoint placeholder
showed 's3://bucket/path/to/table' (which is a *table* path, not an
endpoint).

Closes #35
@gordonmurray gordonmurray merged commit 70f13ac into main Apr 15, 2026
4 checks passed
@gordonmurray gordonmurray deleted the fix/storage-type-prefill branch April 15, 2026 20:01
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.

ux: storage type dropdown sets endpoint placeholder but not value, blocking demo

1 participant