fix: drag-to-create parent group is now an empty container

When dragging B onto A, the result is now:
- New Group (empty, no file)
  - File A
  - File B

Previously the group inherited A's file, creating a self-referencing parent.
This commit is contained in:
2026-06-12 14:50:48 -04:00
parent 7a5be506e0
commit 7331a455ad
2 changed files with 7 additions and 4 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+6 -3
View File
@@ -1048,10 +1048,13 @@ export class WaypointView extends ItemView {
const newGroup: BookmarkItem = { const newGroup: BookmarkItem = {
id: `bm-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`, id: `bm-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`,
type: 'group', type: 'group',
label: target.label, label: 'New Group',
filePath: target.filePath || '', filePath: '',
icon: '', icon: '',
children: [{ ...target, indent: 1 }, { ...dragged, indent: 1 }], children: [
{ ...target, indent: target.indent + 1 },
{ ...dragged, indent: target.indent + 1 },
],
collapsed: false, collapsed: false,
indent: target.indent, indent: target.indent,
}; };