feat: connection groups with multi-selection and hierarchical management#140
feat: connection groups with multi-selection and hierarchical management#140imhuytq wants to merge 19 commits intodatlechin:mainfrom
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
c3497e9 to
e00e14e
Compare
|
Run bị lỗi rồi anh ơi |
# Conflicts: # TablePro/Models/DatabaseConnection.swift # TablePro/Views/WelcomeWindowView.swift
…search filter and keychain threading
|
@datlechin please review |
There was a problem hiding this comment.
Pull request overview
Adds a hierarchical “connection groups” feature to the welcome window, enabling nested folders for organizing database connections with expand/collapse persistence and drag-and-drop reordering.
Changes:
- Replaces the SwiftUI
Listconnection list with anNSOutlineView-backed tree view that supports nesting, drag/drop, and context menus. - Introduces a reusable group create/edit sheet and updates group pickers to support nested group selection.
- Extends storage/models to support group hierarchy (
parentGroupId), ordering (sortOrder), and persisted expanded state.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| TablePro/Views/WelcomeWindowView.swift | Integrates group CRUD + expand state and swaps in the outline-based connection list. |
| TablePro/Views/WelcomeWindow/ConnectionOutlineView.swift | New NSOutlineView wrapper implementing hierarchy rendering, drag/drop reorder, and context menus. |
| TablePro/Views/Connection/ConnectionGroupPicker.swift | Updates the connection-form group picker to render nested groups and adds group management actions. |
| TablePro/Views/Connection/ConnectionGroupFormSheet.swift | New create/edit group sheet with color and parent-group selection (cycle prevention). |
| TablePro/Views/Connection/ConnectionFormView.swift | Minor update to reflect group support in form state (comment only in this diff). |
| TablePro/Resources/Localizable.xcstrings | Adds/removes localization keys used by new group UI. |
| TablePro/Models/DatabaseConnection.swift | Adds sortOrder to support stable ordering/reordering. |
| TablePro/Models/ConnectionGroup.swift | Adds hierarchy + ordering fields and migration-aware decoding. |
| TablePro/Core/Storage/GroupStorage.swift | Adds hierarchy helpers, expanded-state persistence, and descendant deletion behavior. |
| TablePro/Core/Storage/ConnectionStorage.swift | Persists sortOrder with migration fallback for pre-existing connections. |
| CHANGELOG.md | Documents the new “Connection groups” feature. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@imhuytq fix conflict lun nha a :d |
|
@datlechin review giúp với |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 10 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- GroupStorage.addGroup returns Bool; duplicate check scoped to siblings - ConnectionGroupPicker delete now requires confirmation dialog - acceptGroupDrop adjusts childIndex for mixed group/connection children - isDragging set only after validation passes in drag source - totalConnectionCount guards against circular parentGroupId cycles - duplicateConnection returns placed copy with correct sortOrder - 2-step delete step2 only shown for group-resident connections - Remove duplicated collectDescendantIds; reuse GroupStorage method - Remove unnecessary comments in WelcomeWindowView
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5620545 to
864f32a
Compare

Summary
Adds a hierarchical connection groups system to the welcome window, letting users organize database connections into named, color-coded folders with arbitrary nesting depth.
Core features
ListwithNSOutlineViewfor native tree view, expand/collapse, and drag-and-dropData model changes
ConnectionGroup: new model withparentGroupIdfor nesting,sortOrder, andcolorDatabaseConnection.sortOrder: new field for stable ordering within groupsGroupStorage: CRUD, hierarchy helpers, expanded state persistence, descendant deletion with connection cleanupsortOrderwhen upgrading from older versions without orderingStorage behavior
ConnectionStorage.duplicateConnectionpreserves all fields and inserts right after the originalConnectionFormViewpreservessortOrderwhen editing existing connectionsUI/UX details