Skip to content

feat(data-grid): sort table tabs by primary key and keep completion columns through a refresh - #4344

Merged
datlechin merged 12 commits into
mainfrom
feat/column-catalog-default-sort
Nov 19, 2026
Merged

datlechin merged 12 commits into
mainfrom
feat/column-catalog-default-sort

Conversation

@datlechin

@datlechin datlechin commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Summary

  • P37: a refresh of the same database keeps completion's columns, marked stale. Completion before a FROM answers from them. A named table reads afresh once per refresh and keeps the stale list if that read fails.
  • P37: a bulk column read replaces every stale entry of its schema. A table the refreshed list no longer names loses its columns.
  • P37: the completion sync runs before the database list load, so a new connection's editor gets its tables one round trip sooner.
  • P15: a table tab sorts by its primary key when nothing else decided the order. Only the fallback changed: a saved Default row sort, none included, is kept. A table with no primary key keeps the engine's order.
  • P9: not in this PR. Its second review round found new defects in the page correction it added, so it was cut back to main.

Screenshots

The sample database's Track table on a fresh install. Before is the same build with Default row sort set to No sorting, the old fallback.

Light Dark
Before Before, light Before, dark
After After, light After, dark

Test plan

  • New: SQLSchemaProviderRefreshTests, SchemaLoadOrderTests, and DataGridSettingsDefaultSortDecoderTests.savedNoneIsKept and newInstallSortsByPrimaryKey.
  • On main, the new P37 and P15 tests fail: 6 of 13.
  • Updated on purpose: DataGridSettingsDefaultSortDecoderTests.missingKeyFallsBackToNone is now missingKeyFallsBackToPrimaryKey.
  • Open time, real drivers replaying the app's first open through a 200 ms RTT proxy, median of 5:
Engine Unsorted open Sorted by primary key
PostgreSQL 17.11 211 ms, 1 round trip 428 ms, 2 round trips
MariaDB 13.0.2 1,020 ms, 5 round trips 1,024 ms, 5 round trips
  • PostgreSQL now reads the table's columns before its rows. MariaDB already did, so the sort adds no round trip there.
  • Whole Unit plan on the merged tree: 32,027 passed. verify.sh build and lint pass on the last commit.

@datlechin
datlechin enabled auto-merge (squash) November 19, 2026 07:10
@datlechin
datlechin merged commit 0ac4c17 into main Nov 19, 2026
12 of 13 checks passed
@datlechin
datlechin deleted the feat/column-catalog-default-sort branch November 19, 2026 15:54
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