-
Notifications
You must be signed in to change notification settings - Fork 109
Add dev/TODO.md with Vercel audit tasks #1905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
+48
−0
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c82ace9
Add dev/TODO.md with Vercel audit tasks
marcleblanc2 b04378b
dev/TODO: Link Vercel audit PRs; record findings for items 2, 6c, 6d, 7
marcleblanc2 bda0db5
dev/TODO: Fix markdownlint blank-line warnings
marcleblanc2 27447b9
dev/TODO: Drop merged and completed Vercel audit items
marcleblanc2 5441c7a
Allow prerender and bingbot in CSpell
marcleblanc2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,46 @@ | ||||||
| # TODO | ||||||
|
|
||||||
| Vercel project `sourcegraph-docs`. One PR per task; delete a task when | ||||||
| its PR merges. | ||||||
|
|
||||||
| ## 1. Node 20 build image is deprecated (separate thread) | ||||||
|
|
||||||
| Node 20.x deployments fail after 2026-10-01. `contentlayer` 0.3.4 emits | ||||||
| `assert { type: 'json' }`, which Node ≥ 22 rejects. Migrate to | ||||||
| `contentlayer2` / `next-contentlayer2` ≥ 0.5.0, then set Node 22 in | ||||||
| `.tool-versions` and `package.json#engines`. | ||||||
|
|
||||||
| ## 2. 24 MB shared JS chunk on every page | ||||||
|
|
||||||
| `src/components/Toc.tsx` and `src/components/ContentTabs.jsx` are | ||||||
| `'use client'` and import `allPosts`, so every post's raw and compiled | ||||||
| body ships in one client chunk (`7180-*.js`: 24.4 MB raw, 2.78 MB gzip, | ||||||
| re-downloaded after every deploy). Fix: resolve the post on the server | ||||||
| in `src/app/[...slug]/page.tsx` and pass only what each component needs | ||||||
| as props (`Toc`: the post `_id`; `ContentTabs`: the rendered fallback | ||||||
| tab), then drop the `allPosts` imports. | ||||||
|
|
||||||
| ## 5. Runtime | ||||||
|
|
||||||
| - Skip builds for non-site changes: #1901. | ||||||
| - Prerender `/api/md/[...slug]`, enable Fluid compute: #1912 (stacked on | ||||||
| #1901; retarget to `main` after it merges). | ||||||
| - Static redirects out of middleware: draft #1907 (rebase on `main` now | ||||||
| that #1908 merged). | ||||||
|
|
||||||
| ## 6. Build | ||||||
|
|
||||||
| - Lint warnings and stale `caniuse-lite`: draft #1909. | ||||||
|
|
||||||
| ## 7. Doubled base path 404s and wrong canonical | ||||||
|
|
||||||
| `sourcegraph.com/docs/docs/_next/...` 404s are bingbot following the | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Did you mean
Suggested change
Please correct the spelling, or add the word to |
||||||
| Cloudflare **302** from `docs.sourcegraph.com/<page>` and resolving the | ||||||
| page's `/docs/_next/...` asset URLs against the old host. | ||||||
|
|
||||||
| - Cloudflare: make the `docs.sourcegraph.com` redirect a 301, and | ||||||
| redirect `docs.sourcegraph.com/docs/*` to `sourcegraph.com/docs/$1` | ||||||
| without doubling the prefix. | ||||||
| - Repo: every page emits `<link rel="canonical" href="https://sourcegraph.com/docs">` | ||||||
| (`src/app/layout.tsx` `alternates.canonical: '/docs'`). Set a per-page | ||||||
| canonical in `src/app/[...slug]/page.tsx#generateMetadata`. | ||||||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prerenderis not in the dictionary.Did you mean
prepender?Please correct the spelling, or add the word to
cspell-allow-list.txtif it is correct.