Commit Graph

962 Commits

Author SHA1 Message Date
Libon 1991bf118b
feat(infinite-scroll): implement infinite scroll feature with customizable max rows 2026-06-15 23:05:35 +08:00
t8y2 d053facdd5 fix(connection): allow deleting broken connections 2026-06-15 22:54:08 +08:00
t8y2 9c478d1437 fix(connection): respect agent connect timeout 2026-06-15 22:43:05 +08:00
t8y2 59fa888149 fix(dialog): keep drop database confirmation loading 2026-06-15 22:02:59 +08:00
Abeautifulsnow c300336281
feat(ai): context window management and token usage tracking
* @
feat(ai): add conversation context management and token usage tracking (Phase 4)

## Background
Phase 4 of AI agent loop upgrade: token usage extraction from LLM responses,
cost estimation display, and automatic context window management (summarization
when approaching limits).

## Changes

### Backend (Rust)
- New token_usage::TokenUsage — cross-turn token accumulation
- New agent_loop::maybe_compact — proactive context compaction: token estimation
  → cut-point selection → LLM summarization → fallback summary
  → tool-pair integrity protection → drain/insert
- New agent_loop::context_window_for_model — auto-detect context window by model
- New agent_loop::is_context_length_error — detect upstream context-length errors
- New agent_loop::compact_tool_result_for_context — JSON/text sampling for large results
- Modified agent_loop::run_agent_loop — pre-turn compaction check, retry on context error
- Modified agent_events::AgentEnd — split total_tokens into input_tokens/output_tokens
- New agent_events::ContextCompacted — compaction event with metrics
- New AiConfig.context_window — user-configurable context window size
- New AiChatMessage.kind — context summary message marker
- Modified stream_with_tools & 3 provider stream functions — extract TokenUsage
  - Claude: message_start(input) + message_delta(output)
  - OpenAI: stream_options { include_usage } → final usage chunk
  - Gemini: usageMetadata per chunk, keep last

### Frontend (TypeScript/Vue)
- AiAssistant.vue: token + cost display row, estimateCost() with 7 model families,
  contextCompacted UI step, pendingCompaction deferred apply,
  messagesForAgentHistory post-compaction history reconstruction
- EditorSettingsDialog.vue: contextWindow input (min=1000, auto-detect)
- settingsStore.ts: AiConfig.contextWindow field
- tauri.ts: AgentEvent type updates, AiChatMessage.kind
- i18n: 6 new keys in en.ts and zh-CN.ts

## Fixed Issues
- messages[0] dropped from LLM context after compaction
- estimate_text_tokens hard threshold causing 2.8x estimate jump
- context_compacted event field semantics mismatch with frontend insert position
- validate_summary English-only keywords causing fallback on non-English LLMs
- Stale agentTokens after conversation switch
@

