Skip to content

✨ feat(connections): Open SQLite file… from the welcome pane (#117) - #150

Merged
Cemoche merged 4 commits into
mainfrom
issue-117-open-sqlite-file
Oct 21, 2026
Merged

Cemoche merged 4 commits into
mainfrom
issue-117-open-sqlite-file

Conversation

@Cemoche

@Cemoche Cemoche commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Closes #117

Summary

Open SQLite file… in the welcome pane, as the spec's welcome actions list it. It was left out in Task 8 because the app had no SQLite file picker.

  • Rust: file_pick gets a "sqlite" purpose. The dialog shows "SQLite databases" (sqlite, sqlite3, db, db3) as its default filter, then "All files". picker_spec now returns a list of filters. Tested.
  • Welcome pane: a third action, Open SQLite file…, with a tooltip and the shared focus ring. It opens the picker.
    • Cancel changes nothing.
    • A picker failure shows on the connections screen.
    • A chosen file opens a pre-filled new-connection form: SQLite, the file's path, and its name without the extension.
  • Palette: an "Open SQLite file…" action. When a form has unsaved edits, it asks before opening the picker.
  • Flow chosen: a pre-filled form, not a temporary connection. Workspaces, history and saved queries are tied to a saved connection id on both sides (the backend reads it back from app.db), so an unsaved temporary connection would be a large refactor.
    • The draft counts as unsaved edits, so leaving it asks "Discard changes?".
    • Nothing is written until Connect or Save. Connect saves, then opens the workspace, like any new connection.
    • A missing or non-SQLite file shows the usual connect error, and the form stays.
  • Capabilities: unchanged, still core:default (the dialog plugin was already used).
  • Docs: amendment [Refonte UI] Open SQLite file… from the welcome pane #117 in spec §2.4, plus a manual-check step.

Known limit: with Tauri's default GTK3 dialog, "All files" is *.*, so files without an extension aren't listed. They can still be opened by typing their path.

How it was tested

$ cargo test --lib                          # 255 passed, 1 ignored (single job)
$ cargo clippy --all-targets -- -D warnings # clean
$ pnpm exec vitest run --maxWorkers=1       # 1432 tests passed
$ pnpm exec tsc --noEmit                    # clean
$ bash scripts/check-no-secrets.sh          # clean

pnpm test:rust (with the test databases) was not run locally, because Docker is off on this machine. CI runs it. The only Rust change is in commands.rs.

Manual check list

  1. Start with no session. The welcome pane shows Create connection…, Import connections…, Open SQLite file…, each with its icon. Hover the last one to see its tooltip. Tab to it to see the two-tone focus ring.
  2. Click Open SQLite file…. The native picker opens with "SQLite databases" selected, showing only .sqlite, .sqlite3, .db and .db3 files. "All files" is in the filter list.
  3. Cancel. Nothing changes: no form and no error.
  4. Pick demo.sqlite (from pnpm demo:db, or any SQLite file).
    • A "New connection" form appears with Driver SQLite, Name = the file name without extension, and Database file = the path.
    • The list does not hold it yet.
  5. Press ← Back. You are asked "Discard changes to this connection?". Discard returns to the list, and nothing is saved.
  6. Repeat step 4, then press Connect. The connection is saved: it shows in the list once you come back. The workspace opens on the file.
  7. Pick a non-SQLite file, for example a text file renamed x.db, then Connect. The connect error shows above the form, and the form stays.
  8. From a workspace, open the palette with Ctrl+P and type > then "Open SQLite file…". The picker opens; after a pick you land on the pre-filled form on the connections screen.
  9. With a form holding edits, use the palette's Open SQLite file…. The discard question comes before the picker.
  10. GTK only: a file with no extension is hidden even under "All files" (*.*). Typing its path (Ctrl+L) still works.

Checklist

  • pnpm test green
  • pnpm lint green (tsc + clippy -D warnings)
  • pnpm test:rust green (CI)
  • No secret, token, real password or private key in the diff
  • User-visible strings in src/lib/strings.ts
  • Commits follow <emoji> <type>(<scope>): <description>

🤖 Generated with Claude Code

Cemoche and others added 4 commits October 21, 2026 12:40
file_pick("sqlite") filters SQLite databases (*.sqlite, *.sqlite3, *.db,
*.db3) first, then All files. picker_spec now returns a list of filters.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
sqliteFileDraft(path) is a new SQLite connection on the file, named after
it. ConnectionForm's draft prop starts a new connection from it, as unsaved
edits: nothing is stored before Save or Connect.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…lette

The picker (SQLite purpose) fills a new connection's form on the chosen
file, named after it; Connect saves and opens it like any new connection,
so nothing is written before the user's action. Cancelling the picker does
nothing; a picker failure shows on the connections screen; a file that does
not open shows the usual connect error over the form. The palette's
Open SQLite file… asks about a form's unsaved edits first.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Cemoche
Cemoche merged commit b576a0c into main Oct 21, 2026
6 checks passed
@Cemoche
Cemoche deleted the issue-117-open-sqlite-file branch October 21, 2026 10:58
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.

[Refonte UI] Open SQLite file… from the welcome pane

1 participant