Skip to content

docs(tko.io): make landing version pill dynamic#375

Merged
brianmhunt merged 1 commit into
mainfrom
docs/landing-version-dynamic
Apr 27, 2026
Merged

docs(tko.io): make landing version pill dynamic#375
brianmhunt merged 1 commit into
mainfrom
docs/landing-version-dynamic

Conversation

@brianmhunt
Copy link
Copy Markdown
Member

@brianmhunt brianmhunt commented Apr 27, 2026

Summary

The landing pill on tko.io still read TKO v4.0.1 is here after 4.1.0 shipped, while the header version badge (already package.json-driven) correctly showed v4.1.0. The pill was hardcoded — exactly the kind of admin-tax that runs against the dark-factory thesis.

Mirror the Header.astro pattern: import builds/knockout/package.json and interpolate pkg.version into the pill text. One canonical source for "what version is live"; no per-release MDX edit required.

Diff

 import { Tabs, TabItem } from '@astrojs/starlight/components';
+import pkg from '../../../../builds/knockout/package.json';

-<a class="landing-version" href="...">TKO v4.0.1 is here &rarr;</a>
+<a class="landing-version" href="...">TKO v{pkg.version} is here &rarr;</a>

Two-line change.

Verification

  • bun run build in tko.io/ — clean (66 pages built in 18.71s)
  • dist/index.html renders TKO v4.1.0 is here → for the pill and v4.1.0 for the header badge — both pointing at the right release tag
  • Single source: when 4.2.0 ships, builds/knockout/package.json flips, both surfaces update on the next docs build

Test plan

  • Astro build passes with the dynamic import
  • Rendered HTML shows the correct version
  • Deploy preview shows the same on the live site

https://claude.ai/code/session_01Jnv99bwWtFWFmsyL7A2cJv


Generated by Claude Code

Summary by CodeRabbit

  • Chores
    • Documentation landing page now automatically displays the current TKO release version, ensuring accuracy without manual updates.

The "TKO vX.Y.Z is here" pill in the landing MDX was hardcoded — the
4.1.0 release shipped with the pill still reading 4.0.1 while the
header version badge (which already reads from
builds/knockout/package.json) was correctly showing 4.1.0.

Mirror the Header.astro pattern: import the build's package.json and
interpolate pkg.version into the pill text and (implicitly via the
linked releases page) future tag refs. One canonical source for the
version, agents and humans see the same number, no per-release MDX
edit required.

Verification:
- bun run build (in tko.io/) — clean
- Built dist/index.html shows "TKO v4.1.0 is here →" and the header
  badge "v4.1.0" both pointing at the right release tag

https://claude.ai/code/session_01Jnv99bwWtFWFmsyL7A2cJv
Copilot AI review requested due to automatic review settings April 27, 2026 17:16
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 588f00cc-4853-454a-860e-a326443df939

📥 Commits

Reviewing files that changed from the base of the PR and between 07ec0f3 and 5296536.

📒 Files selected for processing (1)
  • tko.io/src/content/docs/index.mdx

📝 Walkthrough

Walkthrough

The documentation landing page now imports the local Knockout build's package.json and uses pkg.version to dynamically populate the displayed TKO release version in the "landing-version" link text, replacing a previously hardcoded version string.

Changes

Cohort / File(s) Summary
Version Synchronization
tko.io/src/content/docs/index.mdx
Import Knockout package.json and replace hardcoded version string (4.0.1) with dynamic pkg.version reference for build-time population.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

🐰 A version that hops with the build,
No hardcoding needed, just thrills,
From package.json it springs,
Dynamic as bunny-ear rings! 🎀

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: making the landing version pill dynamic by importing and using the package version instead of hardcoding it.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/landing-version-dynamic

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the tko.io landing page “version pill” to render the current TKO version dynamically from the canonical builds/knockout/package.json, aligning it with the existing header version badge behavior and removing per-release manual edits.

Changes:

  • Import builds/knockout/package.json in the landing MDX page.
  • Replace the hardcoded pill text version with {pkg.version} interpolation.

import pkg from '../../../../builds/knockout/package.json';

<a class="landing-version" href="https://github.com/knockout/tko/releases">TKO v4.0.1 is here &rarr;</a>
<a class="landing-version" href="https://github.com/knockout/tko/releases">TKO v{pkg.version} is here &rarr;</a>
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description/verification says the landing pill links to the specific release tag for the displayed version, but the updated anchor still points to the generic /releases page. Either update the href to include the version tag (to match the header badge behavior) or adjust the PR description/verification notes so they match the actual behavior.

Copilot uses AI. Check for mistakes.
@brianmhunt brianmhunt merged commit 7590b48 into main Apr 27, 2026
13 checks passed
@brianmhunt brianmhunt deleted the docs/landing-version-dynamic branch April 27, 2026 17:29
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.

3 participants