From a430a3b927cdec3abbe7bbd5d1a7b863e5f8fd55 Mon Sep 17 00:00:00 2001 From: David Pine <7679720+IEvangelist@users.noreply.github.com> Date: Mon, 26 Oct 2026 22:05:24 -0500 Subject: [PATCH 1/5] Add latest release badge to homepage Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .agents/skills/whatsnew/SKILL.md | 7 +- .../whatsnew/references/01-draft-scaffold.md | 44 ++++++---- .../skills/whatsnew/references/04-validate.md | 8 +- .../skills/whatsnew/references/05-polish.md | 4 +- src/frontend/config/aspire-versions.mjs | 1 + .../src/components/home/HomeHero.astro | 83 ++++++++++++++----- src/frontend/src/content/docs/index.mdx | 4 - src/frontend/src/content/docs/support.mdx | 4 +- src/frontend/tests/e2e/homepage.spec.ts | 14 ++++ .../unit/custom-components.vitest.test.ts | 6 ++ 10 files changed, 123 insertions(+), 52 deletions(-) diff --git a/.agents/skills/whatsnew/SKILL.md b/.agents/skills/whatsnew/SKILL.md index aa39be032f..587f8ab9e6 100644 --- a/.agents/skills/whatsnew/SKILL.md +++ b/.agents/skills/whatsnew/SKILL.md @@ -29,7 +29,7 @@ infer from context — e.g. a fresh release with no page → `draft`). | Modality | Alias | Purpose | Spec | Edits content? | |----------|-------|---------|------|----------------| -| `draft` | `scaffold`, `init` | Stand up branch, draft PR, skeleton MDX, banner, sidebar, version constants. **Structure only.** | [`01-draft-scaffold.md`](./references/01-draft-scaffold.md) | Skeleton only | +| `draft` | `scaffold`, `init` | Stand up branch, draft PR, skeleton MDX, release badge, banners, sidebar, version constants. **Structure only.** | [`01-draft-scaffold.md`](./references/01-draft-scaffold.md) | Skeleton only | | `research` | — | Enumerate every change into an impact-focused **dossier**, then **author the first-draft prose** into the MDX from it. | [`02-research.md`](./references/02-research.md) | **Yes — drafts the body** | | `critique` | — | Content-quality **self-review** of draft vs dossier; severity-ranked findings. | [`03-critique.md`](./references/03-critique.md) | **No — reports only** | | `validate` | — | **Ralph loop** with `doc-pr-reviewer` until 100% factual; samples/links/assets. **No `bun run build`.** | [`04-validate.md`](./references/04-validate.md) | Fixes only | @@ -86,9 +86,10 @@ infer from context — e.g. a fresh release with no page → `draft`). | What | Path | |------|------| | What's-new pages | `src/frontend/src/content/docs/whats-new/aspire-N-N.mdx` (JA under `.../ja/whats-new/`) | -| Version constants | `src/frontend/config/aspire-versions.mjs` (`currentAspireMajorMinorVersion`, `currentAspireVersion`, `currentAspireReleaseDate`, `currentAspirePreviewVersion`) | +| Version constants | `src/frontend/config/aspire-versions.mjs` (`currentAspireMajorMinorVersion`, `currentAspireVersion`, `currentAspireReleaseDate`, `latestAspireReleaseVersion`, `currentAspirePreviewVersion`) | +| Homepage release badge | `src/frontend/src/components/home/HomeHero.astro` (reads `latestAspireReleaseVersion`; release-page slug derives from `currentAspireMajorMinorVersion`) | | Sidebar | `src/frontend/config/sidebar/docs.topics.ts` (What's-new `items`) | -| Announcement banner | `banner:` frontmatter on `src/frontend/src/content/docs/index.mdx`, `src/frontend/src/content/docs/docs.mdx`, `src/frontend/src/content/docs/community/index.mdx`, and each `src/frontend/src/content/docs/{locale}/index.mdx` (+ `.../ja/docs.mdx`); rendered by `src/frontend/src/components/starlight/Banner.astro` | +| Announcement banner | `banner:` frontmatter on `src/frontend/src/content/docs/docs.mdx`, `src/frontend/src/content/docs/community/index.mdx`, each localized `src/frontend/src/content/docs/{locale}/index.mdx`, and `src/frontend/src/content/docs/ja/docs.mdx`; rendered by `src/frontend/src/components/starlight/Banner.astro` | | Assets | `src/frontend/src/assets/whats-new/aspire-/` | | Container image data | `src/frontend/src/data/container-images.json` | | Diagnostics articles | `src/frontend/src/content/docs/diagnostics/aspire.mdx` → `/diagnostics/aspire/` | diff --git a/.agents/skills/whatsnew/references/01-draft-scaffold.md b/.agents/skills/whatsnew/references/01-draft-scaffold.md index e2e0168b85..44514104fd 100644 --- a/.agents/skills/whatsnew/references/01-draft-scaffold.md +++ b/.agents/skills/whatsnew/references/01-draft-scaffold.md @@ -3,8 +3,9 @@ > Aliases: `draft`, `scaffold`, `init`. **Structure only — no researched content.** Stand up everything a new "What's new in Aspire N.N" page needs so the team can -start iterating: the release branch, the skeleton MDX, the site banner, the sidebar -entry, and the version constants — all **committed**, and only then a **draft PR**. +start iterating: the release branch, the skeleton MDX, the homepage release badge, +the site banners, the sidebar entry, and the version constants — all **committed**, +and only then a **draft PR**. Idempotent — safe to re-run; detect and update what already exists instead of duplicating. @@ -45,33 +46,39 @@ duplicating. The resource directory automatically includes the page as `release-notes` and reads its image and `publishDate`; no separate catalog entry is needed. 3. **Version constants.** Update `src/frontend/config/aspire-versions.mjs`: - `currentAspireMajorMinorVersion = 'N.N'`, `currentAspireVersion` to the latest - stable `N.N.PATCH`, `currentAspireReleaseDate` to that patch's NuGet publish - date (`YYYY-MM-DD`, shown in the Install CLI dialog), and `currentAspirePreviewVersion` to the matching full - `N.N.PATCH-preview.*` package version. Set both package versions to the initial - release patch when N.N becomes current, then keep them aligned with the site - AppHost during servicing updates. These drive the Aspire version remark - placeholders site-wide. -4. **Site-wide announcement banner.** The banner is **per-page frontmatter**, not a + - Set `currentAspireMajorMinorVersion = 'N.N'`. + - Keep `currentAspireVersion` and `currentAspireReleaseDate` aligned with the + stable SDK/package version used by the site AppHost. This is not necessarily + the latest public GitHub patch release. + - Set `latestAspireReleaseVersion` to the latest public `N.N.PATCH` release tag. + The homepage badge reads this value and links to `/whats-new/{SLUG}/`. + - Set `currentAspirePreviewVersion` to the matching full + `N.N.PATCH-preview.*` package version used by the site AppHost. + + The AppHost-aligned constants drive version placeholders and the Install CLI + dialog. `latestAspireReleaseVersion` independently drives the homepage badge. +4. **Homepage release badge.** Do not hand-edit badge markup or copy. Confirm + `latestAspireReleaseVersion` renders as the full point release and that the badge + links to `/whats-new/{SLUG}/` and `/support/`. +5. **Site-wide announcement banners.** The banner is **per-page frontmatter**, not a global config. Update the `banner.content` string **and its link** to point at `/whats-new/{SLUG}/` across every landing page that carries it, and set `bannerAutoDismissAfterDays: 14` (and `bannerExpiresOn` if used): - - English: `src/frontend/src/content/docs/index.mdx`, `docs.mdx`, - `community/index.mdx`. + - English: `src/frontend/src/content/docs/docs.mdx` and `community/index.mdx`. - Every locale: `src/frontend/src/content/docs/{locale}/index.mdx` (+ `ja/docs.mdx`). Translate the announcement text per locale and point at the locale-appropriate whats-new path. (Grep `banner:` under `src/frontend/src/content/docs/` to enumerate current banner pages.) -5. **Sidebar entry.** In `src/frontend/config/sidebar/docs.topics.ts`, add +6. **Sidebar entry.** In `src/frontend/config/sidebar/docs.topics.ts`, add `{ label: 'Aspire N.N', slug: 'whats-new/{SLUG}' }` at the **top** of the What's-new `items`. Roll the now-older version into the "Previous versions" group per the existing pattern. -6. **Assets.** Create `src/frontend/src/assets/whats-new/aspire-{VERSION_FULL}/` +7. **Assets.** Create `src/frontend/src/assets/whats-new/aspire-{VERSION_FULL}/` only when adding actual screenshots. Do not create an empty directory or `.gitkeep`; reused shared artwork needs no release-specific folder. -7. **Commit the scaffold.** Stage and commit all of the above on `release/{N.N}` so the +8. **Commit the scaffold.** Stage and commit all of the above on `release/{N.N}` so the branch has a diff against the default branch (nothing to PR otherwise). -8. **Draft PR.** *Now* open a **draft** PR from `release/{N.N}` into the repository's +9. **Draft PR.** *Now* open a **draft** PR from `release/{N.N}` into the repository's **default branch** for the team to iterate on. Create it if missing; don't mark it ready here (that's {review}). @@ -83,9 +90,10 @@ duplicating. ## Exit criteria - Page exists and is structurally sound (frontmatter + imports + section skeleton). -- Sidebar resolves the new slug; banner points at the new article across locales. +- Sidebar resolves the new slug; the homepage badge shows the full point release + and links to the new article; banners point at the new article across locales. - Release-specific screenshots exist and `resourceImage` resolves to them, or their capture is explicitly tracked as incomplete. The resource directory discovers one release-notes entry with the expected metadata. -- Version constants updated; draft PR is open. +- AppHost and latest-release version constants updated; draft PR is open. - **No researched prose yet** — only structure and placeholders. diff --git a/.agents/skills/whatsnew/references/04-validate.md b/.agents/skills/whatsnew/references/04-validate.md index 3ca54ded0b..9fd70cb94c 100644 --- a/.agents/skills/whatsnew/references/04-validate.md +++ b/.agents/skills/whatsnew/references/04-validate.md @@ -32,8 +32,10 @@ then **fix → re-review → repeat** until it converges clean: image/asset reference exists. For links **into `release/{N.N}`** that may not be merged yet: **block on truly-broken**, **warn on not-yet-merged `docs-from-code`** targets. -- **Banner + version wiring:** banner points at the new article across locales; version - constants in `aspire-versions.mjs` are correct. +- **Release badge + banner + version wiring:** the homepage badge shows + `latestAspireReleaseVersion`, links to the current What's-new page and `/support/`, + banners point at the new article across locales, and AppHost-aligned version + constants remain correct. - **Resource directory:** `resourceImage` is present and every configured image resolves to a newly captured screenshot of a feature introduced in this release. Verify capture provenance (product version, scenario, and actual UI state); @@ -58,4 +60,4 @@ good technical read. - `doc-pr-reviewer` converges with **no** factual findings. - All `twoslash` samples pass; all links/assets resolve (or are explicitly warn-listed as pending `docs-from-code`). -- MDX/frontmatter valid; sidebar/banner/version wiring correct. +- MDX/frontmatter valid; sidebar/release-badge/banner/version wiring correct. diff --git a/.agents/skills/whatsnew/references/05-polish.md b/.agents/skills/whatsnew/references/05-polish.md index 35960c5394..d1dd834245 100644 --- a/.agents/skills/whatsnew/references/05-polish.md +++ b/.agents/skills/whatsnew/references/05-polish.md @@ -62,8 +62,8 @@ handoff. **Re-run [`{validate}`](./04-validate.md)** on the changed article and - `doc-pr-reviewer` surfaces **no** new factual findings on the edited prose. - `twoslash-validator` passes on any changed/regenerated `twoslash` blocks. -- MDX/frontmatter still valid; all links/assets still resolve; sidebar/banner/version - wiring intact. +- MDX/frontmatter still valid; all links/assets still resolve; sidebar/release-badge/ + banner/version wiring intact. `{polish}` is **not done** until this final `{validate}` pass is green (`{review}` re-confirms it). diff --git a/src/frontend/config/aspire-versions.mjs b/src/frontend/config/aspire-versions.mjs index d040055168..80acab94ce 100644 --- a/src/frontend/config/aspire-versions.mjs +++ b/src/frontend/config/aspire-versions.mjs @@ -2,6 +2,7 @@ export const currentAspireMajorMinorVersion = '13.6'; export const currentAspireVersion = '13.6.0'; // Release date (YYYY-MM-DD) of currentAspireVersion; update together with the version. export const currentAspireReleaseDate = '2026-09-29'; +export const latestAspireReleaseVersion = '13.6.4'; export const currentAspirePreviewVersion = '13.6.0-preview.1.26479.8'; export const aspireVersionPlaceholders = Object.freeze({ diff --git a/src/frontend/src/components/home/HomeHero.astro b/src/frontend/src/components/home/HomeHero.astro index edc5aea5c8..10280cb1b9 100644 --- a/src/frontend/src/components/home/HomeHero.astro +++ b/src/frontend/src/components/home/HomeHero.astro @@ -6,9 +6,15 @@ import heroImage from '@assets/aspire-hero.png'; import AppHostBuilder from '@components/AppHostBuilder.astro'; import { localizedHref } from '@utils/helpers'; import { getLocaleFromPath } from '@utils/locale-routes'; +import { + currentAspireMajorMinorVersion, + latestAspireReleaseVersion, +} from '../../../config/aspire-versions.mjs'; const t = Astro.locals.t; const locale = getLocaleFromPath(Astro.url.pathname); +const releaseSlug = currentAspireMajorMinorVersion.replace('.', '-').replace(/-0$/, ''); +const releaseHref = `/whats-new/aspire-${releaseSlug}/`; ---