Add a derived docs link to every changelog entry - #19739
Conversation
Changelog entries only linked to docs when the author wrote a docs link into the description text. Derive a docs link for every entry instead: an explicit docs CTA wins, then the first /docs link in the description, then the entry topic's docs home page. Show the link as a "Read the docs" button at the bottom of the changelog side panel, in the server-rendered entry list, and in the generated changelog.md files. Also link each entry in changelog.md and the server-rendered list to its canonical URL so agents can address single entries. Generated-By: PostHog Desktop Task-Id: b1606fd1-83d7-4755-b4dc-ed10f1ee6200
Deploy preview
|
Bundle reportTotal JS (gzip)8.16 MiB (+0.7 KiB / +0.0%) Eager graph (modules shipped in each entrypoint's initial chunks)
Largest modules in the
|
| Module | Size |
|---|---|
./src/data/mcp-tools.json |
1081.9 KiB |
css ./node_modules/.pnpm/css-loader@5.2.7_webpack@5.101.3/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[8].oneOf[1].use[1]!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.5.6_webpack@5.101.3/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[8].oneOf[1].use[2]!./src/styles/global.css |
758.7 KiB |
./src/components/Stickers/Stickers.tsx |
696.4 KiB |
./node_modules/.pnpm/@radix-ui+react-icons@1.3.2_react@18.3.1/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js |
481.4 KiB |
./node_modules/.pnpm/@posthog+brand@0.8.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/x-ray.mjs |
480.8 KiB |
./node_modules/.pnpm/rehype-raw@7.0.0/node_modules/rehype-raw/lib/index.js + 29 modules |
395.1 KiB |
./node_modules/.pnpm/@posthog+brand@0.8.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/im-the-driver.mjs |
385.7 KiB |
./src/hooks/useCustomers.tsx + 55 modules |
370.0 KiB |
./node_modules/.pnpm/@posthog+icons@0.36.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
354.8 KiB |
./node_modules/.pnpm/react-markdown@8.0.7_@types+react@16.14.66_react@18.3.1/node_modules/react-markdown/lib/react-markdown.js + 88 modules |
351.4 KiB |
./src/components/ProductComparisonTable/index.tsx + 126 modules |
301.8 KiB |
./node_modules/.pnpm/cloudinary-core@2.14.0_lodash@4.17.21/node_modules/cloudinary-core/cloudinary-core.js |
281.9 KiB |
./node_modules/.pnpm/@posthog+brand@0.8.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/doll-house.mjs |
281.7 KiB |
./node_modules/.pnpm/@posthog+brand@0.8.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/director.mjs |
275.6 KiB |
./src/components/SearchUI/index.tsx + 87 modules |
273.0 KiB |
Eager-graph budgets are report-only until a baseline is established. Sizes are gzip of public/**/*.js; eager size is webpack module source bytes for the modules actually shipped in the entrypoint's initial chunks (post-tree-shake).
Move the side panel's "Read the docs" button out of the pinned footer and place it directly under the entry description, above the emoji reactions, so it reads as part of the entry. Also open the static-list docs link in a new window, matching the site's link convention. Generated-By: PostHog Desktop Task-Id: b1606fd1-83d7-4755-b4dc-ed10f1ee6200
sarahxsanders
left a comment
There was a problem hiding this comment.
like the button approach, good backup for when the robot can't add a link
question though: should we just favor this? and I remove the step in the robot to add links?
|
I'm a belt and braces guy personally, but up to you. |
smallbrownbike
left a comment
There was a problem hiding this comment.
think we can just import these docs links into Strapi under the CTA field, and it will show up basically the same with no code changes. then maybe future changelog entries we can automatically add the docs link to the CTA field when creating?
|
Agent status note (automated maintenance run — not a reply on the author's behalf):
Two facts from the code that may help the decision:
I will make no further changes until this is decided. 🦉 via talyn.dev |
Generated-By: PostHog Desktop Task-Id: 7e545b76-4db9-4738-92e0-9de6c1fbde1c
|
@smallbrownbike Thanks — I checked how a Strapi CTA import interacts with this PR. The two approaches work together rather than against each other:
I cannot write to Strapi from this environment, so I cannot run the import myself. Two ways forward:
Which do you prefer? 🦉 via talyn.dev |
The script writes the docs link found in each completed entry's own description into the entry's empty CTA field. It does not touch entries that already have a CTA, and it does not import the generic topic fallbacks, which stay derived at render time. Dry run by default; --write with STRAPI_TOKEN applies the changes. Generated-By: PostHog Desktop Task-Id: 81894005-21c9-4078-b450-8041bf5c9f6f


Changes
Changelog entries only link to their docs page when the author happens to write a
/docslink into the description text. There is no automatic mechanism — that is why some entries show a docs link and others do not.This PR derives a docs link for every entry, in priority order:
/docs/docslink written into the descriptionsrc/components/Changelog/docsLinks.ts)The derived link shows in three places:
/changelog?id=URLchangelog.mdand per-year archives, where each entry title now links to its canonical URL and aDocslink is appended, so agents that read the Markdown can follow entries to the docsStrapi CTA import (added after review)
Review feedback proposed to import the docs links into the Strapi CTA field. This PR now includes that import as
scripts/import-changelog-docs-ctas.ts, and keeps the derived link as the fallback layer:/docslink in its own description, and writes that link to the CTA field as "Read the docs".--writewithSTRAPI_TOKENset to apply. A dry run against production data found 1,067 changelog entries, of which 421 get a CTA from the import.Run it with:
How new entries get a link going forward
Links are derived at build time, not stored, so every deploy re-computes them:
CHANGELOG_TOPIC_DOCS.Suggested upstream fixes
The biggest wins are upstream of this repo, in the automation that authors changelog entries from merged PRs:
/docslink) into new entries when a clearly relevant page exists. The derivation order rewards this — an author-chosen link beats the topic fallback, and it is how an entry can point at the exact page (e.g. a Slack-related entry linking/docs/slackeven when the entry is tagged with a broader topic).docsUrlfield to the topic content type and have the build read it. New topics then carry their docs home from day one, content owners maintain it, andCHANGELOG_TOPIC_DOCScan be retired. Alternative: a build-time convention fallback that uses/docs/<topic-slug>when that page exists, which covers topics whose slug matches a docs path.Screenshots
Checklist
vercel.jsonWhy: Some changelog entries link to their docs and some do not, and the changelog is hard for agents to consume. This makes the docs link consistent, visible in the side panel, and readable by MCP clients and agents.
Created with PostHog Desktop