Skip to content

feat(windows): save queries in folders, pin history runs, import CSV into a table, duplicate and export connections - #4288

Merged
datlechin merged 14 commits into
mainfrom
feat/windows-ffi-storage-import
Nov 15, 2026
Merged

datlechin merged 14 commits into
mainfrom
feat/windows-ffi-storage-import

Conversation

@datlechin

@datlechin datlechin commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Summary

  • C-06: the FFI gives SavedQueryStore (queries, folders, keywords, order, edit by id, delete_for_connection) and FavouriteStore (tables, databases with an environment) over the history's database; QueryHistoryStore gains set_pinned and export.
  • C-03: DatabaseSession::open_csv_import gives a CsvImport that previews a file, suggests a mapping, plans it (a field a column cannot read comes back with its line) and runs the plan it named once, under the row save's Safe Mode gate, reporting the failed lines. Rows are padded one at a time (read_csv_records, new), so one wide record cannot multiply the file's memory.
  • C-22: ConnectionLibrary::duplicate copies a connection with every secret right after the original; export_file writes the connections file without secrets.
  • W-36: Query > Save query... (also on the editor's menu and a history run's), and a Saved queries pane with folders (View > Show saved queries): Insert in editor, Open in new tab, Copy, Edit, Move to, Delete; New subfolder, Rename, Delete folder.
  • W-35: Pin and Unpin on a history run, with a pin mark.
  • W-46: Import CSV... on a table: delimiter, header, NULL text, a field per column with samples as the import writes them, Safe Mode confirmation, the result in the workspace bar, the open table tab read again.
  • W-01: Duplicate on a connection, named "(Copy)", "(Copy 2)", opening the form on the copy.
  • W-02: Export on the Connections page and File > Export connections...
  • Deleting a connection also deletes its saved queries, folders and favourites, as Linux does.
  • Bindings regenerated. ADRs: core 0030 (0017 amended), Windows 0011; windows/AGENTS.md updated.
  • Not here: DraftStore (Windows keeps tab text in session.json), PastedRows (W-28 waits on C-10), keyword expansion (needs completion, W-31), favourite tables and databases in the UI (no W item), history retention (feat(windows): production cue, database switchers, find and replace, sql files, redis key tab, cassandra paging and display settings #4285). The Linux import still pads every row through read_csv; moving it to read_csv_records is a Linux change.

Test plan

  • cargo test -p tablepro-ffi: tests/saved_queries.rs, tests/csv_import.rs, tests/library_copies.rs (fail on main, where the API does not exist); tablepro-core and tablepro-storage unit tests for read_csv_records and set_query.
  • TablePro.Interop.Tests: SavedQueryTests, CsvImportTests, ConnectionCopyTests on real SQLite files and stores.
  • TablePro.App.Model.Tests: saved query tree and names, CSV import form, copy names, history pins.
  • UI tests on the Windows runners: saved queries and pins, CSV import, duplicate and the export's Save As; the Save As dialog itself is not driven, the core's and the interop's tests write the file.

Screenshots

New surfaces, so no before shots.

Saved queries in a folder:

Saved queries, light
Saved queries, dark

Save query, and a pinned history run:

Save query
Pinned run

CSV import, and the rows it added:

CSV import, light
CSV import, dark
Imported rows

Duplicate opens the form on the copy:

Duplicate

…age-import

# Conflicts:
#	windows/src/TablePro.Interop/Generated/tablepro_ffi.cs
@datlechin
datlechin enabled auto-merge (squash) November 15, 2026 07:14
…age-import

# Conflicts:
#	core/crates/ffi/src/lib.rs
#	core/docs/decisions/README.md
#	windows/AGENTS.md
#	windows/src/TablePro.App/Strings/en-US/Resources.resw
#	windows/src/TablePro.App/Views/WorkspaceView.xaml.cs
#	windows/src/TablePro.Interop/Generated/tablepro_ffi.cs
@datlechin
datlechin disabled auto-merge November 15, 2026 07:35
@datlechin
datlechin merged commit 541b2e1 into main Nov 15, 2026
2 of 3 checks passed
@datlechin
datlechin deleted the feat/windows-ffi-storage-import branch November 15, 2026 07:35
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