TUI: file browser for path inputs and connection string builder dialogs #44

Open
opened 2026-10-03 07:46:25 +00:00 by warkanum · 2 comments
Owner

Goal

Make TUI input easy so users don't have to look up paths or connection string syntax.

1. File browser

  • Opens when pressing Enter on a file path input (load and save screens: pkg/ui/load_save_screens.go).
  • Load mode: select existing file (and directory where the format is directory-based, e.g. SQL Directory).
  • Save mode: pick directory + enter/confirm filename; confirm before overwrite.
  • Navigation: up/down, Enter to open dir, Backspace/.. for parent, Esc to cancel.
  • Filter by extension based on the selected format (e.g. .dbml, .json, .yaml, .sql, .db).
  • Toggle hidden files; start at current value of the input or the working directory.
  • Selected path is written back into the input field.

2. Connection string builder dialog

  • Opens from the connection string inputs (load and save screens), e.g. on Enter.
  • Per-format fields (PostgreSQL, MSSQL, SQLite): host, port, database, user, password (masked), SSL mode, file path (SQLite, can reuse the file browser).
  • Sensible defaults per type (e.g. 5432 / 1433).
  • Live preview of the resulting connection string; password masked in preview.
  • Parse an existing connection string back into the fields for editing.
  • Optional "Test connection" action.
  • Writes the built string back into the input field.

Acceptance

  • Both dialogs follow pkg/ui/ui_rules.md.
  • Keyboard-only usable; Esc cancels without changing the input.
  • Unit tests for connection string build/parse and file filter logic.
## Goal Make TUI input easy so users don't have to look up paths or connection string syntax. ## 1. File browser - Opens when pressing Enter on a file path input (load and save screens: `pkg/ui/load_save_screens.go`). - Load mode: select existing file (and directory where the format is directory-based, e.g. SQL Directory). - Save mode: pick directory + enter/confirm filename; confirm before overwrite. - Navigation: up/down, Enter to open dir, Backspace/`..` for parent, Esc to cancel. - Filter by extension based on the selected format (e.g. `.dbml`, `.json`, `.yaml`, `.sql`, `.db`). - Toggle hidden files; start at current value of the input or the working directory. - Selected path is written back into the input field. ## 2. Connection string builder dialog - Opens from the connection string inputs (load and save screens), e.g. on Enter. - Per-format fields (PostgreSQL, MSSQL, SQLite): host, port, database, user, password (masked), SSL mode, file path (SQLite, can reuse the file browser). - Sensible defaults per type (e.g. 5432 / 1433). - Live preview of the resulting connection string; password masked in preview. - Parse an existing connection string back into the fields for editing. - Optional "Test connection" action. - Writes the built string back into the input field. ## Acceptance - Both dialogs follow `pkg/ui/ui_rules.md`. - Keyboard-only usable; Esc cancels without changing the input. - Unit tests for connection string build/parse and file filter logic.
warkanum added the Kind/EnhancementKind/Enhancement labels 2026-10-03 07:46:25 +00:00
warkanum added the
Priority
Medium
3
label 2026-10-03 08:05:58 +00:00
Member

Dispatcher assignment (2026-10-03T11:25:12+02:00). Forge: Gitea; issue: wdevs/relspecgo#44 — TUI file browser and connection string builder dialogs. Classification: non-simple cross-layer UI implementation/design work; Ornith excluded. Selected worker: Claude Code CLI, model claude-sonnet-5-5 (live command/auth checks passed). Worker session/process: to be launched after this assignment comment is verified. Worktree: /home/hermes/work/issue-agents/wdevs/relspecgo/issue-44-tui-input-dialogs. Branch: issue-44-tui-input-dialogs (not pushed yet). Plan: read issue and project AGENTS.md, implement minimal keyboard-safe dialogs and tests, run focused/full feasible verification, commit, push, create PR, and post delivery evidence.

Dispatcher assignment (2026-10-03T11:25:12+02:00). Forge: Gitea; issue: wdevs/relspecgo#44 — TUI file browser and connection string builder dialogs. Classification: non-simple cross-layer UI implementation/design work; Ornith excluded. Selected worker: Claude Code CLI, model claude-sonnet-5-5 (live command/auth checks passed). Worker session/process: to be launched after this assignment comment is verified. Worktree: /home/hermes/work/issue-agents/wdevs/relspecgo/issue-44-tui-input-dialogs. Branch: issue-44-tui-input-dialogs (not pushed yet). Plan: read issue and project AGENTS.md, implement minimal keyboard-safe dialogs and tests, run focused/full feasible verification, commit, push, create PR, and post delivery evidence.
Member

PR: #50 (#50)
Branch: issue-44-tui-input-dialogs
Commit: 0235a28add
Verification: gofmt -l pkg/ui clean; go build ./... ok; go vet ./pkg/ui/ ok; go test -race ./pkg/ui/ ok (new unit tests for connection string build/parse/mask, file filtering, start-path resolution, dialog construction smoke tests).
Caveats: not exercised in a real terminal; PG/MSSQL test-connection needs a live server (only SQLite error paths unit-tested); builder is wired to load and import screens only (save has no connection string field); format dropdowns unchanged, so MSSQL/SQLite output is not yet consumable by those screens; PostgreSQL key=value DSNs not parsed; full go test ./... not run.

PR: https://git.warky.dev/wdevs/relspecgo/pulls/50 (#50) Branch: issue-44-tui-input-dialogs Commit: 0235a28addfdb1767e70f9f6518e883c3f4b8cdf Verification: gofmt -l pkg/ui clean; go build ./... ok; go vet ./pkg/ui/ ok; go test -race ./pkg/ui/ ok (new unit tests for connection string build/parse/mask, file filtering, start-path resolution, dialog construction smoke tests). Caveats: not exercised in a real terminal; PG/MSSQL test-connection needs a live server (only SQLite error paths unit-tested); builder is wired to load and import screens only (save has no connection string field); format dropdowns unchanged, so MSSQL/SQLite output is not yet consumable by those screens; PostgreSQL key=value DSNs not parsed; full go test ./... not run.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wdevs/relspecgo#44