Skip to content

feat(linux): keep stored files before a format upgrade and open .sql files - #4049

Merged
datlechin merged 27 commits into
mainfrom
fix/linux-beta-fixes
Nov 6, 2026
Merged

datlechin merged 27 commits into
mainfrom
fix/linux-beta-fixes

Conversation

@datlechin

@datlechin datlechin commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Storage: before the first write that replaces a file an older build wrote, the core keeps a copy beside it, <file>.v<version>-<unix seconds>, newest 3 per file (write_document_blocking, and VACUUM INTO for history.db before its migrations). A failed copy fails the write. A copy never keeps what the user deleted: history and saved-query deletes reach the copies first, retention trims them, a deleted connection leaves the connection-list copies, and crash leftovers are swept. Decision: core ADR 0011. Tested with a synthetic version bump, no legacy format.
  • Docs: "After a downgrade" now says a build refuses a newer storage format, not a newer release, and gives the steps to put a copy back. storage.md and releasing.md match.
  • Import preview: the rows are plain list-item widgets (labels, with the item's accessible label and description), in a card list view. AdwActionRow is a GtkListBoxRow, and GTK warned when a GtkListView item held one.
  • .sql files from Files or the command line open in a new editor tab bound to the file, never run. The tab opens in the SQL connection in front. While no SQL connection is in front, or a window is still restoring or connecting, a picker asks with a banner. A tab already bound to the same location comes forward. The desktop file lists application/sql; AppStream takes media types from it, so the metainfo lists none.
  • Translations: po/check-complete.sh compares each language in LINGUAS with the generated template, plural forms included. The Translations job reports untranslated and fuzzy entries without failing. A linux-v* release fails on them, before the GitHub release and the PPA upload. Documented in po/README.md. No catalogue is translated here.

Test plan

  • tablepro-storage: upgrade_copies tests a synthetic version bump of a document and of a migration list: the first write keeps the older bytes once, a WAL-mode database is copied with its WAL rows, and new, current and newer databases get no copy. Copy, dedupe, retention and clock tests. History tests: deleting a connection's history and Clear History empty the copies, their full-text blocks included, and keep their saved queries.
  • tablepro: state file and workspace copies, purge of a session's copies, the import preview presented with GLib warnings fatal, .sql resolution and routing tests, the desktop entry's MIME types.
  • Updated on purpose: an_import_shows_where_each_connection_goes_before_writing reads the preview's rows as list items, since they are no longer AdwActionRows.
  • po/check-complete.sh against a template from gettext 1.0: vi reports 677 untranslated entries and exits 1; a complete catalogue exits 0.
  • Screenshots below are from the dev container under Xvfb, before and after, light and dark. The app log before has gtk_list_box_row_grab_focus: assertion 'box != NULL' failed when the preview opens; after, none.

Screenshots

Import preview: the rows sit in a boxed list now.

Light Dark
Before Import preview before, light Import preview before, dark
After Import preview after, light Import preview after, dark

tablepro report.sql while a SQLite file is open: before, a second window fails to connect; after, an editor tab of the open connection, not run.

Light Dark
Before SQL file with a session open before, light SQL file with a session open before, dark
After SQL file with a session open after, light SQL file with a session open after, dark

tablepro report.sql with no window: before, it fails to connect; after, the picker asks for a connection.

Light Dark
Before SQL file with no window before, light SQL file with no window before, dark
After SQL file with no window after, light SQL file with no window after, dark

@datlechin
datlechin enabled auto-merge (squash) November 5, 2026 09:16
# Conflicts:
#	core/docs/decisions/README.md
#	linux/crates/app/src/persistence/column_width_store.rs
#	linux/crates/app/src/services/connection_deletion.rs
#	linux/docs/storage.md
@datlechin
datlechin disabled auto-merge November 6, 2026 01:08
# Conflicts:
#	.github/workflows/release-linux.yml
# Conflicts:
#	core/docs/decisions/README.md
@datlechin
datlechin merged commit 284c57c into main Nov 6, 2026
2 of 4 checks passed
@datlechin
datlechin deleted the fix/linux-beta-fixes branch November 6, 2026 03:03
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