fix(ai): restore global reasoning toggle accidentally reverted by d90847bb
Commit 09f9e446 replaced per-message expandedReasoning (Set<number>) with
a global reasoningExpanded boolean ref, defaulting to collapsed so all
messages share the same toggle state. This avoided the flip-flop where
reasoning auto-expanded during streaming and collapsed afterward.
Commit d90847bb (SQL file references) inadvertently reverted this when
resolving merge conflicts during its large template restructure.
Changes:
- Replace expandedReasoning (Set<number>) with reasoningExpanded (ref(false))
- Replace per-index toggleReasoning(i) with global toggleReasoning()
- Template uses reasoningExpanded instead of expandedReasoning.has(i) || msg.isThinking
@
* feat(objects): add checkbox column toggle for object browser
- Add objectBrowserShowCheckbox setting (default: false) to EditorSettings
- Checkbox column hidden by default; auto-shows when any tables are selected
- Toolbar button toggles multi-select mode (active state highlighted in primary color)
- Clearing the toggle also clears all selections
- Add i18n key objects.toggleCheckbox in en/zh-CN
Closes#2748 (part 2)
* feat(objects): add grid view mode for object browser
- Add objectBrowserViewMode setting (list | grid, default: list) to EditorSettings
- Toolbar segmented control toggles between list and grid views, persisted across sessions
- Grid view renders cards (icon + name + type + row count) in a responsive auto-fill layout
- Reuses existing sort, search, filter, multi-select and context menu
- Partition children not expandable in grid mode (minimal version)
- Add i18n keys objects.viewList/objects.viewGrid across all locales
- Backfill objects.toggleCheckbox in es/it/ja/pt-BR/zh-TW (missed in prior commit)
Refs #2748
* fix(objects): redesign grid view cards for visual polish
- Center-align content (icon + name + metadata) for a proper tile look
- Enlarge type icons (h-7) so color coding is visible at a glance
- Merge type label and row count on one line with separator
- Reduce internal spacing (gap-1.5) and tighten padding
- Replace background hover with border glow + shadow for cleaner feedback
- Narrow min card width (150px) for denser grid, add align-content:start
- Softer rounded-lg corners
Refs #2748
* fix(objects): polish grid view card visual details
- Add colored circle background behind icons (type-matched opacity-10)
- Increase name font from text-xs to text-sm for better legibility
- Separate row count into a primary-tinted badge (only shown when > 0)
- Keep type label clean without mixing row count inline
Refs #2748
* fix(objects): refine grid card min-width, icon shadow, and type label size
* @
feat(object-browser): align tile/grid card metadata with list view columns
Add the metadata categories present in the list view but missing from
the tile/grid card view (objectBrowserViewMode === "grid"):
- Size pill (totalBytes) next to the existing rows pill in the stats row
- Timestamps row showing created_at · updated_at (per-row conditional)
- Comment row (truncated, per-row conditional, with hover tooltip)
Each card now shows: icon, name, type label, rows pill, size pill,
timestamps (when present), and comment (when present) — matching the
same metadata categories the list view displays across its 8 columns.
Also fix a pre-existing bug in the list view where the totalBytes
column tooltip (:title) used formatObjectBrowserCount instead of
formatObjectBrowserBytes, showing a count-formatted number instead
of a byte-formatted size string.
@
* @
feat(object-browser): add sort selector in toolbar for grid/list views
The list view has column header click-to-sort but the grid/tile view
had no way to change sort order. Add a compact sort selector in the
toolbar that works identically in both views:
- Native <select> dropdown with all 7 sort keys (name, type, rows,
size, created, updated, comment) using existing column i18n labels
- ArrowUp/ArrowDown direction toggle button with localized tooltip
- Positioned between schema selector and view toggle in the toolbar
- Shares the existing sortKey/sortDirection/toggleSort logic — list
view column headers continue to work as before
- Accessible: aria-label on select, title on direction button
i18n: added sortAsc/sortDesc/sortBy to en.ts and zh-CN.ts
@
* @
fix(object-browser): make sort key options reactive to available data
sortKeyOptions was a static array that always included created_at and
updated_at even when no row had data for those fields. Sorting by an
empty field is a no-op that silently confuses users.
Convert to a computed that mirrors the list view column visibility logic
(hasCreatedAt / hasUpdatedAt): the two time-based sort options only
appear when at least one loaded row has that field populated.
Follows design decision: sort selector remains visible in both list and
grid views (plan B), acting as a shared sort state indicator.
@
* @
fix(object-browser): reset sortKey when selected option disappears from options
When sortKeyOptions loses created_at or updated_at (e.g. after a schema
switch clears all rows), sortKey could remain set to a key no longer in
the dropdown, causing the <select> to show a blank selection.
Add a watch on sortKeyOptions that resets sortKey to "name" and
sortDirection to "asc" whenever the current key is no longer present.
@
* chore(i18n): autofill new translations
* perf(object-browser): virtualize tile/grid view with RecycleScroller
Replaces the flat v-for over filteredRows with a row-chunked
RecycleScroller, matching the list view. Previously, switching to tile
mode on a schema with thousands of tables mounted every card and its
CustomContextMenu at once, stalling the UI for several seconds.
Changes:
- gridRows computed: chunks filteredRows into rows of gridColumns cards
- ResizeObserver on the grid container drives gridColumns; initial read
uses getComputedStyle to match contentRect.width and avoid a 1-frame
column jump on mount
- objectGridRowHeight computed: item-size adapts to whether the dataset
has timestamp/comment rows, minimising wasted row space
- watch(gridContainerRef) re-attaches the observer across list<->grid
toggles; onBeforeUnmount cleans up
- scrollObjectsToTop() resets scroll position on sort, search,
object-type filter and view-mode changes
- CSS: new .object-browser-grid-wrapper / -scroller / -row classes with
will-change / contain parity with the list scroller
---------
Co-authored-by: dbx-i18n-bot <github-actions[bot]@users.noreply.github.com>
* Feat: Add PostgreSQL transfer ownership preview and resolution
- Add ownership policy support for data transfers: preserve, skip, and reassign missing owners
- Preview missing PostgreSQL roles before creating target schema objects
- Show ownership confirmation dialog when target roles are missing
- Allow users to skip ownership changes or reassign missing owners to the target connection user
- Add Tauri and HTTP API support for ownership preview
- Apply ownership statements according to selected policy during PostgreSQL transfers
- Add Chinese localization for ownership confirmation UI
* Feat: Add ownership confirmation localization
- Add ownership confirmation messages for supported desktop locales
- Include skip and confirm labels for ownership handling
- Update transfer test requests to use Preserve ownership policy
* @
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)
@
* fix: preserve large integer precision when formatting JSON in value editor (fixes#2765)
* fix: add missing showDiagramDialog to useNavigationTargets in AiAssistant
* 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.