feat/docs-workspace-redesign #178

Merged
haydar merged 4 commits from feat/docs-workspace-redesign into develop 2026-10-29 22:52:54 +00:00
Member
No description provided.
The Docs sidebar is a documentation workspace, not a Portal link list:

- Every project/org entry resolves to its Wiki.js docs space through
  the stored docs_url/docs_space_path bindings — never a path
  reconstructed from slugs. The Portal dashboard survives only as the
  explicit 'Portal' chip; repositories are labeled 'Code' destinations.
- Sidebar restructure: Home, Projects (dedicated debounced search),
  Favorites, Recent projects, Recent documents, My projects org tree.
- New GET /api/v1/docs/projects/search endpoint: org-scoped,
  permission-filtered, links into docs spaces; foreign organization
  parameters answer 404 like everywhere else in this API.
- Visit tracking gains a source column (docs|portal|forgejo): the Docs
  sidebar counts docs-space visits only — a Portal dashboard view no
  longer poses as Docs navigation, and project-space attribution now
  matches on the recorded binding prefix so renamed/relocated spaces
  still resolve.
- Clicking a sidebar project posts a docs-context view so the recent
  projects list reflects real Docs navigation.
- Provision the org Wiki.js space when an organization is created (and
  reactivated), independent of any project: the orgs/{slug} Overview
  root, knowledge-base/projects/public structure, role groups and
  page rules. New ProvisionOrganizationDocs job (per-org overlap lock,
  transient retry) and organizations.docs_url/docs_provisioning_*
  columns mirroring the project bindings.
- ProjectProvisioner::provisionOrganizationDocs/provisionProjectDocs
  wrap the ensures with the same status bookkeeping provision() uses;
  provision() now delegates to them.
- Richer Overview templates: the org root links Knowledge Base /
  Projects / Public / Open-in-Portal; the project Overview links every
  section page plus the Work/Code surfaces; the section set gains
  Development (extend-not-replace).
- orgs/{slug}/projects index page so the projects prefix is browsable.
  Wiki.js 3 has no folder entity — folders are pure path prefixes —
  the semantics are documented in code.
- New DocsHierarchyService for the docs navigation backend:
  orgTree/projectTree enumeration over the bound subtrees and
  createFolder implemented as a landing page under the org subtree
  (no dwb-* markers on user structure).
- New devworkbase:reconcile-docs-spaces command (alias
  docs:reconcile-spaces): idempotent create-only backfill for orgs and
  projects with --dry-run reporting proposed ops; bound-but-missing
  roots are refused and reported for the Diagnose/Repair flow.
feat(docs): workspace tree endpoints, structure writes, and role-scoped access filtering
All checks were successful
ci / commit-trailers (pull_request) Successful in 11s
ci / secret-scan (pull_request) Successful in 14s
ci / release-tests (pull_request) Successful in 1m19s
ci / portal-frontend (pull_request) Successful in 33s
ci / integrations-js (pull_request) Successful in 26s
ci / openproject-spec (pull_request) Successful in 34s
ci / portal-php (pull_request) Successful in 6m15s
ci / openproject-rspec (pull_request) Successful in 4m52s
5b1ca53c76
P0-1 — Canonical docs access projection (DocsAccessService): every
nav/tree serialization now mirrors the Wiki.js group rules exactly.
Owner/Admin/Member see the whole orgs/{slug} subtree; a Guest sees
orgs/{slug}/public plus exact-path DocumentShare pages and never
enumerates a project space; suspended orgs/memberships stay invisible.
Applied to searchProjects, My/Recent/Favorite Projects,
Recent/Favorite Documents, org entries (guests land on /public), and
favorite/activity authorization. NativeAuthorizer delegates its
visibility predicate to the shared service so MCP and the nav API can
never drift.

P0-2 — Bounded tree endpoints: GET /api/v1/docs/{org}/tree and
GET .../projects/{project}/tree, org+permission gated, strict-prefix
re-checked and per-page visibility filtered. Sidebar renders them as
an expandable tree: breadcrumbs, active-doc highlight, auto-expand to
current, lazy/cached loading, keyboard nav (roving tabindex), and
localStorage-persisted expansion.

P0-3 — Structure writes: POST .../folders and POST .../documents
(write:pages, non-archived, subtree-confined to the bound project
root, dwb-* refused) — documents return the native /_edit/ editor
URL. DELETE .../pages requires delete:pages + explicit confirm, uses
Wiki.js recycle semantics, and refuses bound roots, canonical
sections and dwb-* provisioned pages. Move/rename is deliberately not
offered: Wiki.js 3 has no page-move call and a path is the page's
identity — documented in code, never faked.

P1 — Theme-level home panels on org and project space roots
(projects/browse + recent docs + Open in Portal + New document),
a space favorite star on project trees, and the duplicated
docs_space_path fillable removed.
haydar scheduled this pull request to auto merge when all checks succeed 2026-10-29 22:46:25 +00:00
haydar merged commit 4c532a5c53 into develop 2026-10-29 22:52:54 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
developing4all/devworkbase!178
No description provided.