Commit Graph

198 Commits

Author SHA1 Message Date
t8y2 9b41bb8d81 fix: exclude test files from vue-tsc type checking in CI build 2026-05-25 10:59:30 +08:00
t8y2 6107778358 feat: support customizable SQL snippet templates with custom trigger keys
Users can now create, edit, and delete SQL snippet templates from the settings dialog (new "Snippets" tab). Each template has a label, trigger prefix, and SQL body. Built-in defaults are modifiable and can be restored. Templates persist across sessions via the existing settings storage.
2026-05-25 01:43:09 +08:00
t8y2 a124298cba fix: preserve expanded tree node state during background stale cache refresh 2026-05-25 00:26:31 +08:00
t8y2 ae49d87166 fix: sync gutter element heights during editor font size zoom
CSS variable changes alone don't trigger CodeMirror's measure cycle, so
gutter element heights would diverge from content line heights. The fix
reconfigures the font theme compartment (throttled to once per rAF) to
force a proper state transition → measure → syncGutters path.

Also adds missing fontFamily on .cm-gutters and i18n for "Follow app theme".
2026-05-25 00:23:44 +08:00
t8y2 dbd2b2bab5 fix: update tests for table structure editor tab conversion and type/length split
- Remove deleted Dialog.vue references from dialogOpenWatcher and structure tests
- Update presentation test assertions for tab layout and SearchableSelect
- Add schema to newQueryContext expected results (schema propagation)
- Make queryStore i18n resilient to missing Vue app context (tests)
- Fix regex patterns for oxfmt-formatted code
2026-05-24 22:52:58 +08:00
t8y2 75e97001ec style: fix formatting (oxfmt + cargo fmt) 2026-05-24 22:38:16 +08:00
t8y2 3f119cc9cf fix: use fixed column widths for type/length columns in table structure editor 2026-05-24 22:32:59 +08:00
t8y2 62b4905e54 feat: split data type into type+length columns with SearchableSelect, add Shiki SQL highlighting
- Separate data type input into type dropdown (SearchableSelect with allowCustom)
  and length input, Navicat-style
- Add comprehensive DATA_TYPE_OPTIONS for all 6 database engines, validated
  against official docs
- Add Shiki SQL syntax highlighting to the SQL preview panel
- Add i18n keys for new UI elements (typePlaceholder, length, noMatchingType)
2026-05-24 21:43:03 +08:00
t8y2 801434e423 refactor: convert table structure editor from modal dialog to tab
Replace the dialog-based TableStructureEditorDialog with a tab-based
TableStructureEditor, making it consistent with query editors, data
viewers, and object browsers. Users can now switch between editing
table structure and running queries freely.
2026-05-24 21:17:35 +08:00
t8y2 72d5435535 feat: add primary key editing to table structure editor
Add PK checkbox column in Vue dialog, alter_primary_key capability flag,
build_primary_key_sql() for PostgreSQL/MySQL ALTER TABLE PK changes,
and i18n labels in zh-CN/en/es.

Includes flicker fix (silent reload after apply) and move ready badge
to SQL preview header.
2026-05-24 20:37:59 +08:00
t8y2 479f4623db feat: add alterPrimaryKey capability flag to frontend 2026-05-24 20:16:27 +08:00
t8y2 7b9a04ff3e fix(ui): propagate schema when creating tabs and new queries
Table/data tabs were missing schema in createTab, so the toolbar
"new query" button couldn't inherit schema from the active tab.
Also add schema to NewQueryTarget so resolveNewQueryTarget
propagates it from both sidebar and active tab contexts.
2026-05-24 19:11:06 +08:00
t8y2 872569265d fix(sql): add databaseType parameter to findStatementAtCursor function 2026-05-24 10:30:58 +08:00
t8y2 1f666f99b3 fix(duckdb): support multiple schemas beyond default "main"
DuckDB was not recognized as a schema-aware database, so only the
default "main" schema was shown in the object tree and schema selector.
Added DuckDB to schema-aware type lists, implemented schema listing via
information_schema.schemata, and replaced hardcoded table_schema = 'main'
with parameterized queries.
2026-05-24 10:26:09 +08:00
t8y2 207e8e63ad feat(grid): add copy column name on header right-click context menu 2026-05-23 21:52:40 +08:00
t8y2 24c334ef61 feat(i18n): add completion and search translations, remove hardcoded Chinese strings
- Add editor.completion (46 keys) and editor.search (10 keys) i18n sections
  across zh-CN, en, es locales, including 38 SQL function descriptions
- Create SqlCompletionTranslations interface in sqlCompletion.ts, pass via
  buildSqlCompletionItems/buildSqlCompletionItemsFromContext parameters
