Repository navigation
docs(flame): enable algolia search and ask ai on the docs site - #479
Conversation
The docs site loads @docubook/plugin-search-algolia with the docsearch_docubook index and the Ask AI agent. The search-only key can only query the index. flame installs the plugin from npm through an npm: alias, so turbo does not see a flame <-> plugin cycle. A pnpm override points the plugin's flame peer at the workspace package instead of a second copy of flame from npm.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
Important
Every CI job on this PR fails at pnpm install --frozen-lockfile with ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION, because @docubook/[email protected] was published less than 24h ago. If this merges before the cutoff clears, main's release workflow and the Vercel production deploy fail at install too. The config change itself checks out: see the inline comment.
Reviewed changes
Mode: senior (it touches the docs-site build and the workspace dependency graph). I reviewed the whole diff and rebuilt the docs site locally under Node with the release-age policy turned off.
- Algolia plugin on the docs site:
packages/flame/docu.jsonregisters the plugin with a search-only key.docu.jsonis not in flame'sfiles, andtemplate/has its own config, so none of this ships to users. npm:alias devDependency: flame installs the published plugin through an alias, so turbo does not see a flame ↔ plugin cycle.- Workspace override:
@docubook/plugin-search-algolia>@docubook/flamelinks the plugin's flame peer to the workspace flame. The npm peer is^2.5.0, so without the override pnpm pulls in a second copy of flame. The override also matches the localplugins/search-algoliaimporter, which is why its lockfile specifier changed toworkspace:*. That is harmless, because publishing reads the package.json.
What I checked locally:
FLAME_RUNTIME=nodebuild: 27 pages, andassets/docsearch/{client.js,style.css,chunks}was emitted.- Every docs page has
docubook-search-provider. The landing page and404.htmldo not. deploy --silent --forceprinted nothing.pnpm test:release-planpassed all 6 scenarios.- Not checked: Deno, which is not available in the review shell.
Top priorities:
- Get CI green before merging. Once the cutoff has passed, re-running the checks is enough.
- Nothing else is blocking.
Verdict: READY WITH MINOR FIXES (CI install only).
claude-opus-5-5 | 𝕏
Canonical, og:url and og:image links now use https://docubook.pro instead of https://docs.docubook.pro.
There was a problem hiding this comment.
ℹ️ The new commit introduces no new issues. The open thread on
packages/flame/package.json:85still applies: every CI job on8be448cfails atpnpm install --frozen-lockfilewithERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATIONagain.
Reviewed changes
Mode: standard (one config value changed). This run covers only 8be448c.
- Moved the docs site's canonical host to
https://docubook.pro/: only the host ofmeta.baseURLchanged.resolveDeployPath(base-path.ts) reads only the path, which is still empty. SobasePath, asset URLs and the build cache stamp stay the same. Only the canonical,og:urlandog:imagehosts fromseo.tschange. I checked live:docubook.pro,www.docubook.proanddocs.docubook.proall return 200 from Vercel with no redirect, andhttps://docubook.pro/docs/getting-started/introductionreturns 200.
Not part of this diff, for reference only: plugins/search-algolia/README.md still links to docs.docubook.pro, and the flame template links to www.docubook.pro. Both hosts still work, so nothing is broken.
Top priorities:
- Get CI green. Re-run the checks after 2026-11-07T02:15Z, or commit a
minimumReleaseAgeExcludeentry pinned to this version (see the open thread). - Nothing else is blocking.
Verdict: READY WITH MINOR FIXES (CI install only).
claude-opus-5-5 | 𝕏
Exempt @docubook/[email protected] from pnpm's minimumReleaseAge. It was published on 2026-11-06, so every frozen install (CI, the release workflow, Vercel) failed with ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION. The entry is pinned to this version, so later releases still wait out the window.
There was a problem hiding this comment.
✅ No new issues found. b7af263 fixes the install failure from the previous review, and I resolved that thread.
Reviewed changes
Mode: standard (a single workspace config entry). This run covers only b7af263.
- Exempted the new plugin release from pnpm's release-age check:
pnpm-workspace.yamladdsminimumReleaseAgeExclude: ["@docubook/[email protected]"], with a comment saying to drop it later. It is pinned to this one version, so later plugin releases still go through the release-age check. Onb7af263,ci (build),ci (lint),ci (typecheck),release-plan,commitlintandruntime-smoke (node)now pass. Earlier, every job failed at install.ci (test)andruntime-smoke (deno)were still running when I posted this review.
Verdict: READY. One optional cleanup: after 2026-11-07T02:15Z, a follow-up commit can remove the exclude entry.
claude-opus-5-5 | 𝕏

