Skip to content

feat(windows): filter tables, show structure and definitions, export results and keep query history - #4213

Merged
datlechin merged 4 commits into
mainfrom
feat/audit-wave-5-windows-browse
Nov 12, 2026
Merged

datlechin merged 4 commits into
mainfrom
feat/audit-wave-5-windows-browse

Conversation

@datlechin

@datlechin datlechin commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Summary

Audit item WN-09, as the macOS app does it, over reads the core already does for the Linux app.

  • Table filter: Filter in a table tab (Query > Filter rows, Ctrl+Shift+F) with rules per column and the engine's own operators, Match all or Match any, and a Raw SQL condition. The core builds the WHERE and binds every value; a refused filter keeps the filter shown and says why. The filter is kept with the tab.
  • A table page is now read with read_page on the session's pooled connections and arrives as the usual run events, so a table tab no longer holds an editor connection. table_query is gone.
  • Structure: Data and Structure on a table tab, with Columns, Indexes, Foreign keys and the CREATE script (none for a view).
  • Functions, procedures, triggers and sequences open a read-only definition tab with Reload, Copy and Open in editor. A MySQL definition opens in a query tab moved to its database (QueryEditor::use_database). Tree menu: Open, Show structure, Show DDL, Copy name.
  • File > Export results (Ctrl+Shift+E): CSV, JSON, Excel, Markdown, HTML, XML, and SQL INSERT from a table; current page or entire table. The core writes the file and renames it in place only once complete.
  • View > Show query history: every typed run is recorded by the core, which withholds statements that can hold a secret; search, open in a new tab, copy, delete, clear.
  • Core: filter and browse errors get stable codes (filter.*, browse.*). Bindings regenerated.
  • ADRs: core 0022, windows 0007; 0004 and windows/AGENTS.md updated.
  • Docs: docs(windows): filter tables, read structure and definitions, export results and find past queries docs#206.

Not in this PR: SQL completion. The caret analysis lives in the Linux app and has to move into the core first, then the editor needs its popup.

Test plan

  • Core (tablepro-ffi, 171 pass locally): tests/browse.rs (filtered pages bind and count, unknown column, two-statement raw SQL and a bad value refused before any read, cancel, structure and the view's missing DDL, trigger definition, use_database), tests/export.rs (CSV, JSON, SQL INSERT, whole table with a filter, cancel and failure leave no file, unfinished rows refused), tests/history.rs (record, search, withheld statements, delete, clear). These fail on main, where the API does not exist.
  • Windows (515 pass locally): TablePro.Interop.Tests BrowseTests, ExportTests, HistoryTests on real SQLite files; TablePro.App.Model.Tests filter, structure, definition tab, history list and recording, session tabs, export plan, database move; TablePro.DataGrid.Model.Tests TextGridDataTests.
  • TablePro.App compiles on CI's Windows runners only (Native AOT publish passes). UI tests TableBrowseTests (filter, structure, DDL; shots 50 to 52) and BrowseObjectsTests (trigger definition and Open in editor, Export dialog, history and open again; shots 53 to 55). The system Save As dialog is not driven by UI Automation; the core's and the interop's export tests write the files.

Screenshots

Before, a table tab had only its rows:

Before, light
Before, dark

After, a filter on Track:

Filter, light
Filter, dark

Structure, Indexes:

Structure, light
Structure, dark

A trigger's definition:

Definition, light
Definition, dark

The query history:

History, light
History, dark

Needs the maintainer

  • A page read now has the core's 60 second page deadline and shows once whole, as on Linux; Show all rows on a large table stays blank until the last row is in.
  • History has no on/off or retention setting yet; it is pruned to the store's cap. A run reopened from history runs where the connection is, since the store keeps no database.
  • MongoDB's typed filter document is not offered on Windows yet; its rules are.
  • No CSV options yet: the core's defaults apply.

@datlechin
datlechin merged commit 3f5f783 into main Nov 12, 2026
68 of 70 checks passed
@datlechin
datlechin deleted the feat/audit-wave-5-windows-browse branch November 12, 2026 01:44
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