- Replace static FUNCTION_DESCRIPTIONS Map with getFunctionDescriptions(t?)
- Replace 11 hardcoded search toolbar strings in QueryEditor.vue with t()
- Fix YashanDB product label in connectionUrl.ts
2026-05-23 15:47:18 +08:00
t8y2 c7fa74f90c feat(sql): progressive autocomplete enhancements — fuzzy matching, type-aware hints, and more
- Fuzzy matching with character-order scoring (typo/abbreviation tolerant)
- Context-aware keyword filtering (DDL hidden in SELECT, etc.)
- CTE/subquery column resolution from parsed definitions
- INSERT column list completion
- Schema name completion
- Smart GROUP BY non-aggregated column suggestions
- Better FK join inference (shared FK, parent_id, created_by patterns)
- Table alias suggestions
- SELECT * expansion to explicit column list
- Type-aware comparison value hints (string/numeric/boolean/NULL)
- Function signature inline documentation (30+ functions)
- History-based learning ranking via recordCompletionSelection()
- Epoch-based request debouncing in QueryEditor.vue
- Irregular plural handling for singular table names
- Quoted identifier parsing for dots in names
2026-05-23 15:31:05 +08:00
t8y2 26878e749a fix(oracle): default to service_name when oracle_connection_type is unset
The recent fix to respect explicit JDBC URLs in the Oracle agents exposed a
default mismatch: the Rust side generated SID-format URLs when the config
field was missing, but the old Java fallback always used service_name format.
Switch the default and retry logic so existing connections without an explicit
oracle_connection_type keep working.
2026-05-23 15:07:28 +08:00
t8y2 6b6f7694fd fix(app): separate view source tabs and trim view metadata 2026-05-23 13:08:19 +08:00
t8y2 8845ac061d style(grid): shrink local filter and column visibility popover sizing, fix dark mode 2026-05-23 12:53:10 +08:00
t8y2 cd5d1b928d feat(grid): add configurable keyboard shortcuts for copy and delete current row 2026-05-23 12:44:49 +08:00
t8y2 00fd206a57 fix(schema): auto-select schema when creating query from schema context menu
When right-clicking a PostgreSQL schema node and selecting "New Query",
the schema dropdown in the editor toolbar was not pre-selected. Pass
node.schema to createTab so the editor initializes with the correct schema.
2026-05-23 12:33:14 +08:00
t8y2 e62ad97bcd feat(editor): enhance SQL completion icons and styles 2026-05-23 12:33:14 +08:00
t8y2 d8650df323 feat(diff): support batch data compare 2026-05-23 12:33:14 +08:00
t8y2 4cd0f2367b fix(grid): remove unused search memo key function and computed property 2026-05-23 12:33:11 +08:00
t8y2 2fea0c38c5 fix(app): harden clipboard copy flows 2026-05-23 10:52:19 +08:00
t8y2 f68edb2516 fix(grid): remove virtual row memoization 2026-05-23 08:58:18 +08:00
t8y2 370701a82b fix(connection): respect oracle driver profile hints 2026-05-23 08:35:45 +08:00
t8y2 5537fa1b3c fix(sidebar): avoid scroll jumps on expansion 2026-05-23 01:35:53 +08:00
t8y2 5f19dccdc1 fix(sidebar): keep connection expansion stable 2026-05-23 01:32:51 +08:00
t8y2 7a3ff3bff9 refactor(sql): move builders to Rust 2026-05-23 01:28:52 +08:00
t8y2 efc68c4244 perf(grid): memoize virtual rows 2026-05-22 21:48:43 +08:00
t8y2 e1dd45e418 fix(editor): update AI mode icons 2026-05-22 21:18:32 +08:00
t8y2 6b00e193ba fix(select): enable outside pointer events lock by default 2026-05-22 21:04:19 +08:00
t8y2 c4a268f670 fix(app): normalize grid JSON smart quotes 2026-05-22 20:08:16 +08:00
t8y2 51662c692f feat(objects): default filter to tables and align context menu with sidebar (#416)
Object browser now defaults to showing tables when tables exist.
Table/view context menus match sidebar tree with structure editing,
export, import, diagram, data compare, truncate, empty, duplicate,
and copy name support.
2026-05-22 19:15:22 +08:00
t8y2 c2a13f3057 fix(grid): focus cell before detail 2026-05-22 19:02:08 +08:00
t8y2 a26a762b8c fix(structure): compact editor layout 2026-05-22 18:53:50 +08:00
t8y2 d7dc4c959a feat(driver-store): add storage usage breakdown 2026-05-22 18:05:59 +08:00
t8y2 b2324aea29 fix(sidebar): copy selected name in single-click mode 2026-05-22 18:04:49 +08:00
t8y2 f5633cff67 fix(layout): prevent editor overflow over side panels 2026-05-22 17:16:36 +08:00
t8y2 ac32914797 fix(editor): refine completion popup styling 2026-05-22 16:53:53 +08:00
t8y2 b0a4061484 feat(structure): support column reordering 2026-05-22 16:43:14 +08:00
t8y2 2cade12b54 feat(editor): collapse query results pane 2026-05-22 16:29:22 +08:00
t8y2 3f14585a2a feat(diff): move schema and data diff to Rust 2026-05-22 16:20:11 +08:00
t8y2 c91fbc9fd6 feat(export): move text exports to Rust 2026-05-22 15:41:33 +08:00
t8y2 209eff528d feat(query): move grid save prep to Rust 2026-05-22 15:31:50 +08:00
t8y2 cb3e1d6e9f feat(query): move SQL editability analysis to Rust 2026-05-22 15:09:31 +08:00
t8y2 c736fe372a feat(export): move csv and xlsx generation to Rust backend 2026-05-22 14:56:40 +08:00
t8y2 0655d309d8 fix(db2): use schema tree mode for sidebar object loading 2026-05-22 14:52:12 +08:00