feat/wikijs-3-0-2-upgrade #193
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/wikijs-3-0-2-upgrade"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.