From 2616ec5d1b219373927a6f1c14b8bb14cd57874d Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 22 Jun 2026 23:26:12 +0100 Subject: [PATCH] fix(wiki): detect wiki sources by config.kind, not type A converted source keeps its origin type (e.g. crawler) with the wiki-ness in config.kind=wiki (D5/D20), so the UI's type==='wiki' checks treated converted sources as normal (wrong view, convert action still offered). Sources.tsx now keys isWiki + the view branch on config.kind==='wiki' (with a type fallback for blank-created wikis). The paginated endpoint already returns config. --- frontend/src/settings/Sources.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/settings/Sources.tsx b/frontend/src/settings/Sources.tsx index 3d77cf61..8cb86932 100644 --- a/frontend/src/settings/Sources.tsx +++ b/frontend/src/settings/Sources.tsx @@ -337,7 +337,7 @@ export default function Sources({ index: number, document: Doc, ): SourceMenuOption[] => { - const isWiki = document.type === 'wiki'; + const isWiki = document.config?.kind === 'wiki' || document.type === 'wiki'; // 'team' viewers cannot write; convert is owner/editor only. const canEdit = document.ownership !== 'team' || document.team_access === 'editor'; @@ -464,7 +464,8 @@ export default function Sources({ return documentToView ? (
- {documentToView.type === 'wiki' ? ( + {documentToView.config?.kind === 'wiki' || + documentToView.type === 'wiki' ? (