feat(pages): add Wiki / Pages feature#6
Merged
Merged
Conversation
Org-scoped knowledge base built on Editor.js. Teams can create, nest, and edit rich-text pages with autosave. Accessible from a dedicated /pages list view and inline via a side drawer. Backend: PagesModule with CRUD controller + service + repository, Zod-validated DTOs, all queries org-scoped via OrganizationGuard. Frontend: /pages list (BaseTable pattern), /pages/[id] full-page editor with read/edit toggle and metadata sidebar (ToC, subpages, last updated), PageDrawer for inline editing, usePageDetailEditor shared hook, typed API client, TanStack Query options with staleTime: Infinity on detail to prevent editor remounts on back-navigation. UI kit: WikiEditor (Editor.js dynamic import, SSR-off), WikiPage (autosave debounce + save lifecycle callbacks), Drawer (Headless UI slide-over), Editor.js CSS overrides for typography/dark mode/checklists, editor-markdown converter utility, panel-right SVG icon. Database: page table with parentId self-relation for subpage nesting. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove @editorjs/attaches package and its @codexteam/ajax dependency - Remove @editorjs/image package - Remove @excalidraw/excalidraw and related packages (@excalidraw/laser-pointer, @excalidraw/mermaid-to-excalidraw, @excalidraw/random-username, @excalidraw/markdown-to-text) - Remove @Chevrotain parsing utilities (@chevrotain/cst-dts-gen, @chevrotain/gast, @chevrotain/regexp-to-ast, @chevrotain/utils) - Update @braintree/sanitize-url from 6.0.2 to 7.1.2 - Clean up unused dependencies to reduce bundle size and maintenance overhead Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
`<label>` without an associated control fails the jsx-a11y label-has-associated-control lint rule. The element is a visual heading, not a form label. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
anujeet98
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Wiki / Pages feature to Zuko — a rich-text knowledge base where teams can write and organize findings, decisions, and runbooks. Pages are scoped to an organization, support nested subpages, and use Editor.js as the editor with autosave.
Changes
Database
pagetable: storestitle,blocks(Editor.js JSON),version,parentId(for nesting), and org/user relations20260713082325_add_pages_and_page_attachmentsBackend (
apps/backend)pages.module.ts— registers the pages feature module; imported intoapp.module.tspages.controller.ts— REST endpoints:GET /pages,GET /pages/:id,POST /pages,PATCH /pages/:id,DELETE /pages/:id; guarded byAuthGuard+OrganizationGuardpages.service.ts— business logic: create, read, update, delete with parent-cycle guard (prevents a page being nested under its own child)pages.repository.ts— Prisma queries; all scoped to the caller's organizationdto/page.dto.ts— Zod schemas for create/update request validationFrontend (
apps/web)/pages— list view using the sharedBaseTablepattern (same as contacts/companies/tasks); title cell shows hover-reveal icons to open in drawer or full page/pages/[id]— full-page editor: two-column layout with Editor.js on the left and a metadata sidebar (last updated, table of contents, subpages) on the right; read/edit toggle switch; autosave with "Saving…" / "Saved ✓" indicatorPageDrawer— slide-over drawer that opens when clicking a page from the list; shows the page editor inline without leaving the listuse-page-detail-editor.ts— shared hook used by bothPageDetailandPageDrawerfor save state and cache syncPageTableOfContents— parses Editor.js heading blocks and renders an on-page anchor listlib/api/pages.ts— typed API client for all pages endpointsquery-options.ts— TanStack Query options for pages list and page detail (staleTime: Infinityon detail to avoid remounting the editor on navigation)application-layout.tsx— added "Wiki" nav itemUI Kit (
libs/ui-kit)WikiEditor— Editor.js wrapper (dynamic import, SSR-disabled); tools: header, list (with checklist), code, quote, table, inline code, marker, embed, delimiter, warningWikiPage— autosave layer on top ofWikiEditor; debounces saves by 2 s, firesonSaveStart/onSaveComplete/onSaveErrorcallbacksDrawer— Headless UI slide-over componentglobals.css— Editor.js typography overrides: font sizes, line heights, checklist checkbox colors/alignment, inline code styles, dark mode text colorspanel-right.svg— Lucide panel-right icon inpublic/iconsfor the drawer-open buttonModels (
libs/models)editor-markdown.ts— utility to convert Editor.js blocks to plain Markdown (for MCP/search use later)Test Plan
GET /pagesreturns empty list for a fresh org