Skip to content

Commit d69b19e

Browse files
feat: extract page tree logic into testable utility (#113)
Co-authored-by: Ona <no-reply@ona.com>
1 parent a045758 commit d69b19e

4 files changed

Lines changed: 761 additions & 218 deletions

File tree

.agents/architecture.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ src/
176176
│ │ ├── workspace-switcher.tsx # Dropdown listing all workspaces, create workspace trigger
177177
│ │ ├── create-workspace-dialog.tsx # Dialog for creating a new workspace
178178
│ │ ├── page-search.tsx # Full-text search input + results dropdown (debounced, 300ms)
179-
│ │ ├── page-tree.tsx # Hierarchical page tree with CRUD, drag-and-drop, nest/unnest
179+
│ │ ├── page-tree.tsx # Hierarchical page tree with CRUD, drag-and-drop, nest/unnest (uses lib/page-tree.ts)
180180
│ │ └── user-menu.tsx # User dropdown with settings link + sign-out
181181
│ ├── editor/ # Lexical block editor
182182
│ │ ├── editor.tsx # Main editor: LexicalComposer, plugins, auto-save to Supabase
@@ -220,6 +220,7 @@ src/
220220
│ ├── table.tsx
221221
│ └── tooltip.tsx
222222
├── lib/
223+
│ ├── page-tree.ts # Pure functions: tree building, reorder, nest/unnest, drop computation
223224
│ ├── sentry.ts # captureSupabaseError helper (structured Sentry reporting)
224225
│ ├── utils.ts # cn() utility (clsx + tailwind-merge)
225226
│ ├── types.ts # Database entity types

0 commit comments

Comments
 (0)