Skip to content

fix(site): surface Jamf Security Cloud command count#285

Merged
ktn-jamf merged 1 commit into
mainfrom
fix/security-cloud-site-count
Jul 13, 2026
Merged

fix(site): surface Jamf Security Cloud command count#285
ktn-jamf merged 1 commit into
mainfrom
fix/security-cloud-site-count

Conversation

@ktn-jamf

Copy link
Copy Markdown
Collaborator

Problem

The GitHub Pages hero shows Jamf Security Cloud: 0, and the headline total (1,599) is 21 short of what main actually ships.

Security Cloud showing 0

Root cause — two independent issues

1. Latent regression in commands -o json (correctness). The product-detection walk in collectCommands matched any command literally named a namespace, so pro report security was tagged product: "security" instead of pro. In the released v1.22.0 it's correct; on current main it's wrong. On the next release Security Cloud would show 21 (one bogus) and Pro would be undercounted by one.

2. Stale deployed catalog. On non-release pushes, deploy-site.yaml builds the CLI from the latest release tag (v1.22.0) "so the deployed catalog reflects the released CLI." The Security Cloud namespace merged after v1.22.0, so the deployed binary has no security commands at all → the card genuinely shows 0 until v1.23.0 ships. Math checks out exactly: 1,620 (main) − 21 (security) = 1,599 (live). We're not changing the release-tracking contract — the "0" is truthful, it just looks broken.

Changes

  • Regression fix (root.go): gate the namespace check on top-level position (product == "") so a nested command named after a namespace can't be re-tagged. Adds TestCollectCommands_NestedNamespaceNameNotReclassified.
  • Graceful zero-state (catalog.js + style.css): any product stat card with a 0 count renders a muted "Soon" instead of a stark red "0". Reads as intentional, auto-clears to the real number on the next release, and generalizes to any future namespace.
  • Stale prose → dynamic (index.html): replace hardcoded "over 1,250 commands" in the FAQ body + JSON-LD with the __COMMAND_COUNT__ placeholder the deploy workflow already substitutes (its grep-guard fails the build on any leftover placeholder).
  • Group-order polish (catalog.js): add the real Security Cloud group titles (Device Risk & Lifecycle, Shared Signals & Events) to GROUP_ORDER so the section renders deliberately, not alphabetically.

Verification

  • make build && make test && make lint (0 issues) && make verify-site — all green.
  • Drove the built site in a browser against a regenerated catalog:
    • Live-data path: Security 20, Pro 1,349 (regained the mis-tagged command), header total 1,620, no zero-state.
    • Zero-state path (deployed-v1.22.0 catalog with security stripped): Security card shows "Soon", muted, in both light and dark themes.

🤖 Generated with Claude Code

…cards

The GitHub Pages hero showed "Jamf Security Cloud: 0" and a headline total 21
short of reality. Two independent causes:

1. Regression in `commands -o json`: the product-detection walk matched any
   command *named* a namespace, so `pro report security` was mis-tagged
   product "security" instead of "pro". Gate the namespace check on top-level
   position (product == "") so nested commands can't re-trigger it. Adds a
   regression test.

2. Deployed catalog is stale: non-release site deploys build the CLI from the
   latest release tag (v1.22.0), which predates the Security Cloud namespace,
   so its cards genuinely have no data until v1.23.0 ships. Render any product
   stat card with a 0 count as a muted "Soon" instead of a stark red "0" —
   honest, reads as intentional, and auto-clears to the real number on release.
   Generalized to every product card, so future namespaces get it for free.

Also refine the hero stat cards: restructure each label into two lines — "Jamf"
(with the brand icon) on the first, the product name on the second — so long
names like "Security Cloud" sit on their own line instead of overrunning the
card. Make labels bolder (600) and slightly smaller (0.8rem), add breathing
room under the number, and tighten the card footprint (180x124, was 200x135).

Finally, replace hardcoded "over 1,250 commands" FAQ/JSON-LD prose with the
__COMMAND_COUNT__ placeholder the deploy workflow already substitutes, and add
the two real Security Cloud group titles to the catalog's GROUP_ORDER so the
section renders in a deliberate order rather than alphabetical fallback.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ktn-jamf ktn-jamf force-pushed the fix/security-cloud-site-count branch from 99252ed to 271e218 Compare July 12, 2026 23:38
@ktn-jamf ktn-jamf enabled auto-merge (squash) July 13, 2026 00:01
@ktn-jamf ktn-jamf merged commit 27c4c11 into main Jul 13, 2026
2 checks passed
@ktn-jamf ktn-jamf deleted the fix/security-cloud-site-count branch July 13, 2026 07:13
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