When a test or beforeEach fails before electronApp is assigned,
the afterEach would crash trying to call .close() on undefined,
masking the real error. Add a null check in all 9 e2e test files.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace direct Trino HTTPS configuration with nginx reverse proxy
for TLS termination, following Trino docs best practices. Add
http-server.process-forwarded=true to Trino config. Remove alpha
warning from TrinoForm.vue.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- buildSchemaFilter now uses escapeString() to escape single quotes in
schema, only, and ignore filter values.
- Trino driver now wraps this.db with wrapIdentifier() in all queries
(listSchemas, listTables, listTableColumns, buildPaginatedQuery).
- Trino listTableColumns escapes table and schema string literals.
- Added unit tests for SQL injection in buildSchemaFilter and Trino.
- listTables(null) no longer returns []. Uses buildSchemaFilter() to
optionally filter by schema, matching the PostgreSQL driver pattern.
- SSL/TLS connections now work. Certificate files (CA, cert, key) are
read and passed to trino-client. When no certs are provided,
rejectUnauthorized defaults to false (trust server cert).
- Removed server:ssl from Trino disabledFeatures so the SSL toggle
appears in the connection form.
- URL parser now auto-enables ssl for https:// URLs.
- Added integration tests for listTables and SSL (with HTTPS-enabled
Trino testcontainer).
- Added unit tests for SSL config propagation.
- Updated Trino connection docs (EN + ES) with SSL section.
Cloud connections/queries must always be in a folder. The option
was silently moving items to the owner's personal folder when null
folder_id was submitted. Hidden in the UI; backend now rejects null
folder_id for workspace records.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Clear connectionFolderId when importing connections from local workspace
to prevent them from being placed in team folders due to coincidental
folder ID matches.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add connectionFolderId/queryFolderId to ReorderResult interface
- Update cloud modules to apply folder_id from reorder response
- Update test mocks to include folder_id
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add dedicated reorder API endpoint that returns all affected siblings
- Fix position collisions by updating all sibling positions from API response
- Unify local and cloud workspace reorder actions with same interface
- Fix local workspace bug where unsorted state caused incorrect positions
- Add pendingSaveIds tracking to prevent poll from overwriting optimistic updates
- Add comprehensive unit tests for reorder scenarios
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Connection and query folder open/closed state is now saved to localStorage
and restored on page load. New folders default to expanded. Uses separate
keys ('connectionFolderExpanded-v1' / 'queryFolderExpanded-v1') so the two
sidebar lists are independent.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When a connection or query is inside a folder, its right-click menu now
includes 'Move to top level' (above the other 'Move to ...' options).
The option is hidden when the item is already at the root level.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Local workspaces have no subfolder support (flat folder structure).
Subfolders are only for cloud/team workspaces, and only one level deep
(personal/team root folders only — already enforced by the !folder.parentId
check).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Two Draggables sharing the same :list reference caused a race condition:
when the main Draggable's onDragRemove fired and mutated the list,
the folder-drop-zone's onDragRemove also fired but the item was already
gone, returning null from getContext and crashing.
Removed the folder-drop-zone <template> slots entirely. The SidebarFolder
component already handles drag-over expansion natively via @dragover
(auto-expands after 600ms hover), so no functionality is lost.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Right-clicking a root folder now shows 'New Subfolder' option (subfolders omit it since the hierarchy is max 2 levels)
- Right-clicking empty space in the lonely connections/queries section shows 'New Folder'
- Connection item context menu now includes Pin/Unpin (mirrors the hover icon)
- Query item context menu now includes Duplicate ('Copy of <title>')
- Modal title updates to 'New Subfolder' when creating a child folder
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add position column to favorite_query and saved_connection (SQLite migration)
- Add foldersWithQueries getter and moveToFolder action to query folder modules
- Wrap connection/query lists in Draggable for drag-and-drop reordering
- Add saveMany action to utilActionsFor for atomic batch position updates
(optimistic commit before DB saves to prevent UI flicker)
- Sort lonely connections/queries by position for consistent ordering
- Support drag reordering within the unfiled (lonely) list
- Auto-expand collapsed folders on drag-over (600ms delay)
- Fix folder creation incorrectly defaulting to first existing parent
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
TypeORM @ManyToOne relation fields were initialized to null (= null),
making them own properties that cls.merge() copied into every transport.
On the next save, TypeORM treated the explicit null relation as "unset
this FK", resetting connectionFolderId/queryFolderId in-memory even
though the SQL write was correct.
Fix: remove = null initializers from all @ManyToOne relation fields so
they are not own properties when unloaded. TypeORM then uses the
explicit FK column value exclusively.
Also moves foldersWithConnections from ConnectionSidebar into the
connectionFolders store module as a parameterized getter, and adds a
moveToFolder action to both local and cloud connection folder modules.
Adds tests for the appdb save handler and the store module.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>