export type WikiSection = "sources" | "pages" | "search"; /** Keep existing page, overview and build links usable after moving navigation. */ export function resolveWikiSection( tab: string | null | undefined, pagePath?: string | null, ): WikiSection { if (pagePath) return "pages"; if (tab === "pages" || tab === "overview") return "pages"; if (tab === "search") return "search"; return "sources"; }