feat: Simplified Install for DBLab 4.2 (Simple/Expert modes + autodetection)
Closes #713 (closed)
What this changes for the user
New install flow. Configuration tab opens on a Simple tab: paste source URL + password, click Detect, review proposed config, click Apply. Engine handles provider detection (RDS / Aurora / Heroku / Supabase / etc.), Postgres image+tag, query-tuning whitelist, shared_buffers from host memory, shared_preload_libraries from source.
Expert tab for already-configured instances. Same fields as before but with the four source-connection fields collapsed into one URL field (parsed on save, reconstructed on load). Adds physical-mode UI for WAL-G and pgBackRest (the two tool: values the engine supports outside customTool): structured fields (backupName, stanza, delta) + a key/value editor for the envs map where storage backend, bucket, prefix, credentials live.
What this changes for the engine
POST /admin/probe-sourcereturns aProposedConfig: provider, image, tag, pg major, databases,shared_buffers,shared_preload_libraries, query-tuning params. Pure detection logic lives inengine/internal/retrieval/probe/; the existingtools/db.CheckSourceis reused, not duplicated.- Projection writes (
/admin/config) no longer reject physical-mode payloads. Replaced the blanket logical-only gate withguardModeFields, which only rejects cross-mode fields (logical-mode payload settingphysicalTooletc., or physical-mode payload settinghost/password). This protects hand-edited configs from being wiped by stale UI state in either direction. testDBSourcestays logical-only. Physical-mode test-connection is out of scope: no source password to send, storage credentials live inenvsat restore time only.
Backwards compatibility
server.yml schema unchanged. URL is a UI affordance only. Hand-edited configs keep their separate host / port / username / dbname keys. Empty port is preserved across load -> URL -> save (omitPortOnSubmit), so configs that originally omitted port: stay that way.
Notable design choices
- No new Go deps. URL parsing wraps
pgconn.ParseConfig(transitive via pgx). Rejects URLs with embedded password to keep secrets out of logs and out of "edit before applying" flows. - Engine-side image resolution (pulled forward from 4.3). The UI catalog (
configOptions.ts) still drives the Simple-mode preview; the engine now also resolves a glibc-aware image from the live registries (with offline fallback) for thedblab local-installCLI (probe/registry.go,probe/imageselect.go,images_fallback.json). - Mode default seeded lazily. Configuration tab default (Simple vs. Expert) is picked once when
configDatafirst loads, not recomputed on every render. Otherwise an Apply-triggered refetch would flip the tab mid-session. - Physical envs uniqueness in Yup, not parallel state. Two rows with the same key surface an inline error on both rows;
formik.isValidgates submission. Whitespace-only keys are not duplicates. Yup.test()emits oneValidationErrorper duplicate row. tuningParamssent as object, not string.updateConfig.tsspreadsreq.tuningParamsintodatabaseConfigs.configs; sending it as a string spreads characters and writes{"0":"w", "1":"o", ...}instead. Both Simple and Expert flows now produce object-shapedtuningParams.
Out of scope (4.2)
Update: the
dblab local-installCLI and engine-side image resolution were pulled forward from 4.3 and ship in this MR (engine/cmd/cli/commands/localinstall/,probe/registry.go). Seedocs/plans/completed/20260619-cli-connstrings-glibc.md.
- RDS-refresh-tool detection.
- Cloud one-click integrations (Supabase, etc).
customTool/ pg_basebackup UI - stays YAML-only.- RDS IAM source UI - Simple mode is password-based, IAM sources stay Expert + YAML.
Tests
- engine:
make test+make test-ci-integrationgreen. New probe-package tests (provider detection, tuning whitelist, memory probing),guardModeFieldstable-driven,requestedRetrievalModetable-driven, physical projection round-trip andPhysicalEnvscreateKey table-driven. - ui: new coverage for SimpleMode probe+preview+Apply, PhysicalMode WAL-G/pgBackRest sub-forms, EnvsEditor including duplicate-key error, URL <-> fields parsing (including the empty-port omission rule), Configuration page gating + lazy mode-default + Header label.
- no Playwright/Cypress yet. Manual UI verification still TODO (this is why the MR is Draft): physical-mode editability + Header label, SimpleMode Apply against a real source, envs-editor duplicate inline error.



