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>