Commit Graph
1381 Commits
Author SHA1 Message Date
LRcoding 430f097602 fix(hana): improve metadata fallback and SQLScript parameters 2026-07-08 17:25:34 +08:00
Abeautifulsnow a5359798dc feat(redis): add auto-refresh countdown for key TTL display
* @
feat(redis): add auto-refresh countdown for Redis key TTL display

在 Redis 值查看器的 TTL 徽章旁增加自动刷新按钮,选中时显示 TTL 实时倒计时
(每秒递减),倒计时归零自动刷新数据,刷新按钮持续旋转。TTL 到期或网络异常
时自动关闭自动刷新避免死循环。

改动:
- RedisValueViewer.vue:新增 autoRefresh 状态、定时器与倒计时逻辑,模板增加
  Clock 切换按钮,RefreshCw 按钮支持 animate-spin 旋转
- load() 内复位倒计时;onBeforeUnmount 清理定时器

修复(review):
- #I01 TTL 到期/连接断开后自动关闭 autoRefresh 避免无限重试
- #C01 load() reject 增加 .catch() 处理 UnhandledPromiseRejection

i18n:zh-CN / zh-TW / en / ja / es / it / pt-BR 7 种语言补充 autoRefresh key
@

* @
test(redis): extract auto-refresh logic and add unit tests

将自动刷新核心决策逻辑提取为 lib/redis/redisAutoRefresh.ts 纯函数模块,
并编写 11 个单元测试覆盖状态机转换、TTL 显示计算和自动停止条件。

新增:
- lib/redis/redisAutoRefresh.ts:computeAutoRefreshTick / shouldStopAutoRefresh /
  computeDisplayTtl 纯函数
- lib/__tests__/redis/redisAutoRefresh.spec.ts:11 个测试用例

