Skip to content

fix: CSV import can target the previous database #921

Closed

Description

@EVWorth

The useCallback for ImportDialog.handleImportCsv leaves database out of its dependency list (this is the existing react-hooks/exhaustive-deps warning). After the user changes the target database in the dialog, a CSV import can still run against the database that was selected before.

Fix

Add database (and any other missing dependencies the lint warning lists) to the deps. Add a test that changes the database and then imports.

Related, smaller items found in the same pass (#918)

  • PrivilegesEditor runs the per-database SHOW GRANTS through api.executeQuery (not recorded), but the global one through runStatement (recorded as internal). One path should be used for both.
  • TableStructure and TableDesigner (now through tableDetailsStore) call api.* directly instead of dataSourceFor, so SQLite connections miss their data-source routing.
  • The src/dev/mock connected and lost scenarios: list_connections reopens Local dev after it has been disconnected.

Activity

  1. added
    bug
    on Oct 29, 2026
  2. added a commit that references this issue on Oct 30, 2026
    0cf1ecb
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions