Skip to content

[EPIC #60] Enrich version management UX: upgrade output, release blog, contextual help#61

Merged
shouze merged 10 commits intomainfrom
feat/version-management-ux
Feb 27, 2026
Merged

[EPIC #60] Enrich version management UX: upgrade output, release blog, contextual help#61
shouze merged 10 commits intomainfrom
feat/version-management-ux

Conversation

@shouze
Copy link
Contributor

@shouze shouze commented Feb 27, 2026

Closes #55, closes #56, closes #57, closes #58, closes #59, closes #51.

Part of epic #60.


What changed

src/upgrade.ts

  • Add html_url to the GithubRelease interface
  • Add blogPostUrl(tag) pure helper: derives the VitePress blog post URL from a release tag
  • After a successful upgrade, print a rich post-upgrade message: Welcome line, "What's new" blog link, GitHub release notes link, commit comparison URL, bug-report link
  • Replace the bare "Already up to date (x)" with a friendlier "Congrats! You're already on the latest version…"
  • Export checkForUpdate(currentVersion, token?): silently returns the latest tag or null (never throws)

src/upgrade.test.ts

  • Add html_url to all release fixtures
  • Add blogPostUrl test suite
  • Add checkForUpdate test suite (5 cases: newer version, up-to-date, dev, network error, API 404)
  • Update performUpgrade assertions for the new "Welcome" / "Congrats" messages
  • 36 → 36 tests pass

docs/blog/

  • New docs/blog/index.md: listing page for all release posts
  • New docs/blog/release-v1-0-0.md: v1 series highlights

docs/.vitepress/config.mts

  • Add "What's New" nav item pointing to /blog/
  • Blog sidebar is built dynamically from docs/blog/*.md — new CI-generated stubs appear automatically without a manual config PR

.github/workflows/docs.yml

  • In the snapshot job: auto-generate docs/blog/release-vX-0-0.md on every vX.0.0 tag (idempotent)
  • Extend git-auto-commit-action to commit docs/blog/ alongside versions.json

github-code-search.ts

  • Import checkForUpdate from src/upgrade.ts
  • program --help footer: Documentation: https://fulll.github.io/github-code-search/
  • upgrade --help footer: links to /usage/upgrade
  • query --help footer: links to /usage/search-syntax
  • --exclude-repositories / --exclude-extracts: mention /usage/filtering
  • --format / --output-type: mention /usage/output-formats
  • --group-by-team-prefix: mention /usage/team-grouping
  • After non-interactive search output: race checkForUpdate against a 2 s timeout; if a newer version exists, print a yellow framed notice to stderr (never pollutes piped stdout, never shown in TUI mode)

Validation

bun test            → 357 pass / 0 fail
bun run lint        → 0 warnings, 0 errors
bun run format:check→ all files correctly formatted
bun run knip        → no unused exports / imports
bun run docs:build  → build complete in ~5s, no dead links

- Add docs/blog/index.md as release listing page
- Add docs/blog/release-v1-0-0.md with v1 highlights
- Add /blog/ nav item and sidebar to VitePress config

Part of #60, closes #56
- Add 'Generate blog post stub for new major version' step in the
  snapshot CI job: creates docs/blog/release-vX-0-0.md idempotently
- Extend git-auto-commit step to include docs/blog/ alongside versions.json
- Make blog sidebar dynamically generated from docs/blog/*.md files
  in config.mts so new stubs appear in the nav without a manual config PR

Part of #60, closes #57
- Add html_url to GithubRelease interface
- Add blogPostUrl() helper to derive doc blog URL from release tag
- Replace 'Already up to date' with friendlier 'Congrats!' message
- After successful upgrade print: Welcome message, What's new blog link,
  GitHub release notes link, commit comparison URL, bug-report link
- Add checkForUpdate() pure helper: returns latest tag or null (swallows errors)
- Update tests: add html_url to all fixtures, cover new messages,
  add full checkForUpdate test suite (36 tests pass)

Part of #60, closes #55, closes #51
[#58] Deep documentation links in CLI help:
- program --help shows 'Documentation: https://fulll.github.io/github-code-search/'
- upgrade --help points to /usage/upgrade
- query --help points to /usage/search-syntax
- --exclude-repositories/--exclude-extracts mention /usage/filtering
- --format/--output-type mention /usage/output-formats
- --group-by-team-prefix mentions /usage/team-grouping

[#59] Update-available notice after non-interactive search:
- import checkForUpdate() from upgrade.ts
- After CI/non-interactive output, race a 2s timeout against checkForUpdate
- If a newer version exists, print a yellow framed notice to stderr
  (never pollutes piped stdout, never shown in interactive TUI mode)

Also fix toSorted/toReversed lint warnings in config.mts

Part of #60, closes #58, closes #59
Copilot AI review requested due to automatic review settings February 27, 2026 08:37
@github-actions
Copy link

Coverage after merging feat/version-management-ux into main will be

96.32%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts97.50%100%100%97.18%52, 60
   api.ts93.43%100%100%92.51%235–239, 295, 312, 63–69
   cache.ts98.08%100%100%97.87%28
   group.ts100%100%100%100%
   output.ts99.12%100%94.74%99.52%58
   render.ts97.20%100%100%97.14%142–145
   upgrade.ts86.05%100%93.33%85.35%111–112, 132–139, 142–148, 153, 158, 194–197
src/render
   filter.ts100%100%100%100%
   highlight.ts99.29%100%100%99.01%184–185
   rows.ts100%100%100%100%
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%

Copy link
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

Improves the UX around version management by enriching upgrade output, adding a VitePress “What’s New” release blog section, and adding contextual documentation links + update notifications in the CLI.

Changes:

  • Enriched upgrade messaging (release/blog links, compare URL, bug link) and added checkForUpdate() for silent version checks.
  • Added docs blog pages + dynamic blog sidebar + nav entry.
  • Added contextual docs links in CLI help, plus an update-available notice after non-interactive searches.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/upgrade.ts Adds release html_url, blog URL helper, richer upgrade output, and checkForUpdate() helper.
src/upgrade.test.ts Updates fixtures/tests for html_url, blogPostUrl(), checkForUpdate(), and new upgrade output.
github-code-search.ts Adds contextual docs links to help output and prints update-available notice after non-interactive output.
docs/blog/index.md Adds the release blog index page.
docs/blog/release-v1-0-0.md Adds an initial release highlights post.
docs/.vitepress/config.mts Adds “What’s New” nav entry and builds /blog/ sidebar items dynamically from docs/blog/*.md.
.github/workflows/docs.yml Generates/commits a major-release blog stub alongside versions.json during snapshot tagging.

- Add HAS_COLOR guard (process.stdout.isTTY) — pipes and CI stay plain-text
- Add helpFormatConfig with Commander v14 style hooks:
    styleTitle       → bold yellow  (Usage:, Options:, Commands: …)
    styleCommandText → bold         (github-code-search name)
    styleSubcommandText / styleSubcommandTerm → cyan (upgrade, query)
    styleArgumentText / styleArgumentTerm     → yellow (<query>)
    styleOptionText / styleOptionTerm         → green (--org, --format …)
    styleOptionDescription + siblings → colorDesc():
      • 'Docs: <url>'  → dim label + cyan underlined URL
      • 'Example: ...' → dim label + italic value
      • Code-example lines (e.g. / repoA / myorg) → dim
- Add helpLink() and helpSection() helpers; update all addHelpText('after',…)
  calls to use them so 'Documentation:' labels are bold and URLs are cyan+underline
- Apply configureHelp(helpFormatConfig) to program, upgrade and query commands

Part of #60
@github-actions
Copy link

Coverage after merging feat/version-management-ux into main will be

96.32%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts97.50%100%100%97.18%52, 60
   api.ts93.43%100%100%92.51%235–239, 295, 312, 63–69
   cache.ts98.08%100%100%97.87%28
   group.ts100%100%100%100%
   output.ts99.12%100%94.74%99.52%58
   render.ts97.20%100%100%97.14%142–145
   upgrade.ts86.05%100%93.33%85.35%111–112, 132–139, 142–148, 153, 158, 194–197
src/render
   filter.ts100%100%100%100%
   highlight.ts99.29%100%100%99.01%184–185
   rows.ts100%100%100%100%
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%

- Fix blogPostUrl() no-op replace: normalize tag to always have v-prefix
  before slug-ifying (replace(/^v/, 'v') → \`v${tag.replace(/^v/, '')}\`)
- Add AbortController to checkForUpdate timeout race so the in-flight
  fetch is actually cancelled when the 2s deadline fires (github-code-search.ts)
- Pass AbortSignal through checkForUpdate → fetchLatestRelease
- Fix ESM __dirname usage in docs/.vitepress/config.mts: use
  fileURLToPath(new URL('../blog', import.meta.url)) instead of
  resolve(__dirname, '../blog') which may be undefined in ESM
- Add semantic version sort for blog sidebar: parseBlogVersion() +
  compareVersionArrays() helpers replace lexicographic toSorted().toReversed()
  so multi-digit versions (v1.10.0) sort correctly before v1.9.0
- Replace malformed sed command in docs.yml blog index update with a
  Python heredoc script that reliably inserts the new table row
- Pin stefanzweifel/git-auto-commit-action to commit SHA 8621497c
  (v5.0.1) to prevent supply-chain attacks flagged by GH Advanced Security
@github-actions
Copy link

Coverage after merging feat/version-management-ux into main will be

96.34%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts97.50%100%100%97.18%52, 60
   api.ts93.43%100%100%92.51%235–239, 295, 312, 63–69
   cache.ts98.08%100%100%97.87%28
   group.ts100%100%100%100%
   output.ts99.12%100%94.74%99.52%58
   render.ts97.20%100%100%97.14%142–145
   upgrade.ts86.52%100%93.33%85.89%117–118, 138–145, 148–154, 159, 164, 200–203
src/render
   filter.ts100%100%100%100%
   highlight.ts99.29%100%100%99.01%184–185
   rows.ts100%100%100%100%
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%

Copy link
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

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

…iles

- Add '## Release process' section to AGENTS.md covering:
  - semver decision table (patch / minor / major)
  - step-by-step release commands (bun pm version, tag, push)
  - what cd.yaml and docs.yml do automatically on each tag type
  - blog post convention (required for minor/major, optional for patch)
- Add step 8 to bug-fixing.instructions.md: patch release after merge
- Add step 8 to implement-feature.instructions.md: minor/major release
  after merge, including blog post reminder
@github-actions
Copy link

Coverage after merging feat/version-management-ux into main will be

96.34%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts97.50%100%100%97.18%52, 60
   api.ts93.43%100%100%92.51%235–239, 295, 312, 63–69
   cache.ts98.08%100%100%97.87%28
   group.ts100%100%100%100%
   output.ts99.12%100%94.74%99.52%58
   render.ts97.20%100%100%97.14%142–145
   upgrade.ts86.52%100%93.33%85.89%117–118, 138–145, 148–154, 159, 164, 200–203
src/render
   filter.ts100%100%100%100%
   highlight.ts99.29%100%100%99.01%184–185
   rows.ts100%100%100%100%
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%

New features in this release:
- Enriched upgrade output: blog post URL, release notes link, commit log
- Update-available notice printed on stderr after CI/non-interactive searches
- Colorized --help output (Commander style hooks, picocolors)
- Deep documentation links in every --help text
- What's New blog section in VitePress docs with per-release posts
- CI: auto-generate blog stub for major release tags
@github-actions
Copy link

Coverage after merging feat/version-management-ux into main will be

96.34%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts97.50%100%100%97.18%52, 60
   api.ts93.43%100%100%92.51%235–239, 295, 312, 63–69
   cache.ts98.08%100%100%97.87%28
   group.ts100%100%100%100%
   output.ts99.12%100%94.74%99.52%58
   render.ts97.20%100%100%97.14%142–145
   upgrade.ts86.52%100%93.33%85.89%117–118, 138–145, 148–154, 159, 164, 200–203
src/render
   filter.ts100%100%100%100%
   highlight.ts99.29%100%100%99.01%184–185
   rows.ts100%100%100%100%
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%

- Fix update notice box: corners and side bars were different widths
  (header used w-18 constant; corrected using totalWidth formula so all
  four sides are exactly w+4 characters wide)
- Fix docs.yml heredoc: blog stub was written with leading whitespace on
  every line (breaking YAML frontmatter); replaced with Python that
  writes the file programmatically, indented correctly for the YAML block
- Add test for already-aborted AbortSignal in checkForUpdate: verifies
  the function silently returns null when the signal is pre-aborted
- Fix 'organization' → 'organisation' in release-v1-0-0.md (British
  spelling consistent with the rest of the documentation)
@github-actions
Copy link

Coverage after merging feat/version-management-ux into main will be

96.34%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts97.50%100%100%97.18%52, 60
   api.ts93.43%100%100%92.51%235–239, 295, 312, 63–69
   cache.ts98.08%100%100%97.87%28
   group.ts100%100%100%100%
   output.ts99.12%100%94.74%99.52%58
   render.ts97.20%100%100%97.14%142–145
   upgrade.ts86.52%100%93.33%85.89%117–118, 138–145, 148–154, 159, 164, 200–203
src/render
   filter.ts100%100%100%100%
   highlight.ts99.29%100%100%99.01%184–185
   rows.ts100%100%100%100%
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%

@shouze shouze merged commit 24c427c into main Feb 27, 2026
8 checks passed
@shouze shouze deleted the feat/version-management-ux branch February 27, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment