Skip to content

fix(docs): stop repeating the version as the release headline - #3054

Merged
mfal merged 2 commits into
mainfrom
fix/releases-duplicate-title
Sep 1, 2026
Merged

fix(docs): stop repeating the version as the release headline#3054
mfal merged 2 commits into
mainfrom
fix/releases-duplicate-title

Conversation

@mfal

@mfal mfal commented Sep 1, 2026

Copy link
Copy Markdown
Member

What & why

The /releases page rendered every entry as "1.1.0 Minor – 1.1.0" and then
repeated the real headline as an h2 right below it.

The title came from the GitHub Release name, and the publish workflow sets that
to the bare version (gh release create --title "${tag}", publish.yml:597).
The name?.trim() || version fallback only caught an empty name, so a name
that equals the version slipped through. The curated headline actually lives as
the body's leading H1 — which headingOffset={1} then emitted as a second
h2.

splitHeadline() now takes that leading H1 as the title and strips it from the
body. Only a leading H1 counts; a # further down belongs to the notes.
name stays as a fallback for a hand-titled Release, and title is optional:
with no headline the heading shows the version alone instead of doubling it.

Fixing this docs-side (rather than in publish.yml) also repairs the two
releases that are already published.

Before → after, against live GitHub data:

Release Heading before Heading after
1.1.0 1.1.0 Minor – 1.1.0 1.1.0 Minor – Upgrade across Flow versions with one command
1.0.0 1.0.0 Major – 1.0.0 1.0.0 Major – Semantic Versioning is a promise now, not an intention

Heading hierarchy in the prerendered apps/docs/out/releases.html is clean now —
previously the headline sat as a stray h2 between the releases:

h1 Releases → h2 1.1.0 → h3 Highlights / The upgrade CLI / … / Fixes
            → h2 1.0.0 → h3 Highlights / Deprecations / … / Fixes

Second commit: a red test on main

docs:test:unit has been failing since #2988: the new MdxFile.test.ts uses
node:test, so vitest picks it up, cannot collect it, and fails with "No test
suite found" — while test:links, which runs the node:test files, never saw
it. Renamed to MdxFile.node.test.ts; the two globs are deliberately disjoint,
as the comment in apps/docs/vitest.config.ts documents. Without it this PR's
own docs:test:unit run would be red.

Verification

  • pnpm affected:test — green (10 projects, 35 tasks)
  • pnpm nx test:unit docs — 18 passed (4 new for splitHeadline)
  • pnpm nx test:links docs — green, now including MdxFile.titleFrom
  • tsc --noEmit clean, pnpm lint 0 errors
  • pnpm nx build docs and the resulting out/releases.html checked against the
    live release data

No screenshot: preview_start resolves .claude/launch.json from the main
checkout, so a worktree session cannot start the docs dev server. The
prerendered HTML is what ships, so it was verified there instead.

Checklist

  • PR title is a Conventional Commit and matches the base branch above
  • pnpm lint is clean and pnpm affected:test passes (browser tests if
    behavior changed)
  • Generated code is committed (no generators affected)
  • User-facing strings added to both de-DE and en-US locale files (n/a
    — release notes come from GitHub, page chrome unchanged)
  • Docs updated if a public API changed; intentional visual changes get
    updated snapshots / the update-screenshots label (n/a — apps/docs only,
    not covered by the visual suite)

🤖 Generated with Claude Code

mfal and others added 2 commits September 1, 2026 14:54
The /releases page rendered every entry as "1.1.0 Minor – 1.1.0" and then
repeated the real headline as an h2 right below it.

The title came from the GitHub Release `name`, and the publish workflow sets
that to the bare version (`gh release create --title "${tag}"`). The
`name?.trim() || version` fallback only caught an *empty* name, so a name that
equals the version slipped through. The curated headline actually lives as the
body's leading H1 — which `headingOffset={1}` then emitted as a second h2.

Take that leading H1 as the title and strip it from the body. `name` stays as a
fallback for a hand-titled Release, and `title` is now optional: with no
headline the heading shows the version alone instead of doubling it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`docs:test:unit` has been red since #2988: the new `MdxFile.test.ts` uses
`node:test`, so vitest picks it up, cannot collect it, and fails with "No test
suite found" — while `test:links`, which runs the `node:test` files, never saw
it.

Rename it to `.node.test.ts`. The two globs are deliberately disjoint, as the
comment in `apps/docs/vitest.config.ts` documents.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mfal
mfal requested a review from a team September 1, 2026 12:58
@mfal mfal self-assigned this Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for ./packages/components/

Status Category Percentage Covered / Total
🔵 Lines 78.69% 746 / 948
🔵 Statements 78.57% 763 / 971
🔵 Functions 80.09% 165 / 206
🔵 Branches 70.33% 377 / 536
File CoverageNo changed files found.
Generated in workflow #6503 for commit 98975a9 by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🚀 Preview Deployment

Preview environments are ready:

Type URL
docs pr-3054.docs.review.flow-components.de
storybook pr-3054.storybook.review.flow-components.de

Images:

  • docs: ghcr.io/mittwald/flow/docs:pr-3054
  • storybook: ghcr.io/mittwald/flow/storybook:pr-3054

@mfal
mfal merged commit df09a68 into main Sep 1, 2026
22 checks passed
@mfal
mfal deleted the fix/releases-duplicate-title branch September 1, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants