Commit Graph

311 Commits

Author SHA1 Message Date
t8y2 ed1db7db6b fix(ui): localize hardcoded strings 2026-05-30 10:01:12 +08:00
t8y2 8e04889745 fix(editor): insert dragged table references 2026-05-30 09:46:59 +08:00
t8y2 879da4b86f fix(editor): make table drag payload reliable 2026-05-30 09:42:12 +08:00
t8y2 eb9030b9ef fix(editor): allow dropped table references 2026-05-30 09:37:13 +08:00
t8y2 e324f35f28 feat(editor): support dragging tables into queries 2026-05-30 09:31:07 +08:00
t8y2 13d9fd14b4 fix(diff): make schema diff dialog resizable 2026-05-30 09:16:20 +08:00
t8y2 81e50cadb5 feat: add XuguDB agent support 2026-05-30 09:12:34 +08:00
t8y2 6ec8115984 fix: wire up MongoDB table column sort buttons
The DataGrid emits @sort events when column headers are clicked, but
MongoDocBrowser was not listening to them. Added an onSort handler that
converts the column/direction into MongoDB sort JSON format.
2026-05-30 08:51:01 +08:00
t8y2 c71804d144 feat: add InterSystems IRIS database support
Add IRIS as a new agent-driven database type with:
- iris:// connection URL scheme (default port 1972, user _SYSTEM)
- JDBC driver via agent (com.intersystems.jdbc.IRISDriver)
- Oracle-compatible DDL dialect and schema-aware SQL dialect
- Capability sets: schema-aware, tree schema, diagram, search, table structure

Closes #368
2026-05-29 19:15:11 +08:00
t8y2 48a8810070 fix: stop remapping bigint to int8 in grid column type display
MySQL users expect "bigint" not PostgreSQL's internal "int8". Removing
this mapping keeps the SQL-standard name visible for both databases.
2026-05-29 18:17:15 +08:00
t8y2 5d91efd690 feat: merge OceanBase picker entries into one with MySQL/Oracle mode toggle
Replace two separate "OceanBase" and "OceanBase Oracle Mode" entries in the
database picker with a single "OceanBase" entry. After selecting, users can
switch between MySQL and Oracle modes via button toggles in the config form.
2026-05-29 17:59:14 +08:00
t8y2 58f2942520 feat: generalize URL params field to all database types and support oceanbase-oracle URL params
Remove the hardcoded 12-type whitelist for the URL params form field so all
database types (including agent-driven ones like oceanbase-oracle) can set
custom URL parameters. Also append url_params to oceanbase-oracle connection
URLs in the Rust backend (matching the existing Postgres/Redshift pattern).
2026-05-29 17:56:03 +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 f8215f7347 fix: open changelog links in external browser instead of in-app
Clicking links in the update dialog release notes was navigating within
the Tauri webview with no way to go back, requiring a restart. Now link
clicks are intercepted and opened externally via @tauri-apps/plugin-shell
or window.open.

