Commit Graph

111 Commits

Author SHA1 Message Date
t8y2 9ffa4c41d9 feat: add SQL library panel with folder/file management, rename, and sync support 2026-06-10 02:46:10 +08:00
DengQingNian 35692bc53b
feat(redis): add TTL, structured entries, Stream and JSON support to create key dialog (#947)
Thanks @DengQingNian! Great feature — TTL, structured entries, Stream, and JSON support for Redis key creation.
2026-06-09 22:08:08 +08:00
t8y2 699281c7a6 fix(ci): remove brittle source-text assertion tests
These tests checked for specific code patterns in source files via
include_str!, making them fail whenever unrelated code introduced
the same patterns elsewhere. They tested how code is written rather
than what it does.
2026-06-09 18:58:28 +08:00
cl1107 3995524e5d
feat(import): 添加 DataGrip 连接导入支持 (#936)
- 新增 datagripImport 模块解析 XML 配置
- 支持从 macOS Keychain 自动填充密码
- 添加 Keychain 读取的 Tauri 命令
- 更新多语言翻译文件
- 集成到侧边栏导入流程中
2026-06-09 16:45:59 +08:00
t8y2 b777cddde5 feat: add user-facing debug logs 2026-06-08 12:16:49 +08:00
Quinlevi 897e6998fd
feat(dameng): full DM8 database support
Adds Dameng DM8 explain/autotrace support and user-management SQL support, with backend autotrace safety checks and escaped CREATE USER SQL.
2026-06-08 02:07:00 +08:00
t8y2 e6062b2b07 feat(etcd): add agent-backed etcd support 2026-06-08 00:58:42 +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
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 2b5300722f feat: optimize tab result lifecycle caching 2026-06-06 20:30:35 +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
t8y2 a799958328 feat: add driver runtime manager 2026-06-04 23:20:15 +08:00
t8y2 7fb53ee0b4 fix(drivers): skip blocked driver updates 2026-06-03 14:39:46 +08:00
t8y2 cc74fabad7 feat(completion): suggest database routines 2026-06-03 11:27:31 +08:00
DengQingNian bea3b45fd8
perf(export): 优化导出ui体验和性能
* docs(getting-started): set brew upgrade to use official homebrew cask

* fix(mysql): make admin show handling dialect aware

* fix(data-compare): create missing target tables during sync

* feat(sql): suggest join conditions from foreign keys

* fix(sidebar): use filtered order for range selection

* fix(tabs): close connection tabs on disconnect

* fix(sqlserver): execute cte queries without wrapping

* fix(opengauss): open table structure editor

* perf(export): 优化导出ui体验和性能

* perf(export): 优化导出ui体验和性能

* fix(export): normalize status casing and fix web route issues

- Add missing table export web routes (POST /export/table, SSE progress, cancel)
- Fix tauri table export Promise to wait for terminal events
- Change cancel to return Ok(()) so it doesn't get overwritten as Error
- Unify ExportStatus to PascalCase across all frontend components
- Fix http.ts table export POST body wrapping
- Fix duplicate pub mod in dbx-web routes

* fix(export): return export file for browser download in web mode

Write table export output to temp dir, register a download endpoint,
and trigger browser download from the frontend when export completes.

* fix(export): avoid table export progress races

---------

Co-authored-by: Francesco Lucarelli <francesco06lucarelli@gmail.com>
Co-authored-by: t8y2 <1156263951@qq.com>
Co-authored-by: dqn <someonegdeng@qq.com>
2026-06-03 10:39:11 +08:00
t8y2 30cd447e4f perf(export): stream table CSV from Rust 2026-06-02 23:00:58 +08:00
t8y2 b10e7cb1cf fix(data-compare): create missing target tables during sync 2026-06-02 17:46:30 +08:00
t8y2 ec5aa7a92b feat(desktop): copy table structure as documents 2026-06-02 01:45:20 +08:00
t8y2 ac7a5b7576 feat(desktop): drop tree schema objects 2026-06-02 00:33:58 +08:00
t8y2 17504be027 feat(settings): add MCP server status check 2026-06-02 00:14:03 +08:00
t8y2 a87b8ece31 fix(mongodb): support compass shell commands 2026-06-01 16:24:31 +08:00
t8y2 c67706db51 fix(desktop): store portable agent runtime in data dir 2026-06-01 00:45:21 +08:00
vrustx bc4e912504
Add configurable black app icons and logo (#564) 2026-05-31 10:15:59 +08:00
t8y2 13d52514d9 feat(connection): close database scoped pools 2026-05-30 12:34:14 +08:00
t8y2 d1f3023c64 fix(desktop): use macOS template tray icon 2026-05-30 10:08:29 +08:00
t8y2 ef4baba57a feat: support double-clicking .db/.sqlite/.duckdb files to open in IDE
Add OS file association for database files (.db, .sqlite, .sqlite3, .duckdb)
so double-clicking them in Finder/Explorer automatically creates a connection.
If the same file path is already connected, prompts the user to switch instead.

Also fix 42 pre-existing clippy warnings in dbx-core (needless_borrow,
too_many_arguments, derivable_impls, manual_div_ceil, type_complexity, etc.).

Closes #527
2026-05-29 17:25:52 +08:00
t8y2 6c0db6f517 feat: add "Copy as SQL ALTER" to DataGrid column header context menu
Right-click a column header in the data grid to copy the ALTER TABLE
statement for that column, making it easy to replicate column definitions
across databases. Supports all major dialects (MySQL, Postgres, SQL Server,
Oracle, ClickHouse, SQLite, DuckDB, H2).

Closes #516
2026-05-29 15:09:10 +08:00
t8y2 e15e99aeb5 fix(ci): make Emitter import unconditional and update defineExpose test regex
- Move Emitter import out of macos-only cfg so emit() works on Linux
- Update test regex to include scrollCursorIntoView in defineExpose
2026-05-28 22:09:54 +08:00
徐文彬 5ea146e08e fix(mongodb): guard aggregate execution paths 2026-05-28 21:29:08 +08:00
徐文彬 c56bcb8e2d feat(mongodb): 支持聚合查询、批量写入和 MCP 集成
- 桌面端:解析 db.<集合>.aggregate([...]) shell 语法,新增 mongoAggregateDocuments
  接口(Tauri + HTTP);mongo 入口统一补 ensureConnected;ObjectId(...) 自动
  转换为 {"\$oid":"..."} 扩展 JSON 表示。
- dbx-core:新增 aggregate_documents、insert/update/delete_documents bulk
  操作;扩展 JSON 解析识别 \$oid;schema list_tables_core 补 MongoDB/Elasticsearch
  分支返回 COLLECTION/INDEX。
- dbx-web / Tauri 命令 / MCP bridge:注册 4 个新 mongo 路由
  (aggregate/insert/update/delete documents);MCP bridge 新增 mongo HTTP 入口
  和 lazy 连接复用。
- node-core (MCP 后端):mongodb 走专属 executeQuery / listTables /
  describeTable;read-only 默认 + DBX_MCP_ALLOW_WRITES /
  DBX_MCP_ALLOW_DANGEROUS_SQL 两级开关;aggregate 含 \$out/\$merge 走同样开关;
  describeTable 抽样 20 条文档推断字段类型,_id 自动标记主键。
- mcp-server:mongodb 跳过 SQL safety evaluator(mongo shell 与 SQL 语法
  不兼容),改由 backend 做命令级 gating;附注释。
- AiAssistant 同时 emit replaceSql + executeSql 让编辑器和结果保持一致;
  App.vue ensureQueryTab 在无上下文时回退到连接默认库;aiMessageRender
  识别 mongodb / mongo 代码块。
- Review 修复:合并两份重复的 evaluateMongo*Safety 实现(同时修复 web-backend
  用字符串比较导致空 filter 检查可被空格绕过的 bug);ObjectId 正则兼容
  单/双引号;mongo_ops 错误文案 "MCP" 改为 "bulk";补 aggregate 解析测试用例。

测试:pnpm test 911 通过;vue-tsc 通过;cargo check -p dbx-core 通过。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 21:25:43 +08:00
t8y2 fcdc7cfc07 fix(rust): update mtls tests for timeout params 2026-05-28 20:35:15 +08:00
t8y2 c952c65483 feat: upgrade data compare sync planning 2026-05-28 01:05:15 +08:00
t8y2 0c9ee34a82 feat: add WebDAV cloud sync with encrypted secrets support
Add WebDAV-based settings sync for desktop app, including connection
configuration, editor settings, and optional encrypted secrets sync.
Also persist WebDAV remember-password preference across sessions.
2026-05-27 01:17:23 +08:00
t8y2 2038501b53 fix: use system proxy for app updates 2026-05-26 20:12:41 +08:00
t8y2 d326cb0ced fix: scope query connections by client session 2026-05-25 17:23:36 +08:00
t8y2 ad7797f451 fix: remove macOS tray icon title and add SQL Server TOP test
- Remove the "DBX" title text from the macOS menu bar tray icon so it
  only displays the icon, matching Windows behavior
- Add test for SQL Server TOP pagination with aggregate queries like
  COUNT(*)
2026-05-25 11:42:47 +08:00
t8y2 7a3ff3bff9 refactor(sql): move builders to Rust 2026-05-23 01:28:52 +08:00
t8y2 d7dc4c959a feat(driver-store): add storage usage breakdown 2026-05-22 18:05:59 +08:00
t8y2 3f14585a2a feat(diff): move schema and data diff to Rust 2026-05-22 16:20:11 +08:00
t8y2 c91fbc9fd6 feat(export): move text exports to Rust 2026-05-22 15:41:33 +08:00
t8y2 209eff528d feat(query): move grid save prep to Rust 2026-05-22 15:31:50 +08:00
t8y2 cb3e1d6e9f feat(query): move SQL editability analysis to Rust 2026-05-22 15:09:31 +08:00
t8y2 c736fe372a feat(export): move csv and xlsx generation to Rust backend 2026-05-22 14:56:40 +08:00
t8y2 0655d309d8 fix(db2): use schema tree mode for sidebar object loading 2026-05-22 14:52:12 +08:00
t8y2 0e189ba0cc feat(editor): add SQL semantic diagnostics 2026-05-22 14:22:58 +08:00
t8y2 a29b95b9fa fix(app): keep tray preference persistence stable 2026-05-22 10:39:47 +08:00
t8y2 bc41936e48 feat(app): configure background tray behavior 2026-05-22 02:24:16 +08:00
t8y2 cf520a7ee1 fix(app): show window after relaunch 2026-05-22 02:06:33 +08:00
t8y2 895c0d58af feat(settings): support editor system fonts 2026-05-21 12:40:10 +08:00