Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ jobs:

- name: Build app
env:
CARGO_PROFILE_RELEASE_LTO: "off"
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: "256"
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
run: npm run tauri build -- --target ${{ matrix.target }}
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,24 @@ All notable changes to QueryDen are documented here. This project adheres to [Se
- **Create Login Role / Drop Role now throw on disconnected state.** Instead of silently returning when `activeConnection` or `currentDb` is null, both operations throw a clear "Not connected to a database" error shown in the dialog.
- **Dialog no longer steals focus from input fields on parent re-render.** The `Dialog` component's auto-focus effect was split into two: focus management depends only on `[open, initialFocusRef]`, and the Escape key listener depends on `[open, dismissOnEsc, onClose]`. This prevents inline `onClose` callbacks from re-triggering the focus effect and jumping the cursor back to the initial element.
- **PostgreSQL `regrole` type no longer logs decode warnings.** Added a `"regrole"` decode arm to the patched `tauri-plugin-sql` PostgreSQL decoder (lowercase match, matching the driver's runtime type name), silently handling regrole values from catalog queries like tablespace owner resolution.
- **Auto-save now updates `originalQuery` on write.** When auto-save persists a tab's text to disk, the tab's `originalQuery` is updated to match, preventing a spurious "unsaved changes" prompt on close when auto-save already captured the content. Tabs whose auto-save write failed retain their previous dirty state.
- **Session restore handles null `originalQuery` from existing session files.** The session restore code now reads `t.originalQuery ?? t.query ?? ""`, a migration path for session files written before `originalQuery` was tracked (where the Rust `Option<String>` serializes to JSON `null`). Prevents a false "unsaved changes" prompt on every launch for users upgrading from versions before this field was introduced.
- **"Discard" on close now overwrites session with clean state.** When the user clicks "Discard" in the unsaved-changes prompt, the session file is immediately re-saved with `originalQuery = query` for every tab, so the close prompt doesn't re-fire on next startup.
- **PostgreSQL FK relationships now render in the ER diagram.** The `schemaItems.foreignKeys` list is sometimes null when schema loading fails silently. Added direct `fetchPostgresForeignKeys()` and `fetchMySQLForeignKeys()` fallbacks that query system catalogs directly, plus a `normalizeTableName()` helper to reconcile the `public.` prefix format difference between PostgreSQL's `regclass::text` and the schema items table list.
- **PostgreSQL columns in `public` schema no longer missing from the ER diagram.** Tables with many columns were showing as header-only because the column map keyed by `public.tablename` didn't match the schema items' bare `tablename` format. Stripping the `public.` prefix in the column lookup fixed it.
- **ER diagram no longer freezes when opening on databases with many tables.** The table selector dialog now appears first — users pick which tables to include before any schema data is fetched or dagre layout runs. Selected-only data keeps both the query batch and the layout computation scoped to what's visible.

### Changed
- **ER diagram compact view is now the default.** The diagram opens in compact mode (PK/FK columns only) instead of showing all columns, reducing visual clutter on first open. Users can toggle back to full-column view via the toolbar button.

### Added
- **[#67](https://github.com/openidle-dev/queryden/issues/67) — Master key storage status surfaced in Help → About.** A new "Master Key" info card in the About dialog shows whether the encryption key is stored in the OS keyring, a local file fallback, or is unavailable. When the file fallback is in use, a warning explains how to install a keyring service for OS-level protection.
- **[#139](https://github.com/openidle-dev/queryden/issues/139) — Ctrl+PageUp / Ctrl+PageDown now cycles between query editor tabs.** Tab cycling works globally like a DataGrip preset keybinding. Both bindings appear in Settings → Keymap and respect custom rebinding.
- **[#122](https://github.com/openidle-dev/queryden/issues/122) — Auto-save: open query text is periodically written to `.sql` files on disk.** When enabled in Settings → Auto Save, each tab's current text is debounced and saved to `<appDataDir>/auto-save/` with the naming convention `{connectionFolder}_{database}_{tabId}.sql`. Files are recoverable from the app data directory and can be backed up like any other `.sql` file. Save interval is configurable (5–300 seconds).
- **pgAdmin-style login/group role management.** Right-click the "Login Roles" folder in the PostgreSQL tree to create a new role via dedicated dialog (name, password, connection limit, valid until, privilege checkboxes). Right-click any role leaf node to drop it with a confirmation prompt. Both operations refresh the tree immediately. Login roles are exposed in the tree with a green User icon; group roles with a blue Users icon.
- **PostgreSQL operators enabled by default in schema tree.** The `showOperators` setting now defaults to `true`, so operator nodes appear in the schema tree without having to toggle the setting first.
- **ER Diagram visualization for PostgreSQL, MySQL/MariaDB, and SQLite.** A new ER Diagram dialog (toolbar <Table /> button) renders the current database as an interactive entity-relationship diagram powered by `@xyflow/react` v12 and `dagre` auto-layout. Tables are shown as cards with PK (key icon) and FK (link icon) column markers; relationships are drawn as smooth-step edges with cardinality labels (`*` at the FK end, `1` at the PK end). The dialog opens with a table selector so users pick which tables to include — preventing the freeze that would occur when auto-introspecting many tables. A toolbar provides schema multi-select (PostgreSQL), search/filter with related-table expansion, compact/PK-only column mode, refresh, and SVG export (Tauri `save()` dialog + `writeTextFile`). Schema data is cached with a 30-second TTL so re-opening the same tables is instant. Provider-specific introspection: PostgreSQL queries `pg_attribute`/`pg_index`/`pg_constraint` in bulk, MySQL uses `information_schema`, SQLite uses batched `PRAGMA table_info`/`PRAGMA foreign_key_list` via `Promise.all`.
- **ER Diagram now opens on the correct database.** Previously the diagram always read the global `activeConnection` — if the active editor tab targeted a different database, the diagram showed the wrong schema. The toolbar button now switches the connection to match the tab's target before opening.


## [1.0.23] - 2026-05-26
Expand Down
265 changes: 261 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@
"@tauri-apps/plugin-process": "^2",
"@tauri-apps/plugin-sql": "^2",
"@tauri-apps/plugin-updater": "^2",
"@xyflow/react": "^12.10.2",
"clsx": "^2.1.1",
"dagre": "^0.8.5",
"lucide-react": "^0.469.0",
"monaco-editor": "^0.55.0",
"react": "^18.3.1",
Expand All @@ -59,6 +61,7 @@
"devDependencies": {
"@tailwindcss/vite": "^4.0.0",
"@tauri-apps/cli": "^2",
"@types/dagre": "^0.7.54",
"@types/react": "^18.3.0",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.0",
Expand Down
5 changes: 5 additions & 0 deletions src-tauri/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# Let cargo-xwin handle the linker and libraries automatically
# Static CRT (+crt-static) can sometimes cause linker errors during cross-compilation

# Use LLVM's lld-link on Windows for faster linking than MSVC link.exe.
# rust-lld ships with the Rust toolchain — no extra install needed.
[target.x86_64-pc-windows-msvc]
linker = "rust-lld"
Loading