Adds a server-authoritative whole-tree endpoint and sidebar menu commands so a deep space tree can be expanded in one request instead of a per-level BFS storm. Server: - POST /pages/tree (SidebarPageTreeDto: spaceId | pageId), same CASL space scoping as /sidebar-pages. Returns the whole space tree / subtree as a flat list in the sidebar item shape (id, slugId, title, icon, position, parentPageId, spaceId, hasChildren, canEdit), ordered by position (collate C byte order), content never fetched. - page.service.getSidebarPagesTree reproduces getSidebarPages' two-branch permission model: open space -> spaceCanEdit; restricted space -> seed the full descendant set then prune via filterAccessibleTreePages + filterAccessiblePageIdsWithPermissions (keeps restricted-but-granted pages, prunes inaccessible subtrees). hasChildren is derived from the final filtered set so it can never reveal inaccessible children. - page.repo.getSpaceDescendants: recursive CTE seeded by space roots. Client: - SpaceTree is forwardRef exposing expandAll/collapseAll/isExpanding; expandAll fetches the whole tree once, replaces current-space nodes, opens every branch (current space only), aborts on space switch, surfaces real errors; collapseAll collapses only current-space ids (shared open-map). - SpaceMenu gains Expand all / Collapse all items (no admin gate). Implements docs/backlog/tree-expand-collapse-all.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level
parserOptionsproperty like this:
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
- Replace
plugin:@typescript-eslint/recommendedtoplugin:@typescript-eslint/recommended-type-checkedorplugin:@typescript-eslint/strict-type-checked - Optionally add
plugin:@typescript-eslint/stylistic-type-checked - Install eslint-plugin-react and add
plugin:react/recommended&plugin:react/jsx-runtimeto theextendslist