Commit Graph

175 Commits

Author SHA1 Message Date
t8y2 bc687cee7f feat(agent): add reinstall JRE button in Driver Manager 2026-05-13 05:05:00 +08:00
t8y2 ff80e767d6 refactor: extract GITHUB_PROXIES constant shared by update and agent modules 2026-05-13 04:47:43 +08:00
t8y2 e85f9df1fe feat(agent): pluggable database drivers via JDBC agent subprocess
Migrate domestic database support (DaMeng, KingBase, Vastbase, GoldenDB) from
built-in ODBC/protocol drivers to standalone Java agent processes communicating
via stdin/stdout JSON-RPC 2.0. Agents are distributed as fat JARs with embedded
JDBC drivers, downloaded on-demand from GitHub Releases with proxy fallback.

- Add AgentDriverClient for subprocess lifecycle + JSON-RPC communication
- Add AgentManager for JRE/JAR install state management
- Add Tauri commands for driver install/uninstall/list
- Add DriverManager UI panel in settings dialog
- Extend DatabaseType with Kingbase, Vastbase, Goldendb variants
- Migrate Dameng from ODBC (dm_driver.rs) to JDBC agent
- Delete dm_driver.rs (343 lines)
- Add GitHub proxy fallback for downloads (update.hwdns.net, gh-proxy.org)

Agent code lives at https://github.com/t8y2/dbx-agents
2026-05-13 04:44:52 +08:00
t8y2 9ba2976d11 feat: export entire database as SQL file
Add a new "Export Database" feature accessible from the sidebar
right-click menu on database/schema nodes. Generates a .sql file
containing CREATE TABLE DDL, batched INSERT statements, and
view/procedure/function source code.

Backend (database_export.rs):
- Stream-writes SQL to file with configurable batch size
- Supports all SQL database types via existing DDL/INSERT generators
- Progress events with cancellation support
- Graceful error handling (continues on per-table failures)

Frontend (DatabaseExportDialog.vue):
- Connection/database/schema selector
- Checkboxes: structure, data, objects
- Real-time progress with current table and row count
- Cancel button

Wired up through Tauri commands, Web SSE routes, and API layer.
2026-05-13 01:08:16 +08:00
t8y2 83216b2765 feat(docs): 升级首页与更新日志 2026-05-13 01:04:58 +08:00
t8y2 9483f0e440 fix(jdbc): rewrite JDBC URL for SSH/proxy tunnel in test_connection
test_connection passed the original config to the JDBC plugin without
rewriting the connection URL to use the tunneled localhost address.
Native drivers (PG, MySQL, etc.) used the already-substituted host/port,
but the JDBC path bypassed this, so the plugin tried to connect directly
to the remote host — failing when only reachable through the tunnel.

Apply the same rewrite_jdbc_url_host logic used in get_or_create_pool.

Fixes #230
2026-05-12 19:01:11 +08:00
t8y2 bf58045a28 Revert "feat(cli): add dbx-cli runtime and agent integration (#229)"
This reverts commit 58c47adef5, reversing
changes made to 3bcec8ef7f.
2026-05-12 17:31:54 +08:00
Illuminated2020 ef83cedfb4 fix: adapt cli runtime branch after rebase 2026-05-12 17:04:18 +08:00
Illuminated2020 dd3894df68 style(agent-runtime): 格式化运行时风险辅助函数 2026-05-12 16:52:35 +08:00
Illuminated2020 636f4ee055 fix(agent-runtime): 修正 handoff 风险重算连接来源 2026-05-12 16:52:35 +08:00
Illuminated2020 bb2e39d2f5 fix(runtime): 加固 handoff 风险重算与 URL 脱敏
- GUI runtime 接收 handoff 后基于 SQL 与可用连接元数据重算风险
- CLI conn list/show 清洗敏感 query 参数并补充回归测试
2026-05-12 16:52:35 +08:00
Illuminated2020 af2d874883 fix: harden handoff status transitions 2026-05-12 16:52:35 +08:00
Illuminated2020 780311a542 feat(agent-runtime): 接入 handoff 审阅状态
- 支持 handoff queued/shown 状态加载、mark shown 和 reject 持久化

- 为 Tauri/API/Pinia store 接入 handoff 审阅状态流转