* remove cost computation logic
2026-06-15 18:55:22 +08:00
t8y2 3ee2514d07 fix(databend): enable editing and procedures 2026-06-15 17:43:44 +08:00
cwatanab 1debfef284
feat(i18n): add Japanese translation support (#1211) 2026-06-15 17:27:06 +08:00
t8y2 e0d481cc2e fix(postgres): handle tsvector columns 2026-06-15 16:59:01 +08:00
t8y2 8ee5dd9d35 fix(grid): unify data grid scrollbars 2026-06-15 15:53:51 +08:00
t8y2 60e49128cb fix(grid): show data grid vertical scrollbar 2026-06-15 15:37:07 +08:00
t8y2 96a01a6050 fix(grid): align data grid editor fonts 2026-06-15 15:30:55 +08:00
t8y2 ab5bd1dd25 fix(redis): batch SCAN server-side to reduce fetch-all latency 2026-06-15 15:01:13 +08:00
t8y2 7bb869d398 fix(mongodb): support legacy driver fallback 2026-06-15 14:07:31 +08:00
lexmin0412 090f073206
fix(ui): prevent click handler from firing on macOS Ctrl+click (#1188) (#1189)
* fix(ui): allow mouse interaction with LightTooltip interactive content (#1120)

- Remove pointer-events-none from tooltip content so mouse can enter it
- Add tooltipRef to detect hover state on the tooltip itself
- Replace immediate close with scheduleClose (100ms delay) on mouse leave
- Add onPointerDown handler that skips close for clicks inside tooltip
- Extend isTriggerActive() to check tooltip hover alongside trigger hover

Fixes #1120

* fix(ui): prevent click handler from firing on macOS Ctrl+click (#1188)

macOS: Ctrl+click fires both click and contextmenu events.
Elements with both @click and @contextmenu would trigger unwanted
navigation (ObjectBrowser table row, SqlLibraryPanel folder/file,
QueryHistory entry) alongside the context menu.

Fix: add a capture-phase click listener that stops propagation
when ctrlKey is true. This prevents the click from reaching Vue
handlers while the separate contextmenu event is unaffected.
2026-06-15 13:25:27 +08:00
Abeautifulsnow d845a318c6
feat(ai-agent): Phase 3 — explain_query tool, parallel/sequential execution, DB gating (#1187)
- Add explain_query tool with structured EXPLAIN result, gated on supports_explain_plan()
- Add supports_sql_query() to gate execute_query/get_sample_data for non-SQL DBs (Redis, ES, MongoDB, etc.)
- Split agent loop tool dispatch: execute_query runs sequentially, all others run in parallel via join_all
- Wire explain_query result button to ExplainPlanViewer in AiAssistant + App.vue
- Fix O(n²) agentSteps rebuild: incremental O(1) push per event during streaming
- finally block falls back to full rebuild only when streaming push did not occur
2026-06-15 13:14:59 +08:00
t8y2 a3c972c367 fix: allow text selection in toast notifications 2026-06-15 13:13:00 +08:00
t8y2 1a91cb7c77 feat(ui): add copy action to error banners 2026-06-15 12:47:54 +08:00
t8y2 aab30d7c44 fix(mysql): prefer text protocol for result sets 2026-06-15 12:07:58 +08:00
t8y2 35f03a07b3 fix(ai): align aiAgentStream JSON field names with server camelCase expectation 2026-06-15 11:48:41 +08:00
echocde 7dc27f8f6d
fix(ui): fix appearance setting page display with text truncation tooltips
* chore: test main release token push

* fix(desktop): unify toolbar dropdown tooltips

* chore: test main release token push

* fix(desktop): unify toolbar dropdown tooltips

* fix(ui) Appearance setting page displayed incorrectly.

* fix(ui) Appearance setting page displayed incorrectly.

* fix(ui) Appearance setting page displayed incorrectly.

* Remove unused import

---------

Co-authored-by: Echocde <udixt@outlook.com>
2026-06-15 11:08:27 +08:00
t8y2 ff8fd49244 fix(sqlserver): add system functions and exclude NOW from common 2026-06-15 10:43:39 +08:00
t8y2 8af25343cc feat(ui): add password visibility toggle to all password inputs 2026-06-15 02:34:19 +08:00
t8y2 29edc7b7b7 fix(redis): disable subscribe inputs when not connected, fix button height jitter 2026-06-15 02:30:33 +08:00
t8y2 c9b3292a2e fix: resolve Vue warnings, silent PubSub auto-connect, remove 30 meaningless tests 2026-06-15 02:27:07 +08:00
t8y2 ef426a8218 feat(redis): add Pub/Sub publish and subscribe with WebSocket real-time push 2026-06-15 01:40:06 +08:00
t8y2 abc7136ed2 feat: sidebar table context menu — smart SQL templates (SELECT/INSERT/UPDATE) 2026-06-14 23:33:37 +08:00
t8y2 d04fc13af4 fix: unify SQL library font size to 13px 2026-06-14 23:09:10 +08:00
John Jin 1afc271c18
feat: add QuestDB support
Thanks @ptma!
2026-06-14 22:58:05 +08:00
lexmin0412 0ae720d950
fix(ui): allow mouse interaction with LightTooltip interactive content (#1120)
Thanks @lexmin0412!
2026-06-14 22:57:00 +08:00
dbin0123 14e095215b
feat(generate): fix date range persistence, add i18n for data generation
Thanks @dbin0123!
2026-06-14 22:54:11 +08:00
Mathieu Lecarme bfe3b17637
Change default locale fallback from zh-CN to en
Thanks @athoune!
2026-06-14 22:53:09 +08:00
t8y2 8932b0a308 fix(mongo): align collection loading state 2026-06-14 17:04:56 +08:00
t8y2 7b2156446c fix(mongodb): use tls param for form connections 2026-06-14 16:06:37 +08:00
Vergil Lai f385386284
feat(manticore): add Manticore Search support
Add Manticore Search table data editing, structure editing, metadata handling, and SQL completion support.
2026-06-14 16:01:02 +08:00
t8y2 93d2e7dc18 fix(redis): split multi-line commands before execution 2026-06-14 15:43:27 +08:00
t8y2 228a0098f1 fix(ui): increase toast z-index to appear above dialogs 2026-06-14 15:26:26 +08:00
SuLea-IT 97192297eb
feat(query): add switchable query result runs and archives
* docs: design query result run tabs

* feat(query): add result run model helpers

* feat(query): persist result run metadata

* feat(query): record switchable result runs

* feat(query): sync active result run state

* feat(query): cache result run payloads

* feat(query): render result run tabs

* docs: design query result archives

* feat(query): add result archive codec

* feat(query): restore result archives

* feat(query): add result archive actions

* fix(query): toggle execution summary view

* fix(query): avoid archive compression backpressure

* feat(query): remove result runs

* chore: remove local spec docs from pr
2026-06-14 10:30:50 +08:00
t8y2 cbc7f9b0db fix(gbase): support 8a and 8s profiles 2026-06-14 10:16:24 +08:00
t8y2 e3b69679c8 fix: restore missing newlines at EOF 2026-06-13 20:45:06 +08:00
t8y2 0fa9964799 fix: add installMcpServer stub to http.ts 2026-06-13 20:34:28 +08:00
t8y2 7c5021fa91 feat(turso): simplify connection form to URL + token 2026-06-13 20:33:32 +08:00
Vergil Lai 799d20a2cf
添加 Manticore Search 支持 (#1145)
* 添加 Manticore Search 支持

* 更新 Manticore Search 文档
2026-06-13 20:23:36 +08:00
t8y2 6c57169162 feat(mcp): add one-click install/upgrade button 2026-06-13 20:05:46 +08:00
LC 2d98b9fdd2
feat(sqlite): add database backup action
* feat(sqlite): add database backup action

* fix(sqlite): sanitize default backup file name
2026-06-13 18:39:12 +08:00
t8y2 0b9aef1ca8 feat(settings): split driver store paths 2026-06-13 17:27:58 +08:00
t8y2 48ba76bc9a feat(data-grid): add row numbering to table info columns tab 2026-06-13 17:02:49 +08:00
t8y2 d974ad5533 feat(settings): add custom driver store path with migration 2026-06-13 16:54:04 +08:00
t8y2 d091b0db85 feat(sidebar): reveal local db file in OS file manager 2026-06-13 16:00:47 +08:00
t8y2 6a87f31fdc feat(ai): add resizable textarea with drag handle 2026-06-13 15:13:19 +08:00
t8y2 58a52f65cc fix: enhance contextmenu handler for editable elements 2026-06-13 14:32:34 +08:00
t8y2 30afcb8e69 fix(sidebar): page large table groups 2026-06-13 13:40:36 +08:00
t8y2 59107463dc fix: redis sidebar show total key count only 2026-06-13 13:07:37 +08:00
t8y2 2ec8ed1523 feat(sidebar): locate query table from cursor 2026-06-13 12:45:00 +08:00
dbin0123 2ef29c004a
fix(editor): keep cursor at end of inserted completion text (#1136)
Thanks @dbin0123!
2026-06-13 11:42:03 +08:00
二丫讲梵 6f804266fc
feat(sidebar): remap connection IDs in imported sidebar layouts
Thanks @eryajf for the contribution! Close #1121
2026-06-12 22:41:42 +08:00
t8y2 0d63fcd3a3 fix(oracle): avoid rowid for view data 2026-06-12 21:02:32 +08:00
skyler abacac3c07
feat(ai): agent loop Phase 2 — SQL execution tools, risk classification, and streaming tool calls
feat(ai): agent loop Phase 2 — SQL execution tools, risk classification, and streaming tool calls
2026-06-12 19:56:36 +08:00
t8y2 484658c6b7 feat(ai): streaming probe for connection test with latency measurement 2026-06-12 19:29:55 +08:00
t8y2 fa4dbb9104 feat(completion): cache foreign key metadata 2026-06-12 19:27:16 +08:00
t8y2 60632ccfe3 feat(completion): expand sql semantic completion 2026-06-12 19:15:46 +08:00
runstone 094412d956 fix error 2026-06-12 19:00:27 +08:00
t8y2 d0a009751a feat(completion): improve sql completion ranking 2026-06-12 18:52:34 +08:00
runstone 40f0f98540 Merge branch 'main' of https://github.com/Abeautifulsnow/dbx into feat/ai-agent-loop-phase1 2026-06-12 18:52:05 +08:00
t8y2 3e63ad1405 fix(completion): keep labels visible in popup 2026-06-12 18:39:13 +08:00
t8y2 6570e88e4a feat(completion): rank table acronym matches 2026-06-12 18:38:56 +08:00
runstone 7df7fd9235 feat(ai): add tool result collapsible UI and fix agent mode prompt
AiAssistant.vue:
- Tool call steps now support click-to-expand/collapse for SQL args
  and results (expandedSteps set); chevron rotates on open
- Remove fixed-open result display (was always visible, no toggle)
- Max result height raised to 48 (max-h-48) with scroll

ai.ts (buildModePromptLines agent branch):
- Replace vague "prioritize SQL" hint with explicit tool-use
  instruction: must call execute_query, not just emit SQL text
- List available tools (list_tables, get_columns, execute_query,
  get_sample_data) so LLM knows what it can call
- Clarify allowed statement types for execute_query
2026-06-12 18:27:28 +08:00
runstone 100124da3e feat(ai): Phase 2 SQL 风险分类 + Agent 模式工具调用结果渲染
后端:
  - 新增 sql_risk.rs:基于 sqlparser AST 的 SQL 风险分类(ReadOnly/Write/Ddl/Transaction)
  - agent_tools.rs:新增 execute_query 和 get_sample_data 工具,写操作/DDL 被风险分类阻止
  - agent_loop.rs:支持 is_agent_mode 参数,Agent 模式下暴露全部工具,Ask 模式仅暴露只读工具
  - agent_loop/web/tauri:mode 参数全链路传递(前端→HTTP→Tauri→Rust)

  前端:
  - AiAgentStepItem 接口扩展:toolName/toolArgs/toolResult/isError 字段
  - AiAssistant.vue:工具调用结果实时+最终渲染,SQL 查询结果/错误信息展示
  - ai.ts/http.ts/tauri.ts:mode 参数透传到后端
2026-06-12 17:42:23 +08:00
polemp ef5ed05ae7
feat(schema-diff): professional DDL diff view with deployment-aware colors and custom themes (#1112)
Co-authored-by: Sam <14344444@@qq.com>
2026-06-12 17:14:05 +08:00
t8y2 3322209578 fix(saved-sql): dedupe concurrent folder creates 2026-06-12 17:04:36 +08:00
t8y2 250da6e7cb fix(mysql): generate index COMMENT clause and enable index_comment capability 2026-06-12 16:56:20 +08:00
t8y2 edf9dd88e3 feat(agent): unify oracle driver 2026-06-12 16:34:42 +08:00
t8y2 2395727b6b fix(ai): auto-add /v1 prefix for bare-origin OpenAI-compatible endpoints 2026-06-12 16:10:42 +08:00
Abeautifulsnow 082e3bb4eb
feat(ai): add agent tool calling loop 2026-06-12 13:18:36 +08:00
runstone 84a9fd6a0f Merge branch 'main' of https://github.com/Abeautifulsnow/dbx into feat/ai-agent-loop-phase1 2026-06-12 12:52:03 +08:00
t8y2 a858a6bd18 feat(mysql): edit foreign keys and triggers 2026-06-12 12:29:46 +08:00
runstone 453169ae45 Merge branch 'main' of https://github.com/Abeautifulsnow/dbx into feat/ai-agent-loop-phase1 2026-06-12 12:00:47 +08:00
runstone 2d75667b9a feat(ai): upgrade agent loop tool calling to true SSE streaming
Move tool calling from non-streaming (complete) API calls to real
streaming SSE, so text, reasoning, and tool call arguments all arrive
incrementally — users see the AI think and act in real time.

- Extract ~370 lines of non-streaming tool-call functions from
  agent_loop.rs (call_with_tools, call_openai_with_tools,
  call_claude_with_tools, call_gemini_with_tools) and replace with
  a single ai::stream_with_tools() dispatch call.

- Add streaming-with-tools infrastructure to ai.rs (~550 lines):
  - StreamToolEvent enum: Chunk, ToolCallStart, ToolCallDelta,
    ToolCallComplete — provider-agnostic, feeds into the
    StreamingToolCallAccumulator
  - stream_claude_with_tools(): parse SSE content_block_start/delta/
    stop events, incremental input_json_delta for tool arguments
  - stream_openai_with_tools(): parse SSE delta.tool_calls with
    incremental function.arguments
  - stream_gemini_with_tools(): parse SSE functionCall (Gemini
    sends complete objects, not deltas — emit as one chunk)
  - Cancellation support via tokio::select! in every streaming loop
  - Extended timeout for reasoning models (600s vs 120s)

- StreamingToolCallAccumulator: collect partial tool call fragments
  from streaming deltas, then deserialize into complete ToolCall
  objects in index order once the stream ends.
2026-06-12 11:43:09 +08:00
t8y2 a4bd62005b feat(redis): add all search mode 2026-06-12 11:32:56 +08:00
sweetwisdom ca3e3a2a56
fix: clamp canvas surface width to eliminate horizontal scrollbar flicker
Thanks for the fix!
2026-06-12 11:30:03 +08:00
t8y2 707f8b53dd fix: allow empty snippet list in settings 2026-06-12 11:28:17 +08:00
t8y2 4fee45cf8d fix(db): update redis auth and mongo document refresh 2026-06-12 11:11:16 +08:00
t8y2 4e0cb1d288 fix(grid): refresh table metadata before reload 2026-06-12 10:49:35 +08:00
t8y2 3bf243a4a6 fix(layout): constrain query result splitter 2026-06-12 10:37:41 +08:00
t8y2 a84ba4903e fix(chart): improve query chart axis selection 2026-06-12 10:34:37 +08:00
runstone 91f1206783 Merge branch 'main' of https://github.com/Abeautifulsnow/dbx into feat/ai-agent-loop-phase1 2026-06-12 08:48:50 +08:00
t8y2 b18f837b50 fix(editor): improve completion popup overflow 2026-06-12 01:20:11 +08:00
t8y2 4f71bcbff8 fix(connection): extend agent connect timeout 2026-06-12 01:12:06 +08:00
t8y2 cded066fdf feat: add select-filtered button for visible databases search 2026-06-12 01:10:53 +08:00
t8y2 19b5b70fb7 feat: confirm before closing unsaved SQL query tabs 2026-06-12 01:09:41 +08:00
t8y2 6081ba46f6 fix: prevent freeze when manually editing date cell and clicking away 2026-06-12 00:58:13 +08:00
haipengno1 7de0de2313 实现 Redis 的查询功能 2026-06-12 00:20:17 +08:00
t8y2 3f7987aa59 fix(table-data): load metadata before initial query 2026-06-11 23:19:45 +08:00
t8y2 3640541222 fix(ci): update nested layout and grid tests 2026-06-11 22:55:24 +08:00
t8y2 c9d655324d fix(editor): preserve IME composition in comments 2026-06-11 22:55:16 +08:00
t8y2 a017e04d4c feat(structure): auto name new indexes 2026-06-11 22:40:10 +08:00
t8y2 57d03c2f08 feat(sidebar): support nested groups 2026-06-11 22:35:00 +08:00
t8y2 098d125bcb fix(ui): soften overflow scrollbars 2026-06-11 22:20:34 +08:00
haipengno1 cee8cbb95a
feat(sidebar): add copy name to database, schema and connection-group context menu 2026-06-11 22:16:13 +08:00
t8y2 c7fb855000 fix(jdbc): simplify driver selection and table edits 2026-06-11 22:13:27 +08:00
t8y2 70f7b464b7 feat(jdbc): install drivers from Maven bundles 2026-06-11 21:41:37 +08:00
t8y2 f969db571c fix(canvas): fallback to DOM scroller size when canvas viewport uninitialized 2026-06-11 20:58:52 +08:00
t8y2 514a01b3b1 feat: shared ErrorBanner component, CustomSaveHandler with preview, and cleanup 2026-06-11 20:24:56 +08:00
t8y2 bd3585f057 fix: draw selected cell left border for first visible column in canvas mode 2026-06-11 19:35:08 +08:00
t8y2 7923f4915e fix(elasticsearch): apply document filters in browser 2026-06-11 18:56:38 +08:00
t8y2 3f25a69d23 feat(mysql): add unsigned integer types to column type options 2026-06-11 18:34:51 +08:00
runstone 9ab41795d6 @
feat(ai): add agent loop with tool calling, fix connection routing and Gemini compatibility

## 背景说明
将 dbx AI 助手从单次 SQL 文本生成器升级为具备 tool calling 的数据库 Agent。
Phase 1 实现 Agent Loop 框架 + 只读工具(list_tables、get_columns)。
参考:Pi agent-core,.trellis/tasks/06-11-feat-ai-agent-loop-tool-calling-upgrade

## 修改内容
- 新增 agent_loop.rs:Agent Loop 核心,支持 OpenAI/Claude/Gemini Provider 的 tool calling,最大 10 轮,Ollama 自动降级为 text-only
- 新增 agent_tools.rs:read_only_tools (list_tables, get_columns) 的工具定义与执行器
- 新增 agent_events.rs:AgentEvent/ToolCall/ToolResult/ToolDefinition 类型定义
- 修改 ai.rs:AiMessage 新增 tool_call_id 字段
- 修改 lib.rs:注册 agent_events、agent_loop、agent_tools 模块
- 修改 routes/ai.rs & commands/ai.rs:新增 ai_agent_stream SSE 端点
- 修改 tauri.ts & http.ts:新增 AgentEvent 类型与 aiAgentStream 函数
- 修改 api.ts:注册 aiAgentStream 转发
- 修改 ai.ts:新增 runAgentStream,AiContext 增加 connectionId 字段
- 修改 AiAssistant.vue:接入 runAgentStream,解析 AgentEvent 渲染工具调用步骤
- 修改 en.ts / zh-CN.ts:新增 agentSteps 国际化文案

## 修复的问题
- [#I01] connectionName 误传为 connectionId → add connectionId to AiContext
- [#I02] agent loop 取消操作无效 → add cancel checks before each turn
- [#C01] TODO 缺少 issue 引用 → add PRD reference to TODO
- [#C02] stream_with_tools 命名不准确 → add clarifying doc comment
- [#C03] Gemini functionResponse.name 解析错误 → fix tool_call_id format and extraction

## 测试建议
- execute_get_columns:合法表名/空表名/SQL 注入字符拒绝
- call_openai_with_tools:空 choices/空 tool_calls/非 JSON arguments
- call_gemini_with_tools:空 candidates/parts 无 functionCall
- runAgentStream:有效 connectionId 正常调用
@
2026-06-11 18:27:24 +08:00
t8y2 a9882d5312 feat(sidebar): show table comments on hover 2026-06-11 15:09:56 +08:00
t8y2 21fd98d0ee feat: configurable toolbar visibility with settings UI 2026-06-11 13:32:39 +08:00
t8y2 4a264d638c feat: reorganize toolbar with more dropdown and add theme to appearance settings 2026-06-11 13:13:23 +08:00
t8y2 26d714909e feat(elasticsearch): model indices as first-class nodes 2026-06-11 12:52:47 +08:00
t8y2 521a3021c4 fix(clickhouse): load table index metadata 2026-06-11 12:23:28 +08:00
t8y2 6f15fa303c feat: support empty redis key separator for flat key display 2026-06-11 11:28:43 +08:00
SuLea-IT 89aa315a2d
Merge pull request #1037
Thanks!
2026-06-11 11:12:05 +08:00
t8y2 2b7264a531 feat: data grid search also matches column names 2026-06-11 11:08:51 +08:00
t8y2 bd66904c86 fix(grid): suppress drawer context menu 2026-06-11 11:04:06 +08:00
SuLea-IT 806d7c758b
feat: add SQL library history query entry points 2026-06-11 10:53:54 +08:00
SuLea-IT 634e26e8e7
Merge PR #1024 2026-06-11 10:47:42 +08:00
t8y2 8b58db30e8 fix(grid): remove redundant table data badge from toolbar 2026-06-11 01:44:16 +08:00
t8y2 d28c21f433 fix(tabs): use table icon for mongo and redis tabs 2026-06-11 01:39:25 +08:00
t8y2 c9203de1e7 feat(tabs): add duplicate tab feature in context menu 2026-06-11 01:37:58 +08:00
t8y2 c8fb749ef6 fix: improve web drop handler error handling and preventDefault placement 2026-06-11 01:27:16 +08:00
t8y2 7d2c17559f feat: support drag-and-drop .sql files into the app window 2026-06-11 01:24:26 +08:00
t8y2 922971fdd3 feat: add clear button to database selector in query editor 2026-06-11 01:10:05 +08:00
haipengno1 6265571182
feat(ssh): add ssh-agent authentication support (#1023)
Thanks for adding ssh-agent support, this is a great addition!
2026-06-11 00:39:30 +08:00
Scars 215b0cf7d4
fix(desktop): show horizontal data grid scrollbar (#1018) 2026-06-10 22:35:38 +08:00
t8y2 9793dc94b7 feat(driver): centralize database capabilities 2026-06-10 22:12:44 +08:00
t8y2 9f0dae1754 fix(grid): preserve table filter builder state 2026-06-10 20:08:18 +08:00
t8y2 e3b4aac84c fix(desktop): tighten frontend transitions 2026-06-10 19:20:30 +08:00
t8y2 7a0f89d3ad fix(jdbc): use schema tree for inferred db2 2026-06-10 18:19:53 +08:00
t8y2 d353d4673f feat(redis): add configurable key namespace separator 2026-06-10 17:46:48 +08:00
Scars 14d11a9933
fix(desktop): prevent app layout from shifting on editor focus 2026-06-10 17:01:31 +08:00
t8y2 c4839b6d13 fix(sql-library): use string compare instead of extname for import folder 2026-06-10 16:49:47 +08:00
t8y2 ca1d420d91 feat(grid): add enum column select editor for MySQL 2026-06-10 16:39:24 +08:00
t8y2 f10d152c53 feat: add table structure editing support for 6 missing SQL databases 2026-06-10 16:17:59 +08:00
Abeautifulsnow 1ca3081c2f
feat(ui): add readonly mode visual badge to sidebar and tab bar
Add visual indicators so users can distinguish readonly connections from
read-write connections at a glance:

- Sidebar: show a lock icon badge on readonly connection nodes
- Tab bar: show a lock icon with tooltip on tabs with readonly connections
- Add isConnectionReadonly() helper in tabPresentation.ts
- Add readOnlyBadge i18n key for all 6 locales (en, zh-CN, zh-TW, es, it, pt-BR)
2026-06-10 15:56:37 +08:00
Scars cb6c09e346
fix(desktop): add scrollable query result tabs (#986)
Thanks for the contribution!
2026-06-10 15:13:17 +08:00
John Jin 0bd07ccf46
feat: add InfluxDB support (#980) 2026-06-10 14:37:53 +08:00
t8y2 c13efc65f8 fix(connect): support informix-sqli JDBC URL parsing 2026-06-10 14:26:50 +08:00
t8y2 500d7c614b fix: resolve vue-tsc type errors in SqlPreviewPanel and DataGrid 2026-06-10 12:41:24 +08:00
t8y2 42a7ecdbed fix(grid): prevent scrollbar flicker during sidebar resize 2026-06-10 12:35:13 +08:00
t8y2 973e9f487a fix(sidebar): match table comments in search 2026-06-10 12:27:26 +08:00
t8y2 8df9484447 feat(ai): support auth methods 2026-06-10 12:14:36 +08:00
t8y2 8599ab8200 feat(data-grid): add SQL preview panel for pending data changes 2026-06-10 12:06:36 +08:00
t8y2 bfec556e9b feat(readonly): add read-only mode for all database connections
- Add read_only field to ConnectionConfig with backward-compatible serde defaults
- SQL classifier with first-keyword + embedded keyword defense layers
- PRAGMA white-listing for safe read-only operations
- Guard all write entry points: SQL, Mongo, Redis, etcd, MCP Bridge
- 16 unit tests covering edge cases (CTE, case insensitivity, string masking)
- 7-language i18n support
- Fast-fail at command/route level before pool creation

Closes #889
2026-06-10 11:58:18 +08:00
t8y2 1032772241 fix(redis): escape asterisk in fuzzy key search pattern 2026-06-10 11:16:29 +08:00
t8y2 410e3bbfcb feat(completion): suggest database qualifiers 2026-06-10 11:08:13 +08:00
runstone a440415e86 feat(readonly): add read-only mode for all database connections
## Background
Add a read-only toggle for database connections that blocks all write
operations (INSERT, UPDATE, DELETE, DROP, etc.) when enabled, allowing
only read queries (SELECT, SHOW, EXPLAIN, etc.). Closes #889.

## Changes

### Data Model
- Added `read_only: bool` field to ConnectionConfig (Rust struct, TS
  interfaces, and ConnectionConfigData deserialization layer)
- Used `#[serde(default, skip_serializing_if = "is_false")]` for
  backward/forward compatibility with existing configs

### Frontend UI
- Added "Read Only" checkbox in connection dialog
- 7-language i18n support (en/es/it/pt-BR/zh-CN/zh-TW)

### SQL Classification (query_execution_sql.rs)
- Added `is_write_sql()` with two-layer defense:
  - Layer 1: First-keyword check (must start with known read keyword)
  - Layer 2: Embedded dangerous keyword detection (catches CTE-wrapped
    writes like `WITH ... AS (DELETE FROM ...)`)
  - `FROM` keyword supported as DuckDB SELECT-less syntax indicator
- Added `check_read_only()` returning descriptive error with connection name
- Added 16 unit tests covering: pure reads/writes, CTE, case insensitivity,
  string literal masking, comment stripping, stored procedure calls, edge cases

### SQL Execution Guards (query.rs / transfer.rs)
- Added `check_read_only_for_connection()` and `_multi()` helper functions
  with lazy name clone (only allocates when read_only is true)
- 6 interception points: `do_execute`, MySQL batch, SQL Server batch,
  DuckDB batch, transaction execution, transfer execution

### Non-SQL Write Guards — Tauri Commands
- Added `ensure_connection_writable()` helper (connection.rs)
- Mongo: 6 write entry points (insert/update/delete, single + batch)
- Redis: 15 write entry points (SET, DEL, HSET, HDEL, LPUSH, LSET, LREM,
  SADD, SREM, ZADD, ZREM, EXPIRE, FLUSHDB, delete_keys, execute_command)
  - execute_command uses RedisCommandSafety classification to allow
    safe read commands through raw command interface
- etcd: 2 write entry points (put, delete)
- sql_file: SQL file execution guarded
- MCP Bridge: 4 write entry points (Insert/Update/Delete/SQL query)

### Non-SQL Write Guards — Web API
- Local `ensure_writable()` helper in each route module
- Redis: 12 write endpoints including classified execute_command
- Mongo: 6 write endpoints
- etcd: 2 write endpoints
- sql_file, table_import, transfer: early rejection

### Test Updates
- Updated ConnectionConfig construction in 7 test files with
  `read_only: false` initialization

## Defense-in-Depth
- Layer 1: Command/Route-level early rejection (saves resources)
- Layer 2: Core SQL classifier (`is_write_sql` — first keyword + embedded scan)
- Layer 3: Core execution-time interception (do_execute/transfer/transaction)
2026-06-10 10:58:52 +08:00
t8y2 3a52d961fc fix(completion): avoid table fallback for aliases 2026-06-10 10:51:41 +08:00
t8y2 083327a551 fix(redis): preserve asterisk wildcard in fuzzy key search 2026-06-10 10:36:52 +08:00
t8y2 b4e8190b52 fix(sqlite): prevent file launch from overwriting existing connections 2026-06-10 10:32:04 +08:00
t8y2 51fe5de98b fix(shortcuts): allow clearing keyboard shortcuts in settings 2026-06-10 10:25:06 +08:00
t8y2 edba8214b5 feat: show username/password fields for Access database connections 2026-06-10 08:37:18 +08:00
t8y2 2e021d37d1 fix(ci): add etcd to MCP type description, skip turso tests when unreachable 2026-06-10 04:52:35 +08:00
t8y2 1be4c6afcc fix: resolve clippy, typecheck, and test failures in CI (#933) 2026-06-10 04:40:23 +08:00
t8y2 d0bf6c3b53 feat(redis): persist command history across sessions (#933) 2026-06-10 04:34:45 +08:00
t8y2 d08385e75f feat: add Turso/libSQL database support
Turso is a distributed SQLite database built on libSQL, offering HTTP-based
connectivity with auth token authentication. This change adds full support:

- New DatabaseType::Turso and PoolKind::Turso variants
- TursoClient driver using libSQL HTTP pipeline API (/v2/pipeline)
- Bearer token auth via password or url_params (auth_token=)
- Multi-statement batch pipeline for transactional integrity
- Standalone BEGIN/COMMIT/ROLLBACK treated as no-ops (pipeline is auto-commit)
- Full metadata support: tables, columns, indexes, foreign keys, triggers, DDL
- Frontend: connection form, SQL completion (SQLite syntax), capability sets
- Built-in databases (SQLite/Turso/DuckDB/RQLite/Access) placed first in selector
- Unit tests (15) + integration tests against live libsql-server (12)
- Single connection pool, skips TCP probe

Closes #948
2026-06-10 04:18:05 +08:00
t8y2 d5bc3d065a feat: collapse less-used toolbar buttons into More menu when width < 1000px 2026-06-10 03:04:17 +08:00
t8y2 2a424b6f75 fix: add parent folder for SQL sync directory, show toast when no sync dir set 2026-06-10 02:59:00 +08:00
t8y2 39cf4779cd fix: add active tab underline in classic mode without connection color, use amber folder icons in SQL library 2026-06-10 02:54:05 +08:00
t8y2 9ffa4c41d9 feat: add SQL library panel with folder/file management, rename, and sync support 2026-06-10 02:46:10 +08:00
t8y2 d7a8f5d285 fix: add etcd to driver manifest, fix SQL library rename focus and remove dblclick rename 2026-06-10 02:45:47 +08:00
t8y2 2796e5c824 fix: enable etcd driver visibility in driver store UI 2026-06-10 02:05:49 +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
二丫讲梵 41758e6bb1
feat(connection): 增加可见数据库选择功能 (#944)
感谢 @eryajf 的贡献!此功能允许用户在创建或编辑连接时选择可见的数据库,支持多种数据库类型。
2026-06-09 20:56:39 +08:00
t8y2 ae483efb98 fix(editor): improve wrapped selection highlights 2026-06-09 20:53:47 +08:00
t8y2 9278630fd2 fix(desktop): stabilize tab overflow scrolling 2026-06-09 18:58:06 +08:00
t8y2 426b7911bc fix(editor): preserve sql tab cursor state 2026-06-09 18:18:18 +08:00
t8y2 80531c8765 fix(editor): restore sql viewport across activation 2026-06-09 18:07:10 +08:00
t8y2 e153d88091 fix(editor): preserve sql tab scroll position 2026-06-09 18:04:03 +08:00
t8y2 2050bee75c feat(query): show elapsed time while executing 2026-06-09 17:57:25 +08:00
t8y2 a5d9addbf3 feat(ui): show instant tooltips for truncated labels 2026-06-09 17:51:07 +08:00
cl1107 3995524e5d
feat(import): 添加 DataGrip 连接导入支持 (#936)
- 新增 datagripImport 模块解析 XML 配置
- 支持从 macOS Keychain 自动填充密码
- 添加 Keychain 读取的 Tauri 命令
- 更新多语言翻译文件
- 集成到侧边栏导入流程中
2026-06-09 16:45:59 +08:00
John Jin 354d21d086
feat(grid): 列是否可排序 (#935) 2026-06-09 16:43:53 +08:00
lexmin0412 20f4a4a5ce
fix(ui): prevent Ctrl+right-click from closing context menu immediately on macOS
Root cause: macOS emits a synthetic click event when the right mouse
button is released while holding Control. The outside-dismiss handler
was listening for click events in capture phase, which caught this
synthetic event and closed the menu right after it opened.

Fix: switch from click to pointerdown (with event.button === 0 guard)
for outside-dismiss detection. pointerdown fires on press before
contextmenu, so the right-button event (button:2) is filtered out
before the menu even opens, and the synthetic click is never seen.
2026-06-09 16:22:52 +08:00
t8y2 6a14b11efc fix(mongodb): skip SQL semantic diagnostics for MongoDB connections
MongoDB shell syntax like db.collection.find({}) was incorrectly
parsed as SQL, causing a "sql parser error" diagnostic in the editor.
Added MongoDB guards in shouldRunSqlSemanticDiagnostics and
refreshSemanticDiagnostics, matching existing Elasticsearch logic.

Also fix a pre-existing TiDB cloud URL param ordering test failure.
2026-06-09 16:20:50 +08:00
二丫讲梵 7798f2231e
fix(grid): 修复右键菜单选择时的单元格清理逻辑
感谢 @eryajf 的贡献!
2026-06-09 15:45:20 +08:00
t8y2 9c8a1c62b7 fix(grid): preserve transpose view state on data refresh 2026-06-09 14:56:41 +08:00
t8y2 6bc3068069 fix(grid): row detail now respects hidden column state
Row detail dialog was using displayableColumnIndexes instead of
visibleColumnIndexes, causing columns hidden via "hide null columns"
or manual hiding to still appear in the detail view.
2026-06-09 14:43:42 +08:00
t8y2 a13fcb9964 feat(redis): add JSON format/compress buttons in raw content view 2026-06-09 14:20:58 +08:00
t8y2 df4d590440 fix(navicat): improve NCX connection type detection with numeric codes and port fallback
- Add Navicat numeric ConnType codes (1-9) to typeMap for correct DB type mapping
- Add port-based inference fallback (6379→Redis, 27017→MongoDB, etc.)
- Expand typeMap with ClickHouse, Snowflake, KingbaseES, GaussDB, OceanBase
- Skip unrecognized connections instead of silently falling back to MySQL
2026-06-09 13:20:29 +08:00
t8y2 b2b1a7365b feat(connection): add custom color picker for connection editing (#913)
- Extend hexToRgba() to handle rgba/rgb input passthrough
- Add pipette button with native color picker + text input in popover
- Custom color and preset colors are mutually exclusive
2026-06-09 13:03:11 +08:00
t8y2 403681e1ed fix: prevent SQL autocomplete popup overlap 2026-06-09 12:43:57 +08:00
Holata Seminole 70dad4e00b
fix(mysql): require TLS for TiDB Cloud connections (#911)
Thanks!
2026-06-09 12:06:38 +08:00
SuLea-IT 5138c1a702
Add configurable SQL formatter settings (#908)
Thanks!
2026-06-09 12:05:17 +08:00
二丫讲梵 f8834aee09
feat(grid): 添加多行转置功能和相关界面支持 (#909)
- 新增多行转置状态管理
- 更新转置记录索引计算逻辑
- 增加多行转置切换开关及提示信息
- 更新国际化文件以支持多语言
2026-06-09 12:02:45 +08:00
t8y2 e76a223e8a fix(redis): allow resizing zset score column 2026-06-09 11:56:25 +08:00
t8y2 41c696ef22 perf(editor): optimize sql completion metadata lookup 2026-06-09 11:09:12 +08:00
t8y2 d4c87f5a4c fix(ui): increase shortcut pill width to prevent text clipping on Windows 2026-06-09 10:41:19 +08:00
t8y2 def1cacf77 feat(ui): add Mod+B shortcut to toggle sidebar 2026-06-09 10:38:03 +08:00
James-Leong 171c7cd8d7 fix(ssh): prevent duplicate SSH tunnels from concurrent pool creation (#891)
start_tunnel() and start_chain() had a check-then-act race condition:
multiple concurrent callers could all see an empty cache and each
spawn a new SSH tunnel. The tunnel that lost the insert race was
orphaned, causing queries routed through it to fail.

Use double-check locking with stale entry eviction: hold the lock for
the cache lookup, release it during the slow SSH handshake, then
re-check under the lock before inserting. If another caller already
created the tunnel, abort the duplicate and return the existing port.

Also check handle liveness on cache hits so that callers don't get a
dead port back when the background tunnel task has exited.

Add a matching re-check in the MongoDB connection pool creation path.

Add idle_timeout_secs connection option (default 60s) to preempt
server-side connection idle timeouts that cause "unexpected end of
file" errors on pooled MongoDB connections.

Reject MongoDB queries in the generic SQL execution path before any
pool or session-key creation. Previously, a typo in a MongoDB shell
command would fall through to executeMulti / execute_sql_statement,
which called get_or_create_pool_for_session and leaked a session-scoped
MongoDB Client (and SSH tunnel resources) before eventually returning
"Use MongoDB-specific commands".

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-09 10:29:42 +08:00
DengQingNian 32164d5aea
feat(grid): add layer preview for geometry columns with Leaflet map (#892)
* feat(grid): add layer preview for geometry columns with Leaflet map

* fix: restore dev:backend script with env vars and cargo watch

* chore: update pnpm-lock.yaml for leaflet and dom-to-image-more dependencies

---------

Co-authored-by: dqn <someonegdeng@qq.com>
2026-06-09 10:12:56 +08:00
DengQingNian 65d7a0ab8f
feat(structure): add DDL tab to table structure editor (#893)
Closes #836

Co-authored-by: dqn <someonegdeng@qq.com>
2026-06-09 10:12:22 +08:00
t8y2 80895fe273 fix(mongodb): support replica set connection URL parsing and timeout
Frontend: add regex-based MongoDB URL parser to handle multi-host URIs
that the WHATWG URL parser rejects. Backend: separate
server_selection_timeout from connect_timeout for multi-host URIs to
prevent topology discovery from being cancelled by tokio timeout.
2026-06-09 01:02:11 +08:00
t8y2 0ce6fde347 fix(grid): unify selected cell border thickness in DOM and canvas mode
DOM mode: replace box-shadow with outline to avoid stacking with row border-b.
Canvas mode: draw row border before selected cell overlay so selection uses
uniform color on all four sides; clamp top edge to prevent canvas clipping.
2026-06-09 01:01:50 +08:00
t8y2 45a6bb8a58 fix: parse PG brace-style array text in cell coercion to prevent false dirty
coercePostgresArrayValue() only handled JSON [...] format but editor
outputs PG {...} format.  When the user entered and exited edit mode
without changes, the string "{1,2,3}" failed to parse back to an
array, creating a false dirty detection via strict equality.

Add parsePostgresArrayText() recursive descent parser and return
oldValue reference when parsed result is equivalent.
2026-06-09 01:00:19 +08:00
t8y2 025a4fdcce fix: support tree-schema default DB selection in AI assistant 2026-06-09 00:44:04 +08:00
t8y2 03ade2ebba fix: allow custom theme editor to scroll 2026-06-09 00:25:11 +08:00
t8y2 c35929da7c fix(connection): clear errors after disconnect 2026-06-08 23:52:16 +08:00
t8y2 a414183ff0 fix(editor): scope SQL formatting to active tab 2026-06-08 23:08:50 +08:00
t8y2 befee2fd4c feat(postgres): support sequence objects 2026-06-08 22:54:14 +08:00
二丫讲梵 178a800ce8
feat(shortcuts): 添加打开设置的键盘快捷键
新增 openSettings 快捷键,默认绑定 Mod+,,用于触发设置对话框。

包含所有语言包的翻译、键盘快捷键文档更新,以及测试用例。
2026-06-08 21:52:26 +08:00
t8y2 19139a9b34 feat(docs): add offline driver downloads 2026-06-08 21:50:00 +08:00
二丫讲梵 2db46f10ff
🐛 fix(connectionStore): 修复分组连接时树节点的更新逻辑
确保连接到分组中的连接时,原地更新现有节点属性,避免添加重复的根节点。

使用 findNode 递归搜索替代 findIndex 只搜索根级别。原地修改节点属性而非替换整个对象,保留父子引用关系。
2026-06-08 20:10:08 +08:00
t8y2 9dfc2ba294 feat: support H2 file connections 2026-06-08 20:09:27 +08:00
t8y2 a3f045822c fix(dialog): adjust layout for DialogContent component 2026-06-08 18:45:30 +08:00
t8y2 5ec50ba15b fix(postgres): support editing array cells 2026-06-08 18:31:05 +08:00
Yong Studt 2628fb8374
feat(elasticsearch): add SQL-model execution with mapping-aware completion
- Route SELECT * FROM <index> through /_search for simple browses; aggregates/projections stay on /_sql
- Drive completion columns from /_mapping (flattened dotted fields, multi-fields)
- Switch editor completion to SQL when the active statement starts with SELECT/WITH on ES
- Skip generic SQL semantic diagnostics for ES (hyphenated wildcard indices caused 500s)
- Wire ES into server-side pagination plan; derive completion context from line blocks
- Fix result-grid pagination exceeding in-memory result sets (allRowsLoaded)
2026-06-08 17:53:05 +08:00
t8y2 465ed195cf fix(sql): decode opened SQL files with charset fallback 2026-06-08 17:45:09 +08:00
t8y2 3fc6c0eaba fix(ai): use local provider icons 2026-06-08 17:11:12 +08:00
t8y2 58c3887464 fix(editor): bundle SQL formatter for offline use 2026-06-08 14:15:16 +08:00
t8y2 2a3844f2c6 feat(results): add execution summary view 2026-06-08 14:13:47 +08:00
t8y2 f1a94262b5 feat(user-admin): add database user privilege management 2026-06-08 13:47:56 +08:00
t8y2 03f273bb4d fix(grid): sharpen canvas rendering under ui zoom 2026-06-08 12:46:56 +08:00
t8y2 b777cddde5 feat: add user-facing debug logs 2026-06-08 12:16:49 +08:00
vrustx 14fa15531f
fix(sidebar): multi-select drag, blank-click deselect, empty-group-name (#681) (#823)
Three independent connection-list bugs:

1. Multi-select drag only moved one row. The drag system tracks a single
   draggedId and ignored selectedTreeNodeIds. The drop callback now expands
   to the full selection when the grabbed row is part of it, and the store
   gains reorderSidebarEntries() to move them together.

2. Clicking the blank tree area didn't clear the selection (notably in
   double-click activation mode). Row clicks now stopPropagation and the
   tree containers clear the selection on click, so only blank clicks reset.

3. Creating a group then submitting an empty name dissolved ALL groups.
   Enter (@keydown.enter) and the following @blur both fired finishRenameGroup;
   the first call rebuilt the tree and recycled props.node onto another group,
   so the second deleted the wrong one, cascading. Guard against double
   invocation and treat an empty name as a cancel (never delete here — deleting
   a group stays in the context menu).

Verified end-to-end on the web build: multi-select drag nests both
connections under the group; blank-click clears selection; empty-name Enter
keeps all groups intact. pnpm check is green.

Co-authored-by: vrustx <vrustx@vrustxdeMac-mini.local>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 02:09:26 +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 a5659d7637 fix(mongodb): support getIndexes shell command 2026-06-08 01:25:44 +08:00
vrustx 094dfb1f06
fix(sidebar): locate-in-sidebar reaches the table after a stale tree cache (#715) (#822)
After an app update (typically >15min since last use), the on-disk schema
tree cache is past its TTL and counts as stale. When "locate in sidebar"
loads the connection's databases, the stale cache is served synchronously
and an async `refreshStaleTreeNode` fires in the background; that refresh
replaces the database node with a fresh one whose tables haven't loaded
yet, evicting the node that locate just populated. By the time
`findNodePathForActiveTab` runs, the target table isn't in the tree, so
locate only reaches the database. After a restart the cache is fresh, no
refresh races, and locate works — matching the report.

Make `ensureTreeLoadedForTab` accept `{ force }` (loads everything via
awaited calls, bypassing the stale-cache fire-and-forget path) and, in
`locateActiveTabInSidebar`, retry once with force when the first
`findNodePath` misses. Fresh-cache locates still succeed on the first
pass and never force (no regression); `refreshStaleTreeNode` is untouched.

Co-authored-by: vrustx <vrustx@vrustxdeMac-mini.local>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 01:08:23 +08:00
t8y2 e6062b2b07 feat(etcd): add agent-backed etcd support 2026-06-08 00:58:42 +08:00
t8y2 7bd8d29a79 feat(sidebar): lazily load database object groups 2026-06-07 23:44:40 +08:00
t8y2 cdad4a32ff fix(editor): soften selection match highlights 2026-06-07 23:13:31 +08:00
vrustx 54de28d583
feat(grid): show column data types in result header (#669) (#820)
The data grid header only showed column names, and column types were
available only via tableMeta (open-table view). Arbitrary query results
(e.g. `select * from pg_depend`) therefore showed no type at all, which
is exactly the case the reporter hit.

Backend: add `column_types` to QueryResult (serde-default, backward
compatible) and populate it for the native drivers where the type is
readily available — PostgreSQL, MySQL, SQL Server, ClickHouse. Other
drivers leave it empty for now (no behavior change); schemaless stores
(Mongo/Redis/ES) have no column types.

Frontend: render a type row under each column name in the grid header,
color-coded by type. The type is resolved from tableMeta first (richer,
includes precision) and falls back to the query result's column_types by
index. Add a `showColumnTypesInHeader` setting (default on) and keep the
msgpack tab-result cache compatible. The source-selection logic is
extracted to lib/dataGridColumnType.ts with unit tests.

Co-authored-by: vrustx <vrustx@vrustxdeMac-mini.local>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 22:45:46 +08:00
t8y2 4a64240e8a feat: highlight selected SQL matches 2026-06-07 17:43:11 +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 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
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
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 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 fecefb1589 fix(grid): refine total row counting 2026-06-06 11:13:47 +08:00