Skip to content

fix(grid): distinguish schema load failure from missing PK - #866

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/772-schema-load-vs-missing-pk
Sep 20, 2026
Merged

ZhuchkaTriplesix merged 1 commit into
devfrom
issue/772-schema-load-vs-missing-pk

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Summary

  • Table Browser no longer treats a failed getTableSchema (permissions, disconnect) as “Cannot edit: no primary key detected”.
  • Status shows “schema unavailable” plus the real error; editing stays off. Refresh retries schema.
  • Genuine missing PKs keep the old copy. SQLite implicit rowid is applied only after a successful schema load.

Closes #772

Test plan

  • Force a schema load failure (revoke metadata permissions / disconnect mid-open) → status is “schema unavailable”, not “no primary key”; cells stay read-only
  • Refresh after the failure recovers → schema loads, editing follows the real PK (or implicit rowid on SQLite)
  • Table with no PK still shows “no primary key detected”
  • Views / custom SQL stay read-only with their existing status copy
  • flutter test test/features/workspace/table_view_staging_test.dart

@github-actions github-actions Bot added bug Something isn't working error-handling Theme parser epic label: error-handling data-grid Interactive data grid, cell editor, filtering, groupings labels Sep 20, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix changed the base branch from main to dev September 20, 2026 13:54
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit e5758e1 into dev Sep 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working data-grid Interactive data grid, cell editor, filtering, groupings error-handling Theme parser epic label: error-handling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(grid): schema load failure must not look like missing PK

1 participant