- 新增 AgentHandoffDialog 审阅 UI,拒绝操作不执行 SQL
2026-05-12 16:52:34 +08:00
Illuminated2020 feff43c459 style: 恢复 hook 后 Rust 格式化 2026-05-12 16:49:29 +08:00
Illuminated2020 67a7ef4746 fix(agent-runtime): 修复运行时 HTTP 读取与发现文件写入 2026-05-12 16:49:29 +08:00
Illuminated2020 9425658ecd feat(agent-runtime): 新增 Tauri agent runtime 服务
- 启动独立 localhost server 并写入 owner-only discovery

- 提供 token 认证的 context、selection、result 和 handoff 端点

- 接入 Tauri 启动、invoke 命令和退出清理

- 补充认证、路由、discovery 权限与 symlink 防护测试
2026-05-12 16:49:29 +08:00
t8y2 724813c72a chore: bump version to 0.5.4 2026-05-12 14:56:10 +08:00
t8y2 368fa5a102 feat(redis): add bulk operations and command runner 2026-05-12 13:38:43 +08:00
t8y2 cab0e79dad fix(oracle): 修复表数据加载与编辑 2026-05-11 16:35:59 +08:00
t8y2 79277c660f feat(proxy): 增加数据库和 AI 代理支持 2026-05-11 15:05:25 +08:00
t8y2 70db0aa62c refactor(ci): switch 1Panel appstore to community repo and manual trigger 2026-05-11 11:41:51 +08:00
t8y2 3733c3f08f chore: bump version to 0.5.3 2026-05-11 02:31:47 +08:00
t8y2 bafb424b23 perf: full-stack performance optimization
Frontend:
- Debounce queryStore tab persistence (remove flush:sync deep watcher)
- Eliminate unnecessary object spreading in connectionStore error handling
- Use in-place delete for completion cache invalidation
- Deduplicate schema cache prefix API calls
- Split echarts, reka-ui, marked, @codemirror/commands into separate chunks
- Lazy-load xlsxExport and markdownTable in DataGrid
- Lazy-load marked parser in UpdateDialog

Backend:
- Replace tokio::sync::Mutex with RwLock for AppState connections/configs
  (60+ concurrent reads no longer block each other)