Closes #525
2026-05-29 16:39:31 +08:00
t8y2 8a3bd067a2 fix: independent column width resizing in transpose view
Replace shared transposeRecordWidth with per-record width array so dragging a resize handle only affects that column. New columns auto-calculate optimal initial width based on content.
2026-05-29 16:35:29 +08:00
t8y2 027c39a610 perf: optimize database connection pooling and query execution
- Increase MySQL pool max from 1 to 3 to avoid contention across tabs
- Merge get_columns serial queries into a single LEFT JOIN
- Clone pool handles before health checks in refresh_connections to reduce lock contention
- Skip COUNT(*) when result rows are fewer than the page size
2026-05-29 16:26:19 +08:00
t8y2 76585b2e28 fix: use recursive findNode in disconnect to handle connections inside groups 2026-05-29 15:40:22 +08:00
t8y2 b54eda1889 fix: 修复应用长时间挂后台后恢复时表格数据永久加载的问题
三层防护:
- MySQL 连接获取时执行 ping 健康检查,死连接自动重连
- macOS Reopen 事件 + 前端 visibilitychange 触发连接刷新
- 前端 Promise.race 超时保护,确保 loading 状态不会超过 60s
2026-05-29 15:12:14 +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
Jahan 3991ce2a90
Fix/issue 515 UI scale settings dialog (#520)
* feat(structure): auto-switch column length default based on data type

When changing a column's data type in the table structure editor, the
length parameter now updates to a sensible default for the new type
(e.g. int→11, tinyint→4) instead of preserving the old value.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix(editor): preserve scroll position after SQL execution

After DDL/DML execution via the danger confirmation dialog, the editor
scrolls to the top, making it hard to locate the executed statement.
Fix by scrolling the cursor back into view after execution completes,
using nextTick + requestAnimationFrame to wait for Splitpanes layout
stabilization.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix(settings): 修复大比例 UI 缩放下设置弹窗无法操作的问题

设置弹窗主体区域设置了固定最小高度 sm:min-h-[520px]。当全局 UI 缩放
调到很大(如 200%)时,webview 的 CSS 视口大幅缩小,外层 DialogContent
高度被 calc(100vh-80px) 限制到比 520px 更小,主体区域被强行撑到 520px,
溢出部分被 overflow-hidden 裁掉,导致底部页脚(应用/保存按钮)被裁出可视
区且没有滚动条,用户无法把缩放改回来。

移除该固定最小高度,让主体区域随视口收缩,内部 overflow-y-auto 接管滚动,
带 shrink-0 的页脚在任意缩放比例下始终可见。大屏无回归:DialogContent
仍保持 min(660px, ...) 的固定高度。

Fixes #515

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: t8y2 <1156263951@qq.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 12:31:05 +08:00
Abeautifulsnow 310cc22b37
Fix/disable table comment for unsupported db (#518)
* fix(structure-editor): disable table comment input for databases that don't support comments (e.g. SQLite)

## 背景说明
SQLite 不支持表注释(COMMENT),但表注释输入框始终可编辑。用户修改注释后,SQL 预览显示暂无变更且应用变更按钮不可用,造成困惑的 UX。

## 修改内容
- 新增 isTableCommentDisabled 计算属性,基于 structureCapabilities.comment 控制禁用状态
- 表注释 Input 添加 :disabled 绑定,禁用时输入框变灰不可编辑
- 禁用时在输入框右侧显示 Info 图标,hover 显示 Tooltip 说明
- 三语言(zh-CN / en / es)新增 tableCommentUnsupported 翻译

## 影响范围
- SQLite、DuckDB 及未知数据库类型:输入框被禁用 + Tooltip 提示
- MySQL、PostgreSQL、ClickHouse 等支持注释的数据库:完全不受影响
- 后端 generate_comment_ddl 已有对等过滤(仅 Postgres/Oracle/ClickHouse 生成 COMMENT SQL)

## 测试
- 建议补充:dbType 为 sqlite 时 isTableCommentDisabled 为 true 的单元测试

* test(structure-editor): add tests for table comment disabled state and unsupported DB capabilities
2026-05-29 12:29:50 +08:00
t8y2 06c87676a0 fix(desktop): bundle Geist font locally for offline startup 2026-05-29 01:57:03 +08:00
t8y2 660ba07264 feat(sidebar): add compact object display mode 2026-05-29 01:17:46 +08:00
t8y2 c8310e61c9 fix(desktop): avoid blank screen on startup 2026-05-29 00:56:42 +08:00
t8y2 c7b7bed140 feat(editor): add extended column properties support for MySQL, PostgreSQL, and SQL Server
MySQL: AUTO_INCREMENT, ON UPDATE CURRENT_TIMESTAMP
PostgreSQL: GENERATED AS IDENTITY (BY DEFAULT / ALWAYS)
SQL Server: IDENTITY(seed, increment)
2026-05-29 00:41:51 +08:00
t8y2 ab12ab5c11 feat(editor): add keyboard navigation to type selector and column resize to structure editor
- SearchableSelect: support ArrowUp/Down to navigate filtered options, Enter to select, Escape to dismiss
- TableStructureEditor: add drag-to-resize column widths and horizontal scrolling for the columns table
2026-05-29 00:22:08 +08:00
t8y2 1d2fec4aee perf(editor): optimize SQL autocomplete responsiveness
- Add 150ms debounce on async completion path to reduce redundant Tauri IPC calls during rapid typing
- Parallelize schema table fetching with max concurrency of 5
- Separate schema list cache from table completion cache for longer-lived reuse
- Return keyword completions synchronously when no backend data is needed
- Lower snippet base boost for label-only matches so keywords rank above snippets when user types past snippet prefix
2026-05-28 23:31:31 +08:00
t8y2 539faef23d feat(query): display total row count in result status bar
Execute COUNT query asynchronously after main query to show total
matching rows. Strip user-supplied LIMIT/OFFSET from count SQL so
the total reflects all rows, not just the limited page.
2026-05-28 22:44:13 +08:00
skyler 18e5ee35bb
Merge pull request #505 from Michaelxwb/feature_mongo
feat(mongodb): 支持聚合查询、批量写入和 MCP 集成
2026-05-28 21:42:47 +08:00
t8y2 025b465bf1 fix(editor): preserve scroll position after SQL execution
After DDL/DML execution via the danger confirmation dialog, the editor
scrolls to the top, making it hard to locate the executed statement.
Fix by scrolling the cursor back into view after execution completes,
using nextTick + requestAnimationFrame to wait for Splitpanes layout
stabilization.
2026-05-28 21:36:29 +08:00
t8y2 9aae48d089 feat(structure): auto-switch column length default based on data type
When changing a column's data type in the table structure editor, the
length parameter now updates to a sensible default for the new type
(e.g. int→11, tinyint→4) instead of preserving the old value.
2026-05-28 21:36:28 +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 c943bf4179 feat(sidebar): hide SQL library node when no saved SQL files exist 2026-05-28 21:17:24 +08:00
t8y2 d57660eba9 fix(grid): freeze row number column on horizontal scroll 2026-05-28 20:47:47 +08:00
t8y2 f45ee8f272 feat(settings): keep dialog open after apply 2026-05-28 20:36:56 +08:00
t8y2 f41601e4dc fix(grid): improve column selection and transpose highlights 2026-05-28 20:09:35 +08:00
t8y2 c124ce3b69 fix(desktop): persist tray icon preference 2026-05-28 19:21:43 +08:00
t8y2 3f64e830f8 fix(grid): show cell highlight for row multi-select 2026-05-28 19:03:21 +08:00
t8y2 30a48a878c fix(query): reload connection config before execute 2026-05-28 18:54:51 +08:00
t8y2 a036ea1e8d fix(grid): sync value editor with selected cell 2026-05-28 18:31:57 +08:00
t8y2 486d9bb3a6 fix(connection): move query timeout into per-connection settings 2026-05-28 18:18:45 +08:00
skyler 9f72c38253
Merge pull request #502 from adntian/feat/connect-timeout
feat: add per-connection configurable connect timeout
2026-05-28 17:59:00 +08:00
t8y2 4de788ada2 fix(ci): align desktop tests with zoom changes 2026-05-28 17:51:36 +08:00
t8y2 f7f5758c85 feat(desktop): add global UI zoom settings and shortcuts 2026-05-28 17:43:06 +08:00
t8y2 d35aeaa08c fix: continue transfer after table failure 2026-05-28 16:11:29 +08:00
t8y2 1c03917609 fix: history context menu view details unresponsive and delete missing confirmation
- Fix "View Details" action: selectedEntry = entry → selectedEntry.value = entry
- Replace window.confirm() with Dialog-based confirmation for delete and clear
- Add history.clear i18n key to zh-CN and en locales
2026-05-28 14:33:50 +08:00
t8y2 967a12cc42 fix: remove fixed width from ask/agent mode dropdown to allow adaptive sizing 2026-05-28 14:33:24 +08:00
田振洲 c03b57c179 feat: add per-connection configurable connect timeout
Add a `connect_timeout_secs` field to ConnectionConfig that allows users
to configure the database connection timeout per connection (1-300s,
default 5s). Previously all connections used a hardcoded 5-second timeout.

- Add connect_timeout_secs field with serde default and clamp logic
- Add parse_connect_timeout_with_fallback to honor URL params over config
- Pass user-configured timeout to all drivers (MySQL, Postgres, Redis,
  MongoDB, ClickHouse, SQL Server, Elasticsearch) and TCP probe
- Add UI input in connection dialog SSH tab
- Add i18n keys for en/zh-CN/es
2026-05-28 14:24:54 +08:00
t8y2 56c937f844 refactor: migrate all context menus to CustomContextMenu
Replace reka-ui ContextMenu usage in QueryHistory, DataGrid,
AppTabBar, ObjectBrowser, and TreeItem with the lightweight
CustomContextMenu component. This removes the last reka-ui
context menu dependencies and eliminates the performance
overhead of multiple cached ContextMenu instances.
2026-05-28 13:24:03 +08:00