Summary
The docs site now uses
@docubook/plugin-search-algolia0.1.0: Algolia DocSearch in the search dialog, and Ask AI in its own side panel.packages/flame/docu.jsonadds the plugin with App ID5CCYZZZ96E, the search-only key, thedocsearch_docubookindex, and Ask AI agentcdd1d1a2-….search,listIndexesandsettings.settingsis read-only: editing needseditSettings. The key cannot write to the index.meta.baseURLchanges fromhttps://docs.docubook.pro/tohttps://docubook.pro/(8be448c). Canonical,og:urlandog:imagelinks now usehttps://docubook.pro. All three hosts (docubook.pro,www.,docs.) currently serve the site with 200 and no redirect.How the plugin is linked
Linking the workspace package (
workspace:*) would make turbo fail with "Cyclic dependency detected": flame → plugin for the docs site, and plugin → flame for types and tests. Instead:packages/flame/package.jsonadds a devDependency"@docubook/plugin-search-algolia": "npm:@docubook/plugin-search-algolia@^0.1.0". Turbo treats annpm:alias as external, so there is no cycle in the build, lint, typecheck or test graphs. The docs site uses the published plugin, not unreleased code fromplugins/.pnpm-workspace.yamladds the override"@docubook/plugin-search-algolia>@docubook/flame": "workspace:*". Without it, pnpm resolved the plugin's flame peer to a second copy of flame 2.5.0 from npm, with core, markdown, ui-react and themes-colors. The lockfile now has@docubook/flame@packages+flame.pnpm-workspace.yamlexempts@docubook/[email protected]from pnpm'sminimumReleaseAge(b7af263). The version was published on 2026-11-06, so without the entry every frozen install fails withERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION: CI, the release workflow and Vercel. The entry is pinned to this version and can be dropped once 0.1.0 is older than the window. (An earlier version of this description said the entry was unnecessary. That check had read a cached pnpm verdict.)Verification
turbo build|lint|typecheck|test --filter=@docubook/flame... --dryreports no cycle. The build graph contains core, markdown, themes-colors, ui-react and flame. The plugin is not built, since it comes from npm.HOMEand emptyXDG_*caches,pnpm install --frozen-lockfile --filter=@docubook/flame...fails without the exemption, which reproduces CI. With it, that install and the unfilteredpnpm install --frozen-lockfileboth pass the supply-chain check.#docubook-search-provider, and the landing and 404 pages do not. The build writesassets/docsearch/(client.js,style.css,chunks/).vercel.json, against the live Algolia app:Ctrl K, then typing "plugin", returns/docs/getting-started/pluginsand two anchors on that page. Clicking the first opens that page on the local origin, because ofrelativeUrls.Ctrl Iopens the Ask AI panel. No question was sent, so the agent's quota was not used.scripts/check-release-plan.mjspasses all 6 scenarios.baseURLchange, every absolute URL in the 27 built pages useshttps://docubook.pro(116 occurrences). None usesdocs.docubook.pro. The base path is unchanged.Follow-up outside this PR: the crawler
The index is stale.
docsearch_docubookwas last updated on 2026-09-20 with 358 records. Its URLs are onwww.docubook.pro, and its records still use the old crawler config:lvl0is "Docs" everywhere, and 27 records hold the "Last updated … Made with DocuBook" footer. Since 2026-09-23,docsearch_docubook.tmphas 0 records, which suggests later crawls fetched nothing and the safety check kept the old index.Search works now with those records. To refresh it:
startUrls,discoveryPatternsandpathsToMatchonhttps://docubook.pro, to match the new canonical.