Repository navigation
fix: include docs base path in AI menu links - #62
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The Vercel build failed at install with ERR_PNPM_LOCKFILE_CONFIG_MISMATCH. The lockfile had been written by pnpm 11 (bare patch hash, extra libc fields), and Vercel installs with pnpm 10.x for this project. Regenerate it with pnpm 10 so the frozen install matches. Also patch the page URL that the AI menu copies and sends to ChatGPT and Claude. It was built from origin + path and omitted the /docs base path. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
zherring
marked this pull request as ready for review
October 16, 2026 16:41
splits.org redirects the no-slash URL, so the ChatGPT and Claude prompts and the copied link now use the canonical trailing-slash form, matching the canonical, sitemap, and llms.txt URLs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vercel serves everything under /docs/assets/ as immutable for a year, and markdown twins keep the same name across deploys, so browsers would keep showing a stale copy in Copy page for AI and View as Markdown. Use /docs/<page>.md, the URL llms.txt links, which is served with must-revalidate. Also simplify the base-path prefix in the AI menu page URL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mihoward21
approved these changes
Oct 16, 2026
Contributor
|
@zherring you can approve and merge whenever |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Vocs "Ask AI" menu and the "Copy page for AI" button on every docs page ignore the
/docsbase path. The docs are served under/docs, so four things are broken on production today:/assets/md/<page>.md, which returns 404 on splits.org. The menu item then falls back to copying the page URL.https://splits.org/workspaces/roles, without/docs. That page does not exist.Fix
Both changes are in
patches/vocs.patch, because the menu is Vocs code and the repo already patches Vocs this way.basePathand returns the public twin URL, so the fetch and "View as Markdown" request/docs/<page>.md. That is the URLllms.txtlinks, and it is served withmax-age=0, must-revalidate. It deliberately avoids/docs/assets/md/<page>.md: Vercel serves everything under/docs/assets/asimmutable, max-age=31536000, and twins keep the same name across deploys, so browsers would keep a stale copy after a docs change.AskAiis built from origin + base path + path, with a trailing slash (splits.org redirects the no-slash form), so the ChatGPT and Claude prompts and the copied link point at real pages.Lockfile
Changing the patch changes its hash, and pnpm records that hash in
pnpm-lock.yaml, so the lockfile has to change. Againstmainit is exactly three lines: the patch hash inpatchedDependencies, in the importer entry, and in thevocs@2.3.2snapshot key. No dependencies, versions, scripts or config change.The first commit of this PR also carried an unrelated pnpm 11 rewrite of the lockfile (a different
patchedDependenciesformat plus extralibcfields). Vercel installs with pnpm 10.x for this project, and that format failed withERR_PNPM_LOCKFILE_CONFIG_MISMATCH. The follow-up commit regenerated the lockfile with pnpm 10.18.1 to drop that churn.Testing
To test on this PR's Vercel preview:
/docs/workspaces/roles/and press ⌘I (Ctrl+I) to open the Ask AI menu./docs/workspaces/roles.mdopens in a new tab..../docs/workspaces/roles/./assets/md/workspaces/roles.md, 404/docs/workspaces/roles.md, 200/assets/md/workspaces/roles.md/docs/workspaces/roles.mdsplits.org/workspaces/roles.../docs/workspaces/roles/window.openand the clipboard stubbed) confirmed all three rows, when the markdown URL was still/docs/assets/md/<page>.md. 8c0589c moved it to/docs/<page>.md. That commit is verified by the checks below, not yet by a browser click-through.pnpm install --frozen-lockfilepasses on pnpm 10.18.1. The same install fails withmain's lockfile and this PR's patch, which confirms the hash update is required.pnpm buildpasses, including the prose lint and the internal link check. The preview's client bundle contains the new markdown URL builder and page URL./docs/workspaces/roles.mdand/docs/index.mdreturn 200 withcache-control: public, max-age=0, must-revalidate. Invocs dev,/docs/workspaces/roles.md,/docs/index.mdand/docs/workspaces.mdreturn the markdown.Requested from Discord thread.
Prompted by: @zherring
🤖 Generated with Claude Code