Commit Graph

1707 Commits

Author SHA1 Message Date
t8y2 a473f4ff8f chore: switch license to Apache-2.0 2026-06-07 17:34:59 +08:00
Scars 33087aca6b
fix(core): quote StarRocks identifiers with backticks (#815) 2026-06-07 16:58:56 +08:00
Caisin 13363b9094
Enable safe multi-connection cleanup from the sidebar (#816)
The sidebar already supports multi-select, so deletion now resolves the context-clicked selected connection set before confirming. Connection removal gained a batched path to persist once while pruning sidebar layout, pins, active state, connection errors, and stale selection for every removed connection.

Constraint: No new dependencies and existing single-connection delete behavior must remain available.\nRejected: Delete every selected tree item regardless of type | mixed tree selections could unexpectedly remove connections while table/object deletion has separate SQL confirmation behavior.\nConfidence: high\nScope-risk: narrow\nTested: pnpm fmt; pnpm test; pnpm typecheck; pnpm lint; pnpm build\nNot-tested: Manual desktop UI interaction against a running Tauri window

Co-authored-by: caisin <caisin@caisins-Mac-mini.local>
2026-06-07 16:58:49 +08:00
t8y2 74e19ec6a3 feat(databend): support agent driver 2026-06-07 16:39:22 +08:00
t8y2 3403819658 fix(db2): use compatible table pagination 2026-06-07 14:52:34 +08:00
Scars 9b07c576ef
fix(core): avoid unicode panic when normalizing where filters (#812) 2026-06-07 14:33:52 +08:00
vrustx b64e70753a
fix(postgres): render internal "char" type as character, not ASCII code (#669) (#811)
PostgreSQL's internal "char" type (OID 18, e.g. pg_depend.deptype,
pg_shdepend.deptype) is a single byte the driver decodes as i8. In
pg_value_to_json it had no dedicated branch and fell through to the i8
arm below, surfacing the raw ASCII code (110 for 'n') instead of the
character.

Add a "char" branch that renders the byte as its character (matching
psql's charout): a zero byte becomes an empty string, any other byte is
interpreted as a Latin-1 code point so the output is always valid UTF-8
and never panics. SQL standard CHAR(n)/character(n) is a different type
("bpchar") and is unaffected. Added a unit test.

Co-authored-by: vrustx <vrustx@vrustxdeMac-mini.local>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 14:25:04 +08:00
t8y2 15b792a424 fix(editor): improve selection rendering 2026-06-07 14:23:18 +08:00
vrustx e3087e0954
fix(sql): rank referenced-table columns above keywords in completion (#801) (#810)
When editing SQL with concrete tables already referenced (a FROM clause,
a "table." qualifier, or an INSERT column list), column completions only
carried `computeBoost + keyBoost (0/500)` — lower than keyword boosts
(1200-1900) — so the table's own columns were interleaved among keywords
instead of ranking at the top where the user expects them.

Give columns a relevance boost (+2000) in these referenced-table contexts
so they rank above plain keywords. Added a unit test asserting columns
outrank keywords when a table is referenced.

Co-authored-by: vrustx <vrustx@vrustxdeMac-mini.local>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 13:53:58 +08:00
vrustx ff32e4b00f
fix(grid): make cell-detail side panel resizable and unify value display (#723) (#809)
The bottom-docked cell detail side panel could not be resized and its
details view still used the old three-block "value / raw value / formatted
JSON" layout, causing the issues reported on macOS:

- bottom layout had no resize handle and a fixed, too-small height
- "value" showed the grid's (truncated) display value while "raw value"
  showed the original — redundant for JSON, and shown inconsistently
  (only when the two happened to differ)
- the "formatted value" block rendered the grid-truncated display value,
  which is incomplete and confusing inside the detail view

Changes:
- side panel bottom layout: add a top-edge row-resize handle and make the
  height adjustable (reuse clampCellDetailPanelSize, support vertical drag)
- unify the side panel details view with the cell-detail dialog: a single
  value area showing the original value plus a "format JSON" toggle button
- drop the redundant "raw value" / "formatted value" blocks in both the
  side panel and the dialog (the dialog change also addresses the #528
  follow-up where the truncated "formatted value" block was confusing)

Co-authored-by: vrustx <vrustx@vrustxdeMac-mini.local>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 13:00:14 +08:00
t8y2 1a4e59875b feat(grid): enhance canvas scrolling with acceleration and trackpad support 2026-06-07 12:11:55 +08:00
t8y2 27b5cc681b fix(settings): polish shortcut editing controls 2026-06-07 11:11:49 +08:00
t8y2 a3e45cd721 feat(iotdb): add Apache IoTDB support 2026-06-07 10:29:05 +08:00
t8y2 2b2d789c2c fix: add keyboard shortcut hint on data-unavailable page and make Mod+R work
When app restarts, table data shows "data unavailable" but Mod+R didn't
work because the DataGrid component wasn't mounted. Fixed by handling
the reload emit directly in handleModRTarget. Also added kbd-styled
shortcut hint (⌘R / Ctrl+R) on the data-unavailable placeholder.
2026-06-07 10:02:34 +08:00
至高吾尚 491e9633e0
fix(grid): polish cell/row/column detail dialogs (#528)
When Chinese text (table data or column comments) was written to MySQL
through a connection using the wrong charset (e.g. latin1/CP1252),
each byte of the correct UTF-8 representation was stored as a separate
CP1252 character, then re-encoded as UTF-8 on read, resulting in
garbled display like "主é"®" instead of "主键".

This commit adds a `fix_potential_double_encoding` function that reverses
the CP1252→UTF-8 double-encoding at read time, with a safety check that
only applies the fix when the decoded result contains CJK characters,
avoiding any impact on legitimate Latin-1 or ASCII text.

Changes:
- Add fix_potential_double_encoding() helper with full CP1252 mapping
  for the 0x80-0x9F range (€, ", ", etc.)
- Apply fix in mysql_value_to_json() to cover all table data display
- Apply fix in get_columns() to cover column comments via
  information_schema.COLUMNS
- Apply fix in get_columns_show() to cover column comments via
  SHOW FULL COLUMNS (fallback path)
- Minor formatting: break long line in columns_sql()
2026-06-07 09:32:31 +08:00
skyler 795806186d
Merge pull request #804 from serenez/fix/528-detail-dialog-ui
fix(grid): polish cell/row/column detail dialogs (#528)
2026-06-07 09:30:38 +08:00
vrustx fe0f34a6d9 fix(grid): polish cell/row/column detail dialogs (#528)
Address the follow-up UI feedback on the data detail dialogs:

- cell detail: toggle between raw value and formatted JSON inside a single
  value area (via a "format JSON" button) instead of stacking the value,
  formatted value and formatted JSON blocks, removing the redundancy.
- kill horizontal scrollbars: add break-words to the formatted-value block,
  and constrain row/column detail value columns with w-full max-w-0 so long
  unbroken values wrap instead of overflowing the table.
- row detail: column name uses break-words instead of break-all to stop long
  names from wrapping character-by-character.
- unify footer button layout across the three detail dialogs (bulk-copy
  actions on the left, copy-name on the right).
- add a search box to row & column detail to filter fields by name / value /
  row number (filterDataGridDetailFields + unit tests).
- i18n: add detailSearchPlaceholder / detailSearchNoMatch for all 6 locales.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 01:48:05 +08:00
t8y2 3eefe87380 feat(settings): allow disabling update reminders 2026-06-07 01:07:31 +08:00
Caisin 8c0fe3a6e7
Expose forwarded database port for local testing (#803)
Database connection context menus now show a copy action when the connection has enabled transport layers. The action starts or reuses the ordered transport chain, copies the final local forwarding port, and keeps runtime config cached so later disconnect cleanup can stop the created tunnel.

Constraint: Local testing sometimes needs external tools to connect through DBX's generated proxy/tunnel endpoint

Rejected: Copy full host:port endpoint | user specifically asked for the port and existing tunnel host is always localhost

Rejected: Require an active pool before copying | local test workflows may need the tunnel before opening the DBX connection

Confidence: high

Scope-risk: moderate

Tested: pnpm test -- packages/app-tests/connectionTransport.test.ts (ran full app-tests: 862 passed)

Tested: pnpm typecheck

Tested: pnpm exec oxlint --vue-plugin apps/desktop/src/components/sidebar/TreeItem.vue apps/desktop/src/lib/connectionTransport.ts apps/desktop/src/lib/api.ts apps/desktop/src/lib/tauri.ts apps/desktop/src/lib/http.ts

Tested: cargo check -p dbx-core -p dbx-web

Tested: cargo check -p dbx

Tested: cargo fmt --check --all

Co-authored-by: caisin <caisin@caisins-Mac-mini.local>
2026-06-07 01:00:34 +08:00
t8y2 2c404e73c2 fix(mysql): preserve full-width text edits in data grid 2026-06-07 00:46:37 +08:00
Caisin e9ee982843
Preserve ordered SSH and proxy connection layers (#802)
* Preserve ordered SSH and proxy connection layers

Replace separate SSH/proxy connection fields with ordered transport_layers while keeping legacy migration and secret fallback paths intact. The UI now edits SSH tunnel/proxy layers in configured order without a global SSH enable gate.

Constraint: Existing saved SSH tunnels, proxy settings, and secret-store keys must continue to load through migration.
Rejected: Folding proxy fields into SshTunnelConfig | mixes proxy semantics into an SSH-specific structure.
Confidence: high
Scope-risk: moderate
Directive: Keep SSH/proxy structs provider-specific; put cross-layer chaining in transport_layer_tunnel orchestration.
Tested: git diff --check; cargo fmt --check; cargo check --workspace; cargo test -p dbx-core --lib; vue-tsc --noEmit --project apps/desktop/tsconfig.json; tsc -p packages/node-core/tsconfig.json --noEmit; oxlint --vue-plugin apps/desktop/src; tsx --tsconfig apps/desktop/tsconfig.json --test packages/app-tests/*.test.ts; tsx --test packages/node-core/tests/*.test.ts
Not-tested: Live external SSH/proxy/database endpoint integration.

* Keep ordered transport changes CI-format clean

Constraint: CI pnpm check failed only on oxfmt formatting for two desktop TypeScript files
Confidence: high
Scope-risk: narrow
Directive: Keep generated/editor config changes out of this PR fix commit
Tested: PATH="/Volumes/data/code/rust/dbx/node_modules/.bin:/Users/hekx/.codex/tmp/arg0/codex-arg0nuL34n:/Users/hekx/.cargo/bin:/Users/hekx/.local/bin:/opt/homebrew/opt/llvm/bin:/opt/homebrew/opt/libpq/bin:/Volumes/data/Users/hekx/.opencode/bin:/Users/hekx/.bun/bin:/Volumes/data/sdks/flutter/bin:/Volumes/data/Users/hekx/.cargo/bin:/Users/hekx/.local/bin:/opt/homebrew/opt/llvm/bin:/opt/homebrew/opt/libpq/bin:/Volumes/data/Users/hekx/.opencode/bin:/Users/hekx/.bun/bin:/Volumes/data/Users/hekx/Library/pnpm:/Volumes/data/sdks/flutter/bin:/Volumes/data/Users/hekx/.cargo/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/pkg/env/global/bin:/opt/X11/bin:/Library/Apple/usr/bin:/Applications/Wireshark.app/Contents/MacOS:/usr/local/go/bin:/opt/homebrew/bin:/opt/podman/bin:/Applications/Ghostty.app/Contents/MacOS" rtk node scripts/run-check.mjs
Not-tested: GitHub Actions rerun not observed locally

* Keep Rust checks warning-clean

Constraint: cargo clippy --workspace --all-targets --all-features -- -D warnings failed across core, web, and tauri crates
Rejected: Broad workspace-level clippy suppression | kept allows local to long-argument command/API boundaries
Confidence: high
Scope-risk: moderate
Directive: Preserve src-tauri/tauri.conf.json as an unrelated local change outside this commit
Tested: rtk cargo clippy --workspace --all-targets --all-features -- -D warnings
Not-tested: Full GitHub Actions rerun not observed locally

* Reuse existing proxy tunnels on retry

Proxy tunnel startup now mirrors SSH tunnel behavior by returning the existing local port for an active connection id instead of replacing the managed handle. A second map check aborts a just-spawned duplicate handle if a concurrent retry won the race before insertion, preventing orphaned listeners while keeping the change narrow.

Constraint: Reviewer requested proxy tunnel behavior align with SSH local-port reuse

Rejected: Always overwrite and abort the previous handle | less consistent with SSH behavior and churns listeners during retries

Confidence: high

Scope-risk: narrow

Tested: cargo fmt --check --all

Tested: cargo test -p dbx-core db::proxy_tunnel::tests::start_tunnel_reuses_existing_local_port

Tested: cargo clippy -p dbx-core --all-targets -- -D warnings

---------

Co-authored-by: hekx <hekx@momandeMac-mini.local>
Co-authored-by: caisin <caisin@caisins-Mac-mini.local>
2026-06-06 23:22:29 +08:00
t8y2 0c3572d779 fix(mcp): detect node from user shell environment 2026-06-06 22:45:28 +08:00
t8y2 85e2cf1f2f fix: stabilize custom theme integration 2026-06-06 21:04:19 +08:00
polemp a067ee8d76
feat: custom theme system with PostgreSQL PL/pgSQL highlighting fix
- Fix PostgreSQL function highlighting by disabling doubleDollarQuotedStrings
  in extended PostgreSQL dialect, enabling PL/pgSQL syntax highlighting
  inside $ blocks
- Add complete custom editor theme system with multi-theme management
  (create, rename, duplicate, delete), visual color editor (12 colors),
  JSON import/export, real-time preview, and 12 preset color schemes
- Add background/foreground color customization with system theme defaults
- Optimize EditorSettingsDialog layout: 2-column grid with font selector
  taking available space and theme dropdown grouped with custom theme button
- Add i18n support for custom theme UI (en, zh-CN, zh-TW, es)
- Fix Tauri production build by adding custom-protocol feature
- Update .gitignore for temporary build artifacts

Closes t8y2#788

Co-authored-by: Sam <14344444@@qq.com>
2026-06-06 20:59:21 +08:00
t8y2 0b07f05f72 fix(grid): prevent grid from intercepting clipboard in native inputs and cell detail
- Add data-native-clipboard to cell detail panel so Cmd+C copies selected text
- Skip onGridPaste when event target is a native input element
2026-06-06 20:49:32 +08:00
t8y2 2b5300722f feat: optimize tab result lifecycle caching 2026-06-06 20:30:35 +08:00
t8y2 b226b445d6 fix(export): preserve MySQL bit literals in SQL export 2026-06-06 19:03:21 +08:00
t8y2 f2924a3725 feat: support hive and mongodb transfers 2026-06-06 17:35:59 +08:00
t8y2 e504d0c175 fix: sync transpose cell detail selection 2026-06-06 17:06:33 +08:00
t8y2 fcf5ad7261 fix(grid): align canvas cell state rendering 2026-06-06 16:33:40 +08:00
t8y2 631584bed1 fix(mongo): align table grid controls 2026-06-06 15:41:18 +08:00
t8y2 6bcc85233c fix(grid): show local column filters in filter popover 2026-06-06 14:04:52 +08:00
t8y2 7acd1625a9 fix(web): support encrypted config import over HTTP 2026-06-06 13:12:28 +08:00
t8y2 7cfdcff8c7 fix(grid): prevent canvas selection from rendering black 2026-06-06 11:50:39 +08:00
t8y2 a1d0178a7e fix(postgres): add OpenGauss-compatible index query fallback without WITH ORDINALITY
OpenGauss is based on PostgreSQL 9.2 and does not support WITH ORDINALITY
(PG 9.4+). When the native pg_get_tabledef() path fails, the fallback DDL
builder calls list_indexes() which previously only had two SQL variants, both
using WITH ORDINALITY — causing "syntax error at or near 'WITH'" on OpenGauss.

Add POSTGRES_INDEXES_OPENGAUSS_SQL as a third fallback that uses generate_series
and array_length instead, both available since PG 8.0.
2026-06-06 11:29:16 +08:00
t8y2 fecefb1589 fix(grid): refine total row counting 2026-06-06 11:13:47 +08:00
t8y2 67e4c5d881 fix(transfer): preserve longtext/mediumtext/longblob/mediumblob types for MySQL target
Previously map_column_type mapped all text types (longtext, mediumtext) to
TEXT (64KB max) and all blob types (longblob, mediumblob) to BLOB (64KB
max). This caused "Data too long" errors when transferring large data from
MariaDB to MySQL.

Also improved INSERT error messages to include the table name and absolute
row number (offset + MySQL row) instead of just chunk index.

Fixes #796
2026-06-06 09:29:31 +08:00
André Mácola 11a6a59eb4
feat: add pt-BR localization support and locale option (#797) 2026-06-06 09:15:09 +08:00
t8y2 5581205c4d fix: quote temporal type default values in SQL generation
Time-related column types (DATE, DATETIME, TIMESTAMP, TIME, etc.) need
their literal default values wrapped in single quotes. Previously, the
normalize_default function returned values verbatim, so a DATETIME
default like "2024-01-01 00:00:00" would generate invalid SQL:
  DEFAULT 2024-01-01 00:00:00
instead of:
  DEFAULT '2024-01-01 00:00:00'

SQL expressions (CURRENT_TIMESTAMP, NOW(), etc.) are correctly left
unquoted. Non-temporal types (INT, VARCHAR, etc.) are unaffected.
2026-06-06 02:12:53 +08:00
t8y2 e02b6f0d7a test: update stale test expectations 2026-06-06 01:06:03 +08:00
t8y2 2ee51327bd fix: remove ellipsis on canvas cell text truncation 2026-06-06 00:55:14 +08:00
t8y2 012b03cac5 fix: prevent grid paste handler from intercepting paste in edit mode
When a cell is in edit mode, the native paste event was bubbling up to
the grid root's @paste handler, which called preventDefault() and wrote
values directly to the data model instead of the edit input. This caused
the "Pasted!" toast to appear but the input content remained unchanged.

Adding @paste.stop on edit inputs allows the browser's default paste
behavior to insert text into the input field, properly updating editValue
via v-model.
2026-06-06 00:34:09 +08:00
邹超 6e24ea5099
fix(redis): need to enable tls-rustls-insecure to support --insecure (#794) 2026-06-06 00:15:52 +08:00
t8y2 44d6f167ea fix: show full tab title immediately when opening table from sidebar
Set tableMeta early so tabDisplayTitle can render the @database suffix
right away instead of waiting for loadTableMeta to complete.
2026-06-06 00:05:13 +08:00
t8y2 bcafb9bc93 Revert "feat: support multiple desktop windows"
This reverts commit 642fa39bb8.
2026-06-06 00:01:38 +08:00
t8y2 642fa39bb8 feat: support multiple desktop windows 2026-06-05 20:45:00 +08:00
Francesco Lucarelli 28e8a77fa3
Fix typecheck mismatch by mapping rqlite to sqlite and add Italian locale (#787)
Thanks for adding Italian locale support and fixing the rqlite dialect mapping, @fraluc06!
2026-06-05 18:48:14 +08:00
t8y2 9858fc40d2 feat(tests): add currentWhereInput to various test cases 2026-06-05 18:31:53 +08:00
t8y2 8a995c6bef build: use rust-lld for windows msvc linker 2026-06-05 18:20:20 +08:00
skyler d2166e080c
Merge pull request #782 from sunny0826/feat/kwdb
feat: add KWDB support
2026-06-05 18:16:17 +08:00