Skip to content

fix(extensions): Table Browser must require PK and not discard dirty edits #869

Description

@ZhuchkaTriplesix

Summary

Extension Table Browser is fail-open vs native Table Browser after #771 / #772 / #773.

  1. Staging attaches whenever supportsMutations is true — no PK / schema loaded check.
  2. ExtensionDriverSession.getTableSchema catches errors and returns an empty TableSchemaMeta. Save then builds UPDATE/DELETE WHERE from every column.
  3. Refresh, pagination, filter, and table switch dispose() the staging buffer with no confirm. No UnsavedWorkRegistry.
  4. Success toast uses affectedRows ?? mutations.length — a driver that omits or zeroes affectedRows still looks like a full success. No expectDmlMatchedRows.

Repro

  • Open an extension table with mutations enabled, edit a cell, change page / Refresh → edits gone.
  • Driver without PK or with a failing db.getTableSchema → cells still editable; Save can update multiple rows.

Scope

  • Disable staging without a real PK; treat schema load failure as unavailable (not empty PK).
  • Confirm before discarding dirty edits (pagination / Refresh / table switch / Home).
  • Fail Save when affectedRows is 0 / missing, matching native DML.

Out of scope

  • Native SQL-grid Execute discard (separate issue).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdata-gridInteractive data grid, cell editor, filtering, groupingserror-handlingTheme parser epic label: error-handlingmarketplaceExtensions marketplace, ExtensionManifestuxUser experience, keyboard shortcuts and interactions

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions