From e2a657082d5fb1403552460381a2b400132cfbbf Mon Sep 17 00:00:00 2001 From: Kristin Brown Date: Thu, 15 Oct 2026 07:47:02 -0400 Subject: [PATCH 1/5] Moved more doc test info to theme Signed-off-by: Kristin Brown --- layouts/partials/docs/under-heading.html | 25 ------------------------ layouts/partials/test-status-badge.html | 11 ----------- 2 files changed, 36 deletions(-) delete mode 100644 layouts/partials/docs/under-heading.html delete mode 100644 layouts/partials/test-status-badge.html diff --git a/layouts/partials/docs/under-heading.html b/layouts/partials/docs/under-heading.html deleted file mode 100644 index a2a407fb6..000000000 --- a/layouts/partials/docs/under-heading.html +++ /dev/null @@ -1,25 +0,0 @@ -{{- /* - Extension slot from docs-theme-extras (partials/docs/under-heading.html). - Per-page doc-test status badge. Renders on detail pages only. - - WHY THIS SLOT AND NOT `after-title.html`. Both put the badge under the

on - a wide screen, but this one renders INSIDE the heading's own flex column, - which is what makes the narrow-viewport order right. Below Hextra's `sm` - breakpoint the title area stacks, so an `after-title` badge lands BELOW the - "Copy as Markdown" button — heading, button, badge. From here it stays with - the heading: heading, badge, button. - - It also removes a magic number. From this slot the badge is a normal block in - the heading column, so its spacing is its own margins. Rendered from - `after-title` it sat below a flex row sized by the buttons, and pulling it - back under the heading needed a negative margin calibrated against the button - height — which silently drifts the day that control changes size. - - The badge is gated on `.Params.test_status`, which no committed page carries — - CI injects it (`make test-status` -> scripts/doc_test_inject_status.py) before - the production build, and only for the `latest` and `main` version trees (see - TESTED_VERSIONS in scripts/doc_test_run.py). A plain local build renders this - zero times and that is expected. To see it locally, set `test_status: passed` - in a page's front matter. -*/ -}} -{{ partial "test-status-badge.html" . }} diff --git a/layouts/partials/test-status-badge.html b/layouts/partials/test-status-badge.html deleted file mode 100644 index c7e4c8722..000000000 --- a/layouts/partials/test-status-badge.html +++ /dev/null @@ -1,11 +0,0 @@ -{{/* Test Status Badge - displays a "verified" badge if all tests passed */}} -{{- $testStatus := .Params.test_status -}} -{{- if eq $testStatus "passed" -}} - - - Verified - Code examples on this page have been automatically tested and verified. - -{{- end -}} From 8c07dcced7af3eafa2834db0011569f1f1a1d9c2 Mon Sep 17 00:00:00 2001 From: Kristin Brown Date: Thu, 15 Oct 2026 07:47:12 -0400 Subject: [PATCH 2/5] Moved more doc test info to theme Signed-off-by: Kristin Brown --- assets/css/custom.css | 145 --------------------------- go.mod | 2 +- go.sum | 2 + layouts/docs/api-ref.html | 2 +- layouts/docs/kubernetes/api-ref.html | 2 +- 5 files changed, 5 insertions(+), 148 deletions(-) diff --git a/assets/css/custom.css b/assets/css/custom.css index 850da3ab4..432a9fc82 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -91,151 +91,6 @@ h6 { } -/* Test Status Badge - Modern gradient style */ -.test-status-badge { - position: relative; - /* Block-level, not inline-flex. As an inline box the badge sat in an - anonymous line box whose height was floored by the parent's line-height - strut, so a negative margin-top could only ever move it a few pixels — - -20px moved it 7. All three call sites already put the badge on its own - line between the

and the description, so nothing needs it inline. */ - display: flex; - width: fit-content; - align-items: center; - gap: 0.4rem; - padding: 0.3rem 0.75rem; - border: 1px solid #d1d5db; - border-radius: 6px; - font-size: 0.7rem; - font-weight: 600; - line-height: 1; - /* No margin-bottom. The badge is the last thing in the heading column, and - the whitespace before the page description belongs to the title row as a - whole — see the `:has()` rule below. Putting it here instead would open a - gap between the badge and the "Copy as Markdown" button on a narrow - viewport, where the two stack. */ - margin-top: 0.5rem; - margin-bottom: 0; - letter-spacing: 0.03em; - text-transform: none; - transition: all 0.2s ease; - cursor: default; -} - -/* Spacing is plain margins, with no breakpoint rule and no negative value, - because the badge renders from the `docs/under-heading.html` slot — inside - the heading's own flex column, directly below the

. - - An earlier version of this rendered from `docs/after-title.html`, below the - title flex row, and needed `margin-top: -1.25rem` scoped to >=640px to drag - the badge back up under the heading. That number was calibrated against the - height of the "Copy as Markdown" control, so it would have drifted the moment - that control changed size, and it had to be breakpoint-scoped because below - 640px the row stacks and the pull-up would have landed the badge on top of - the buttons. Moving slots deleted the whole problem. - - The gap before the page description is put on the TITLE ROW, not on the - badge, so it always falls after the LAST thing in the title area. On a wide - viewport that is the badge; on a narrow one the row is `flex-col` and the - last thing is the "Copy as Markdown" button, so the whitespace lands after - the button rather than stranding it below the gap. - - `:has()` scopes this to pages that actually show a badge — an untested page - keeps Hextra's stock `hx:mb-4` and is untouched. Specificity is (0,2,1) - against Tailwind's (0,1,0) `.hx\:mb-4`, so it wins without `!important`. */ -.content > div:has(.test-status-badge) { - margin-bottom: 1.75rem; -} - -.test-status-passed { - background: none; - color: #111827; - box-shadow: none; -} - -.test-status-passed:hover { - transform: translateY(-1px); -} - -.test-status-passed .test-status-icon { - fill: #059669; -} - -.dark .test-status-passed { - background: none; - color: #f9fafb; - box-shadow: none; - border-color: #9ca3af; -} - -.dark .test-status-passed:hover { - box-shadow: none; -} - -.dark .test-status-passed .test-status-icon { - fill: #34d399; -} - -.test-status-icon { - width: 0.7rem; - height: 0.7rem; - fill: currentColor; - flex-shrink: 0; -} - -.test-status-text { - white-space: nowrap; -} - -/* Modern tooltip */ -.test-status-tooltip { - position: absolute; - left: 50%; - top: 100%; - transform: translateX(-50%) translateY(8px); - padding: 0.5rem 0.75rem; - background: #1f2937; - color: #ffffff; - font-size: 0.8rem; - font-weight: 500; - line-height: 1.4; - letter-spacing: normal; - text-transform: none; - white-space: nowrap; - border-radius: 6px; - box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1); - opacity: 0; - visibility: hidden; - transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease; - z-index: 50; - pointer-events: none; -} - -.test-status-tooltip::before { - content: ''; - position: absolute; - left: 50%; - bottom: 100%; - transform: translateX(-50%); - border: 6px solid transparent; - border-bottom-color: #1f2937; -} - -.test-status-badge:hover .test-status-tooltip { - opacity: 1; - visibility: visible; - transform: translateX(-50%) translateY(6px); -} - -.dark .test-status-tooltip { - background: #374151; - color: #f3f4f6; -} - -.dark .test-status-tooltip::before { - border-bottom-color: #374151; -} - /* Theme-toggle dropdown — fix checkmark/text overlap. Hextra's hx:ltr:pl-3, hx:ltr:pr-9, hx:py-1.5, and hx:ltr:right-3 live inside @layer utilities in main.css. Tailwind v3's unlayered button { padding:0 } diff --git a/go.mod b/go.mod index cf5ad8838..2b95421ed 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/agentgateway/website go 1.21 -require github.com/solo-io/docs-theme-extras v0.3.17 // indirect +require github.com/solo-io/docs-theme-extras v0.3.18-beta.2 // indirect diff --git a/go.sum b/go.sum index fe619abae..a860402cf 100644 --- a/go.sum +++ b/go.sum @@ -12,3 +12,5 @@ github.com/solo-io/docs-theme-extras v0.3.17-beta.1 h1:d4uoaQqdvx2IZOSjKV9TgtFjI github.com/solo-io/docs-theme-extras v0.3.17-beta.1/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= github.com/solo-io/docs-theme-extras v0.3.17 h1:SSfI0zexM1ac3XMKkj4em22lRZkjF+8C/0uXkSjaXp0= github.com/solo-io/docs-theme-extras v0.3.17/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= +github.com/solo-io/docs-theme-extras v0.3.18-beta.2 h1:KwcGiuDbif8OM9/CKmB1WpBXUJnktzRgbQQApRaDTlE= +github.com/solo-io/docs-theme-extras v0.3.18-beta.2/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= diff --git a/layouts/docs/api-ref.html b/layouts/docs/api-ref.html index 9f5bf2426..d4c4c0e40 100644 --- a/layouts/docs/api-ref.html +++ b/layouts/docs/api-ref.html @@ -31,7 +31,7 @@ {{ partial "docs-llms-directive.html" . }} {{ partial "copy-markdown.html" . }} {{ if .Title }}

{{ .Title }}

{{ end }} - {{ partial "test-status-badge.html" . }} + {{ partial "components/test-status-badge.html" . }} {{- with .Description }}

{{ . | markdownify }}

{{ end }} {{- /* Split .Content on the widget slot sentinel so the kubespec HTML can diff --git a/layouts/docs/kubernetes/api-ref.html b/layouts/docs/kubernetes/api-ref.html index 4b81e97d9..3bf360198 100644 --- a/layouts/docs/kubernetes/api-ref.html +++ b/layouts/docs/kubernetes/api-ref.html @@ -31,7 +31,7 @@ {{ partial "docs-llms-directive.html" . }} {{ partial "copy-markdown.html" . }} {{ if .Title }}

{{ .Title }}

{{ end }} - {{ partial "test-status-badge.html" . }} + {{ partial "components/test-status-badge.html" . }} {{- with .Description }}

{{ . | markdownify }}

{{ end }} {{- /* Split .Content on the widget slot sentinel so the kubespec HTML can From add208d4b5fae9dd364ed10396bfacd516af975c Mon Sep 17 00:00:00 2001 From: Kristin Brown Date: Thu, 15 Oct 2026 09:13:22 -0400 Subject: [PATCH 3/5] Updated go mod Signed-off-by: Kristin Brown --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 2b95421ed..6cdaa1464 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/agentgateway/website go 1.21 -require github.com/solo-io/docs-theme-extras v0.3.18-beta.2 // indirect +require github.com/solo-io/docs-theme-extras v0.3.18-beta.3 // indirect diff --git a/go.sum b/go.sum index a860402cf..8ee63dcaa 100644 --- a/go.sum +++ b/go.sum @@ -14,3 +14,5 @@ github.com/solo-io/docs-theme-extras v0.3.17 h1:SSfI0zexM1ac3XMKkj4em22lRZkjF+8C github.com/solo-io/docs-theme-extras v0.3.17/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= github.com/solo-io/docs-theme-extras v0.3.18-beta.2 h1:KwcGiuDbif8OM9/CKmB1WpBXUJnktzRgbQQApRaDTlE= github.com/solo-io/docs-theme-extras v0.3.18-beta.2/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= +github.com/solo-io/docs-theme-extras v0.3.18-beta.3 h1:AMySgn8JZy3CD3m9NhH4paC4u6qCsim6tvTXv11gs3Q= +github.com/solo-io/docs-theme-extras v0.3.18-beta.3/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= From b11a2f07be69a0919208ba85f8643fe9b8321244 Mon Sep 17 00:00:00 2001 From: Kristin Brown Date: Thu, 15 Oct 2026 09:40:10 -0400 Subject: [PATCH 4/5] Updated go mod Signed-off-by: Kristin Brown --- go.mod | 2 +- go.sum | 20 ++------------------ 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/go.mod b/go.mod index 6cdaa1464..549aaf180 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/agentgateway/website go 1.21 -require github.com/solo-io/docs-theme-extras v0.3.18-beta.3 // indirect +require github.com/solo-io/docs-theme-extras v0.3.18 // indirect diff --git a/go.sum b/go.sum index 8ee63dcaa..971acc5c8 100644 --- a/go.sum +++ b/go.sum @@ -1,18 +1,2 @@ -github.com/solo-io/docs-theme-extras v0.3.9 h1:1LjnFCWa0ULmtbU94IWD16CTE6Um2d59jWu8M9zKddc= -github.com/solo-io/docs-theme-extras v0.3.9/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= -github.com/solo-io/docs-theme-extras v0.3.10 h1:t2BkRKkD24hDKvatZGLxXZVspnNQGRfVm9kf7RdvnY0= -github.com/solo-io/docs-theme-extras v0.3.10/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= -github.com/solo-io/docs-theme-extras v0.3.11 h1:b8FqyAdKi3U0JjeBsMehTsJMUztKuEfv2iM66Ypkf50= -github.com/solo-io/docs-theme-extras v0.3.11/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= -github.com/solo-io/docs-theme-extras v0.3.15 h1:Wx44OmemNz4Ptoxc7dFuGkf86fTJ30mcAo6rdCivaEU= -github.com/solo-io/docs-theme-extras v0.3.15/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= -github.com/solo-io/docs-theme-extras v0.3.16 h1:lPSS9awzzgeD39h32v3gEISlerOr0rEwi+QW3yy7b3A= -github.com/solo-io/docs-theme-extras v0.3.16/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= -github.com/solo-io/docs-theme-extras v0.3.17-beta.1 h1:d4uoaQqdvx2IZOSjKV9TgtFjIUPwivVDGyqsO4Y34Ko= -github.com/solo-io/docs-theme-extras v0.3.17-beta.1/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= -github.com/solo-io/docs-theme-extras v0.3.17 h1:SSfI0zexM1ac3XMKkj4em22lRZkjF+8C/0uXkSjaXp0= -github.com/solo-io/docs-theme-extras v0.3.17/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= -github.com/solo-io/docs-theme-extras v0.3.18-beta.2 h1:KwcGiuDbif8OM9/CKmB1WpBXUJnktzRgbQQApRaDTlE= -github.com/solo-io/docs-theme-extras v0.3.18-beta.2/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= -github.com/solo-io/docs-theme-extras v0.3.18-beta.3 h1:AMySgn8JZy3CD3m9NhH4paC4u6qCsim6tvTXv11gs3Q= -github.com/solo-io/docs-theme-extras v0.3.18-beta.3/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= +github.com/solo-io/docs-theme-extras v0.3.18 h1:C2T1qPTVD7suFI5SjaC6QzYS/qWZIYpDB6ZgtWB68P8= +github.com/solo-io/docs-theme-extras v0.3.18/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= From 2149e8d07443b00cc38dfa742257465e2f740caa Mon Sep 17 00:00:00 2001 From: Kristin Brown Date: Thu, 15 Oct 2026 10:31:32 -0400 Subject: [PATCH 5/5] Fix Signed-off-by: Kristin Brown --- .github/workflows/doc-tests.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/doc-tests.yaml b/.github/workflows/doc-tests.yaml index 5ba2201bb..9afacdaac 100644 --- a/.github/workflows/doc-tests.yaml +++ b/.github/workflows/doc-tests.yaml @@ -329,7 +329,7 @@ jobs: else echo "has_tests=false" >> $GITHUB_OUTPUT fi - MATRIX=$(echo "$TESTS" | jq -c '(length | [., 40] | min) as $shards | . as $tests | {include: [range($shards) | . as $i | ([$tests | to_entries[] | select(.key % $shards == $i) | .value] as $shard | {shard_index: $i, test_count: ($shard | length), tests: ($shard | tojson), shard_name: ($shard | [.[].test] | join(", ") | if length > 80 then .[:77] + "..." else . end)})]}') + MATRIX=$(echo "$TESTS" | jq -c '(length | [., 40] | min) as $shards | . as $tests | {include: [range($shards) | . as $i | ([$tests | to_entries[] | select(.key % $shards == $i) | .value] as $shard | {shard_index: $i, test_count: ($shard | length), tests: ($shard | tojson), shard_name: ($shard | [.[] | "\(.test) (\(.file | split("/")[2:4] | join("/")))"] | join(", ") | if length > 80 then .[:77] + "..." else . end)})]}') echo "matrix=${MATRIX}" >> $GITHUB_OUTPUT echo "Discovered $COUNT functional/live test case(s)" @@ -343,7 +343,7 @@ jobs: else echo "has_credentialed_tests=false" >> $GITHUB_OUTPUT fi - MATRIX_CREDENTIALED=$(echo "$TESTS_CREDENTIALED" | jq -c '(length | [., 40] | min) as $shards | . as $tests | {include: [range($shards) | . as $i | ([$tests | to_entries[] | select(.key % $shards == $i) | .value] as $shard | {shard_index: $i, test_count: ($shard | length), tests: ($shard | tojson), shard_name: ($shard | [.[].test] | join(", ") | if length > 80 then .[:77] + "..." else . end)})]}') + MATRIX_CREDENTIALED=$(echo "$TESTS_CREDENTIALED" | jq -c '(length | [., 40] | min) as $shards | . as $tests | {include: [range($shards) | . as $i | ([$tests | to_entries[] | select(.key % $shards == $i) | .value] as $shard | {shard_index: $i, test_count: ($shard | length), tests: ($shard | tojson), shard_name: ($shard | [.[] | "\(.test) (\(.file | split("/")[2:4] | join("/")))"] | join(", ") | if length > 80 then .[:77] + "..." else . end)})]}') echo "matrix_credentialed=${MATRIX_CREDENTIALED}" >> $GITHUB_OUTPUT echo "Discovered $COUNT_CREDENTIALED credentialed test case(s)" @@ -874,6 +874,10 @@ jobs: # shortfall. schema-check needs no equivalent guard: it is a single job that # reports every case it discovers, and it fails the workflow on its own if # it does not run. + # + # A scenario skipped because its test markup no longer attaches is listed + # under skipped_needs_update, not tests. The shard already reported it and + # the summary flags it as a warning, so it counts as accounted for here. EXPECTED_TESTS: ${{ needs.discover.outputs.test_count }} run: | python3 -c " @@ -883,15 +887,16 @@ jobs: tests = report.get('tests', {}) failed = [k for k, v in tests.items() if v.get('status') != 'passed'] sharded = {k: v for k, v in tests.items() if v.get('type') != 'schema'} + needs_update = report.get('skipped_needs_update') or {} expected = int(os.environ.get('EXPECTED_TESTS') or 0) - missing = expected - len(sharded) + missing = expected - len(sharded) - len(needs_update) if failed: print(f'{len(failed)} test(s) failed:', file=sys.stderr) for name in failed: print(f' - {name}', file=sys.stderr) if missing > 0: print(f'{missing} discovered functional/live test(s) produced no result:', file=sys.stderr) - print(f' discovered {expected}, reported {len(sharded)}', file=sys.stderr) + print(f' discovered {expected}, reported {len(sharded)}, skipped (needs update) {len(needs_update)}', file=sys.stderr) if failed or missing > 0: sys.exit(1) print(f'All {len(tests)} test(s) passed')