feat/wikijs-3-0-2-upgrade #193

Merged
haydar merged 4 commits from feat/wikijs-3-0-2-upgrade into develop 2026-11-02 20:47:43 +00:00
Member
No description provided.
Re-pin the image to ghcr.io/requarks/wiki:3.0.2 with its multi-arch
digest and rebase the three carried patches against the real 3.0.2
backend source:

- 001 (LISTEN-client resilience): kept — 3.0.2 still checks the event
  bus, scheduler and collaboration relay LISTEN clients out of the
  pool with no error or reconnect handling; regenerate so every hunk
  applies with zero offset.
- 002 (session gate): kept — hook placement after the bearer-token
  onRequest hook and before the preParsing permissions check is
  unchanged; the new compareAndSet session store makes the gate
  destroy() strictly safer (an in-flight request can no longer write
  a destroyed session back). loginWithProvider, the authFlow session
  shape, sitesMappings and the auth-module disk scan are unchanged.
- 003 (avatar refresh): kept — upstream still only fetches provider
  avatars at login; helpers/images and setAvatarFromBytes are
  unchanged.

Also make the patch loop fail on the first refusal: the for-loop
returns only the last patch’s exit status, so an early failure could
previously slip through when a later patch applied.

API surface checked against WikiJsClient and wikijs-bootstrap.sh:
every route, envelope and schema used is unchanged or additive;
markdown/visual editor interchangeability is intact; page move is
native (PUT /sites/{id}/pages/{id}/path); the 3.0.2 session
revocation (refreshAccess/clearSessionsFromUsers plus the hourly
purgeExpired task) complements rather than conflicts with the
Portal-side reconciler, and the sessions/users schemas it reads are
identical. PostgreSQL >= 17 is already satisfied (17.11 pinned).

Add a static contract test pinning tag+digest and the patches-dir
set so a re-pin cannot drift from the carried patches.
All creation paths now stamp editor 'visual' (WYSIWYG over the same
markdown source — contentType 'markdown' either way), centralized on
WikiJsClient::DEFAULT_EDITOR so createPage/ensurePage default to it
and future callers cannot drift:

- DocsHierarchyService::createDocument + createFolder landing pages;
  DocsWorkspaceController endpoint accepts only 'visual' explicitly —
  an explicit 'markdown' is a 422, not a silent downgrade. The theme's
  New Document dialog no longer offers an Editor select (the 'Change
  editor' action on existing pages stays the escape hatch).
- ProjectProvisioner: org/project Overview, sections and org landing
  pages via ensurePage; DocumentationService ticket/repo doc pages
  inherit the same default.
- MCP wikijs.pages.create defaults visual; an explicit
  editor:'markdown' (or any other value) fails with an honest
  unsupported_format error. pages.update continues to never send an
  editor field — asserted on the fake's recorded requests.
- Confluence import: storage-format bodies are normalized (code and
  info/note/warning/tip macros, task lists, ri:url images), sanitized,
  then converted to markdown by the new ConfluenceStorageConverter —
  pages land as visual pages with a real render. Constructs with no
  markdown representation (dynamic macros, attachments, page/anchor
  links, mentions, placeholders) are reported per page under
  pages_unsupported, never silently dropped. HtmlSanitizer now keeps
  the inert data-language/data-task attributes the converter needs.

New docs:convert-to-visual artisan command (dry-run by default,
--apply, --org/--project filters, progress bar + per-page table)
migrates existing pages via Wiki.js's own PUT /pages/{id}/editor —
id/path/content/history preserved, resumable since visual pages are
skipped. html/redirect/blog/asciidoc pages are reported unsupported
and never rewritten; truncated subtree walks fail the run's exit
code rather than report unverifiable totals.

Tests: DocsConvertToVisualTest (dry-run/apply/idempotent/unsupported/
failed/truncated), provisioned-pages drift guard, dialog+endpoint
visual-only, MCP explicit-markdown refusal, update-never-sends-editor,
Confluence→visual markdown conversion with unsupported reporting.
Theme docs-tree-ui tests updated for the picker removal.
fix(migration): partial Confluence imports surface STATUS_PARTIAL at the run level
All checks were successful
ci / release-tests (pull_request) Successful in 1m52s
ci / portal-frontend (pull_request) Successful in 40s
ci / integrations-js (pull_request) Successful in 31s
ci / openproject-spec (pull_request) Successful in 46s
ci / openproject-rspec (pull_request) Successful in 5m11s
ci / portal-php (pull_request) Successful in 7m20s
ci / commit-trailers (pull_request) Successful in 10s
ci / secret-scan (pull_request) Successful in 14s
292664b1df
haydar scheduled this pull request to auto merge when all checks succeed 2026-11-02 20:40:12 +00:00
haydar merged commit 004310c1e3 into develop 2026-11-02 20:47:43 +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!193
No description provided.