重构:
- RedisValueViewer.vue 改用提取后的纯函数,确保测试覆盖即实际运行逻辑
@
2026-07-08 15:37:27 +08:00
zipg 3a35f5b911 fix(oceanbase): update default connection port 2026-07-08 13:31:45 +08:00
zipgandzipg ae288a0345 fix(sql): 兼容 MySQL 建表注释选项拆分 (#2837)
Co-authored-by: zipg <4047349+zipg@users.noreply.github.com>
2026-07-08 13:29:55 +08:00
Abeautifulsnow 0901f176b0 fix(grid): preserve current page on data refresh instead of resetting to page 1
* @
fix(grid): preserve current page on data refresh instead of resetting to page 1

When refreshing table data (toolbar button, Ctrl+R, or auto-refresh), the
offset was hardcoded to 0, causing pagination to always jump back to the
first page. This was frustrating for users viewing later pages.

Use the current page offset (currentPage - 1) * pageSize so the user
stays on the same page after refresh. In infinite-scroll mode, the
offset still evaluates to 0 because resetInfiniteScrollState() sets
currentPage = 1, so behavior is unchanged.
@

* @
fix(grid): auto-redirect to last page when refreshed page no longer exists

Extends the refresh pagination fix with a safety net: when data is deleted
while viewing a later page (e.g. page 5 with only 2 pages remaining), the
grid auto-navigates to the last available page instead of showing an empty
page.

Uses a transient isRefreshingData flag to distinguish refresh/rollback
from normal pagination navigation, avoiding false triggers.
@

* Revert "@"

This reverts commit ff0bf0bb31.

* @
fix(grid): auto-redirect to last page when refreshed page no longer exists

When data is deleted while viewing a later page, the grid now auto-navigates
to the last available page instead of showing an empty page.

Uses a transient isRefreshingData flag to distinguish refresh/rollback
from normal pagination, and a loading-transition watcher (true->false)
placed after displayedTotalRowCount declaration to avoid TDZ errors.
@

* @
test(grid): add pagination offset-preservation and auto-redirect tests

Cover the two new behaviors added to DataGrid.vue:

1. dataGridPagination.test.ts — auto-redirect page calculation:
   - page beyond last page after data deletion → triggers redirect
   - page still valid → no redirect
   - fewer rows than one page → redirects to page 1
   - total=0 / total=undefined → guard prevents redirect

2. useDataGridActions.test.ts — offset preserved on reload:
   - onReloadData(offset=400) passes offset=400 to build-table-select-sql
   - resultPageOffset stored as 400 (not reset to 0)
@
2026-07-08 13:28:36 +08:00
t8y2 2929b1c035 feat(hive): add Kerberos connection options 2026-07-08 13:23:21 +08:00
zipgandzipg 5b70626cf7 Improve: 缩短格式化 JSON 编辑提示时长
* Improve: 调整格式化 JSON 编辑提示频率

* Improve: 减少格式化 JSON 编辑提示次数

---------

Co-authored-by: zipg <4047349+zipg@users.noreply.github.com>
2026-07-08 12:10:46 +08:00
author.zero 76eab8856f fix(log): use local timezone for desktop logs (#2830)
* fix: use local timezone for desktop logs

* test: cover debug log local timestamps

* style: format desktop log formatter
2026-07-08 11:18:52 +08:00
t8y2 15d4dc6e2e fix(sqlserver): omit display width for integer types 2026-07-08 11:05:45 +08:00
gggaiitx 6041c3f70b fix(sql): quote all IN-list values uniformly in expaste
Previously, pure numeric values (e.g. 90001543) in the IN clause were not quoted while values with leading zeros (e.g. 00040787) were, causing inconsistent quoting. Now all non-NULL values are uniformly quoted.
2026-07-08 10:36:01 +08:00
t8y2 d2874bf1bb fix(grid): smooth canvas column interactions 2026-07-08 09:45:28 +08:00
t8y2 611f19fd8b fix(sql): keep column completion after subqueries 2026-07-08 00:53:05 +08:00
t8y2 b3f09219ab fix(sql): cover MySQL dynamic SQL variables 2026-07-08 00:21:27 +08:00
onenewcode ba81fa4497 feat(redis): support multiple value formats in viewer (#2766)
* feat(redis): improve value decoding and viewer formats

* fix(redis): preserve stream field/value blobs

* Revert "fix(redis): preserve stream field/value blobs"

This reverts commit 168af0619a.
2026-07-08 00:13:20 +08:00
t8y2 ad9841ab77 fix(import): allow selecting create-table column types 2026-07-08 00:02:47 +08:00
二丫讲梵 7eff6e544b feat(sqlCompletion): 优化表别名建议功能,避免使用 SQL 关键字 (#2805) 2026-07-08 00:01:24 +08:00
t8y2 8364f468a0 fix(sqlserver): use legacy encryption for fallback 2026-07-07 22:51:04 +08:00
zipg 5b25299417 fix(zookeeper): prevent root znode create path 2026-07-07 22:44:04 +08:00
miracle 9288717ac4 fix(sql): ignore native SQL variables 2026-07-07 22:24:48 +08:00
zipg 6cba08fccb fix(kingbase): 修复连接与元数据查询异常 2026-07-07 22:12:36 +08:00
t8y2 63ff9321a4 fix(editor): cover cross-database column completion 2026-07-07 21:51:04 +08:00
zipgandzipg bcabce3686 fix(ui): 优化工具栏和历史筛选区溢出表现
Co-authored-by: zipg <4047349+zipg@users.noreply.github.com>
2026-07-07 21:42:44 +08:00
t8y2 42eaddac45 feat(editor): improve qualified table completion 2026-07-07 18:57:46 +08:00
t8y2 3d935f7eb6 feat(editor): 默认字体改用 Fira Code 优先回退链 2026-07-07 18:53:19 +08:00
t8y2 5a9ab5c036 feat(editor): add configurable line comment shortcut 2026-07-07 18:32:57 +08:00
一颗红心andCursor 184e235999 feat: synchronize tab titles with saved SQL file renaming (#2739)
- Bidirectional sync between SQL library and tab titles
- Case-insensitive .sql extension via shared ensureSqlExtension
- Revert tab title when rename persistence fails

Close #2648

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-07 18:09:01 +08:00
gggaiitx 9410bf42a9 fix: preserve large integer precision when formatting JSON in value editor (fixes #2765)
* fix: preserve large integer precision when formatting JSON in value editor (fixes #2765)

* fix: add missing showDiagramDialog to useNavigationTargets in AiAssistant
2026-07-07 16:48:00 +08:00
二丫讲梵 326c4f5495 ✨ feat(dataGrid): 增加复制逐行插入语句的功能 2026-07-07 16:39:38 +08:00
t8y2 b74e97d530 fix(sql-file): remove file selection radius 2026-07-07 16:26:39 +08:00
zipg 3497df033f feat(grid): support searching filter columns 2026-07-07 16:19:29 +08:00
zipg d50f1761d6 fix(sql): handle database drag and routine export 2026-07-07 15:54:48 +08:00
zipg 14c383cb43 fix(sql): improve SQL library selection style 2026-07-07 15:51:48 +08:00
zipg d90847bbba feat(ai): support SQL library file references 2026-07-07 15:39:10 +08:00
LRcoding fc01cea80f fix(oracle): preserve plsql block terminators 2026-07-07 15:29:43 +08:00
jischeng c3893bf314 feat(spark): add Apache Spark database driver with catalog support
* feat(spark): add Apache Spark database driver

Spark Thrift Server speaks the HiveServer2 protocol, so the Spark driver
reuses the hive-jdbc agent runtime. Registers spark (agentKey=spark,
defaultPort=10015) across the manifest, DatabaseType enum, agent catalog,
SQL dialects, connection dialog, and a SparkAgent built on AbstractJdbcAgent.

* feat(spark): add catalog support and official logo

SparkAgent now supports Spark 3.4+ multi-catalog (Paimon, Lance, Iceberg)
via catalog=<name> in url_params, mirroring the StarRocks catalog flow:
- afterConnect switches to the configured catalog via USE <catalog>
- listDatabases returns the catalog name when SHOW DATABASES is empty
  (catalogs like Lance expose tables at the catalog root with no databases)
- listTables uses SHOW TABLES IN <catalog>[.<schema>] uniformly, working
  for both catalog-root tables (Lance) and catalog.schema tables (Paimon)
- setSchemaSQL qualifies USE with the catalog to prevent resetting to
  spark_catalog on schema switches
- buildJdbcUrl omits database from the URL path

Also replaces the placeholder lightning icon with the official Apache Spark
logo (spark-logo.png from spark.apache.org).

* fix(spark): use catalog-qualified DESCRIBE for column retrieval

getColumnsFromDescribe used USE <schema> + DESCRIBE <table>, which
generated USE `catalog`.`catalog` when the sidebar passed the catalog
name as the schema (Lance case where the catalog is the only node).
This failed and fell back to JDBC metadata which also returned nothing,
resulting in an empty DDL (CREATE TABLE ... ()).

Now uses DESCRIBE `catalog`.`table` directly when a catalog is
configured, bypassing USE entirely. Also fixes setSchemaSQL to treat
schema == catalog as catalog-only (no .schema suffix).

* fix(ci): add spark to metadata coverage matrix and BRIDGE_REQUIRED_TYPES

- agents/metadata-constraint-coverage.tsv: register spark as
  intentional-fallback (SHOW TABLES/SHOW DATABASES, like Hive/TDengine)
- packages/node-core/src/diagnostics.ts: add spark to
  BRIDGE_REQUIRED_TYPES (mcpMode=bridge, matches manifest)

* fix(ci): add spark to DBX_CONNECTION_TYPE_DESCRIPTION in mcp-server

The driver-manifest test asserts every manifest dbType appears in the
MCP server's connection type description string.
2026-07-07 14:36:22 +08:00
t8y2 586faf28c8 feat(diagram): open table data from graph cards 2026-07-07 14:26:52 +08:00
一颗红心 c60b23ffe7 fix: swap upload and download icons in various components for consistency 2026-07-07 14:17:33 +08:00
52835f1eb0 fix: show timeout action for SQL execution timeouts
* fix: show timeout action for SQL execution timeouts

* fix: detect agent RPC timeout in query error action

---------

Co-authored-by: zipg <4047349+zipg@users.noreply.github.com>
Co-authored-by: t8y2 <1156263951@qq.com>
2026-07-07 13:50:29 +08:00
Abeautifulsnow 09f9e44661 fix(ai): make reasoning expand/collapse consistent across messages
fix(ai): make reasoning expand/collapse consistent across messages

Replace per-message expandedReasoning Set with a global reasoningExpanded
boolean ref so all messages share the same toggle state. Default to collapsed.
This avoids the flip-flop where reasoning auto-expands during streaming and
collapses afterward, requiring repeated manual toggles.

- Replace expandedReasoning (Set<number>) with reasoningExpanded (boolean)
- Remove per-index toggleReasoning; use global flip instead
- Template uses reasoningExpanded instead of expandedReasoning.has(i) || msg.isThinking
@
2026-07-07 13:36:53 +08:00
t8y2 e67e7730d1 refactor(data-grid): drop unused gridRef/scrollbarGutter options from useDataGridColumnResize 2026-07-07 13:24:05 +08:00
t8y2 6e7f0578b6 fix(saphana): keep DO blocks together 2026-07-07 13:23:53 +08:00
LRcodingandzero f41c7dd6a0 fix(toolbar): sync SQL file tree visibility setting
Co-authored-by: zero <zero@zeroMacmini.local>
2026-07-07 13:18:42 +08:00
二丫讲梵 2cbce44628 feat(data-grid): 优化查询结果展示宽度 2026-07-07 13:00:59 +08:00
LSD a7be9eed13 fix(gridfs): support bulk download and paged browsing (#2743) 2026-07-07 12:43:07 +08:00
t8y2 65af804099 feat(editor): allow disabling SQL snippets 2026-07-07 12:36:51 +08:00
zipgandzipg 705bacba04 feat(editor): add ExPaste paste-as-IN-condition helper (#2746)
* feat: add ExPaste SQL IN condition helper

* fix: restrict ExPaste to SQL-like editors

---------

Co-authored-by: zipg <4047349+zipg@users.noreply.github.com>
2026-07-07 12:33:49 +08:00
t8y2 29495a7220 fix(sqlfile): align panel header style 2026-07-07 12:29:39 +08:00
t8y2 86d3973eae fix(sidebar): flatten tree selection highlight 2026-07-07 12:19:56 +08:00
t8y2 a5b3409985 fix(sidebar): reduce connection selection repaint cost 2026-07-07 12:09:25 +08:00
t8y2 1db11ea145 feat(postgres): support batch table cascade actions 2026-07-07 11:57:44 +08:00