- Parallelize PostgreSQL DDL metadata queries with tokio::try_join!
2026-05-10 23:23:22 +08:00
t8y2 dbfe69572e perf(build): make DuckDB bundled compilation optional
Add duckdb-bundled feature gate (default on) to dbx-core. Local dev
can use --no-default-features to skip DuckDB C++ compilation (~170s),
while CI/Docker keeps the default bundled build.
2026-05-10 22:48:35 +08:00
t8y2 6d513afc16 feat(objects): show routines in object browser 2026-05-10 21:14:16 +08:00
t8y2 d4afbc7b58 feat(external): add tabular source foundation 2026-05-10 20:52:03 +08:00
t8y2 d917842fca perf(oracle): speed up initial table loading 2026-05-10 20:47:54 +08:00
BlueSkyXN 5975a0b0b7 feat(external): add tabular source foundation 2026-05-10 19:50:34 +08:00
t8y2 766977e7de chore: bump version to 0.5.2 2026-05-10 13:01:38 +08:00
t8y2 10bfede1c7 feat(jdbc): add optional JDBC plugin support 2026-05-10 12:57:38 +08:00
t8y2 cb7428b5a3 feat(ui): refine app chrome layout 2026-05-10 09:37:02 +08:00
t8y2 b013a2ac29 feat(sql): persist SQL library in app database 2026-05-10 00:41:17 +08:00
t8y2 a878ec203a feat(data): support connection URLs and XLSX export 2026-05-09 23:11:15 +08:00
t8y2 d6b367ebec build(release): bump version to 0.5.1 2026-05-09 18:26:41 +08:00
t8y2 8d318a2146 fix(updater): fix restart after update 2026-05-09 18:08:06 +08:00
t8y2 5c52560368 feat(schema): 增加数据库对象列表缓存 2026-05-09 17:36:20 +08:00
Bacon2994 ce2f97a175
fix(sidebar): 修复默认库过滤数据库树 (#175) 2026-05-09 14:42:24 +08:00
t8y2 6f29c38866 chore: bump version to 0.5.0 2026-05-09 12:20:19 +08:00
t8y2 1a1f128f2b feat: Redis browser overhaul — Navicat-style table, editing, and pagination
- Unified key table with columns: key, type, value preview, size, TTL
- Top-bottom split layout: key table above, value detail below
- Virtual scrolling via RecycleScroller for large key sets
- ZSet editing: add/remove members with scores
- TTL inline editing: click badge to modify expiration
- Batch key deletion with checkbox selection
- Paginated loading for Hash/Set/ZSet/List values (HSCAN/SSCAN/ZSCAN)
- Debounced auto-search (400ms) for key filtering
- Value previews fetched during key scan for instant display
2026-05-09 11:45:50 +08:00
t8y2 d6e273e136 feat: custom titlebar with integrated window controls
- macOS: overlay mode with native traffic lights, toolbar as drag region
- Windows/Linux: frameless window with custom minimize/maximize/close buttons
- Double-click toolbar to toggle maximize
2026-05-09 10:44:34 +08:00
t8y2 dfd4d2d99d feat: auto-detect OceanBase Oracle mode and use Oracle-style schema queries (#155)
Introduce MysqlMode enum to distinguish Normal/Bare/OceanBaseOracle MySQL
connections. On connect, if driver_profile contains "oceanbase", detect
tenant mode via SHOW VARIABLES LIKE 'ob_compatibility_mode'. When Oracle
mode is detected, schema queries use ALL_TABLES/ALL_TAB_COLUMNS/etc.
2026-05-08 22:57:48 +08:00
t8y2 68d8776e8f feat(mcp): notify desktop UI to reload after connection add/remove
Add /reload-connections bridge route that emits mcp-reload-connections
event, triggering the frontend to re-read connections from SQLite.
2026-05-08 12:44:16 +08:00
Bacon2994 0fb6aebd59 feat(redis): 修复全库键浏览与二进制展示 2026-05-08 10:06:16 +08:00
t8y2 68c0639e3a feat: persist and restore window state across sessions 2026-05-08 00:12:09 +08:00
t8y2 65d184fd03 fix: skip macOS framework lookup in dev mode via build.rs
Use CARGO_MANIFEST_DIR to detect whether CI-copied dylibs exist.
When absent (local dev), override frameworks to empty array so
tauri dev doesn't require libodbc/libltdl installed locally.

Also gitignore *.dylib in src-tauri/ to prevent accidental commits.
2026-05-07 22:21:13 +08:00
t8y2 9a7c12c65a fix: restore macOS frameworks to tauri.conf.json for proper bundling
TAURI_CONFIG env var merge did not apply frameworks to the bundler,
resulting in libodbc/libltdl missing from Contents/Frameworks/.

Restore frameworks in tauri.conf.json and skip them in dev mode via
build.rs when the dylibs are not present locally.
2026-05-07 22:14:01 +08:00
t8y2 198ac54355 feat: add GitHub proxy endpoints for faster update checks
Add hwdns.net and gh-proxy.org as proxy fallbacks before direct GitHub
access, with 10s timeout per endpoint. Significantly improves update
check speed in regions with slow GitHub connectivity.
2026-05-07 21:07:55 +08:00
t8y2 aefb6bf0ef fix: prevent SELECT with REPLACE/TRUNCATE functions from triggering danger warning
The DANGER_RE regex matched keywords anywhere in the SQL text, causing
SELECT queries using REPLACE() or TRUNCATE() functions to incorrectly
trigger the destructive-SQL warning dialog. Check only the first keyword
of each semicolon-separated statement instead.

Also fix dialog content overflow by adding min-w-0 to the <pre> element,
and move macOS frameworks config from tauri.conf.json to CI-only
TAURI_CONFIG so local `tauri dev` no longer requires libltdl/libodbc
to be globally installed.

Closes #135
2026-05-07 19:07:41 +08:00
t8y2 484dc85114 fix: also bundle libltdl.7.dylib for macOS app
libodbc.2.dylib depends on libltdl.7.dylib (libtool). Rewrite its
install_name and the reference in libodbc to @rpath so both resolve
from Contents/Frameworks/ at runtime.
2026-05-07 18:46:09 +08:00
skyler cf25b7d6d4
Merge pull request #139 from rarnu/feat/edit-on-resultset
add: 增加对于查询得到的结果集直接进行数据编辑的功能
2026-05-07 17:44:48 +08:00