Skip to content

Add JSON resolution fallback with available-* attribute support#384

Merged
JakeSCahill merged 6 commits into
mainfrom
feature/json-resolution-fallback
Jun 4, 2026
Merged

Add JSON resolution fallback with available-* attribute support#384
JakeSCahill merged 6 commits into
mainfrom
feature/json-resolution-fallback

Conversation

@JakeSCahill
Copy link
Copy Markdown
Contributor

Summary

Updates the UI to use new available-properties-tag and available-connect-version attributes from the docs-extensions-and-macros package, with fallback to latest-* attributes for backwards compatibility.

Problem

The latest-redpanda-tag and latest-connect-version attributes are set from GitHub releases, which may point to versions that don't have docs/attachments published yet. This causes:

  • Unresolved resource errors in the build logs
  • Property tooltips failing to load JSON data
  • Bloblang tooltips failing to load Connect JSON

Solution

Use the new available-* attributes (set by the extension to versions that actually exist in the content catalog) with fallback to latest-* for backwards compatibility:

{{#with (or page.componentVersion.asciidoc.attributes.available-properties-tag page.componentVersion.asciidoc.attributes.latest-redpanda-tag)}}

Changes

  • src/partials/head-meta.hbs: Use (or available-* latest-*) pattern for JSON URLs
  • src/helpers/resolve-resource.js: Add fallback URL parameter support
  • gulp.d/tasks/generate-bloblang-grammar.js: Fix Connect URL path (/connect/ not /redpanda-connect/)
  • src/ui.yml: Add static JSON fallback files for preview builds

Dependencies

Requires: redpanda-data/docs-extensions-and-macros#200

The extensions PR adds the available-properties-tag and available-connect-version attributes that this PR consumes. Both PRs should be merged together.

Test plan

  • Run local Antora build with both PRs
  • Verify no "unresolved resource" errors in build logs
  • Verify property tooltips load correctly
  • Verify Bloblang tooltips load correctly

🤖 Generated with Claude Code

Updates head-meta.hbs to use new available-properties-tag and
available-connect-version attributes from the docs-extensions-and-macros
package, with fallback to latest-* attributes for backwards compatibility.

Changes:
- head-meta.hbs: Use (or available-* latest-*) pattern for JSON URLs
- resolve-resource.js: Add fallback URL parameter support
- generate-bloblang-grammar.js: Fix Connect URL path (/connect/ not /redpanda-connect/)
- ui.yml: Add static JSON fallback files

The available-* attributes are set by set-latest-version extension to
point to JSON files that actually exist in the content catalog, solving
the issue where latest-* attributes may point to unreleased versions.

Requires: redpanda-data/docs-extensions-and-macros#200

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 1, 2026

Deploy Preview for docs-ui ready!

Name Link
🔨 Latest commit 269b3ff
🔍 Latest deploy log https://app.netlify.com/projects/docs-ui/deploys/6a21937b4d650700080ad048
😎 Deploy Preview https://deploy-preview-384--docs-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 30 (no change from production)
Accessibility: 89 (no change from production)
Best Practices: 92 (🔴 down 8 from production)
SEO: 88 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 1, 2026

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bcc586bc-20f6-40dd-b61a-7ac0ed69d92a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR introduces two new static JSON documentation assets for bloblang and Redpanda configuration properties, along with the infrastructure to serve and reference them. The changes register the new assets in ui.yml, enhance the resource resolver to support fallback URLs, emit corresponding metadata tags in the HTML head template, and update the grammar generation task to fetch connect.json from a new URL path.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • redpanda-data/docs-ui#359: The updates to Connect JSON assets and resolution directly support Bloblang interactive tooling that fetches Connect JSON for tooltips and Prism grammar.
  • redpanda-data/docs-ui#371: Both PRs modify src/partials/head-meta.hbs to emit additional metadata tags, with overlapping changes to robots directive handling.
  • redpanda-data/docs-ui#367: Both PRs update src/partials/head-meta.hbs to emit SEO-related metadata tags, though with different specific properties and metadata focus.

Suggested reviewers

  • Feediver1
  • micheleRP
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding JSON resolution fallback with available-* attribute support to handle cases where latest versions lack published docs.
Description check ✅ Passed The description thoroughly explains the problem being solved, the solution approach, specific file changes, and dependencies, all directly related to the changeset.
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 feature/json-resolution-fallback

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

@Feediver1 Feediver1 left a comment

Choose a reason for hiding this comment

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

Docs standards review (UI/theme PR)

Files reviewed: 4 (Handlebars partial, JS helper, gulp task, ui.yml). This is a UI/theme PR, not an .adoc content PR — the usual docs standards (voice, headings, glossterm, Antora xrefs) don't apply. Review focuses on correctness, consistency, and cross-repo coordination.

What this PR does

Fixes a class of build errors where latest-redpanda-tag / latest-connect-version point to GitHub releases that don't yet have published JSON attachments in the content catalog. The UI now reads new available-properties-tag and available-connect-version attributes (set by the companion extension PR) which are guaranteed to point at versions whose JSON files actually exist. Falls back to latest-* if available-* isn't set, so the change is backwards-compatible.

Touches four files:

  • src/partials/head-meta.hbs — adds 32 lines wrapping properties-json-url and connect-json-url meta tags in (or available-* latest-*) lookups, with full absolute-URL fallbacks via resolve-resource's new fallback parameter. Also adds a new disable-property-tooltips meta-tag opt-out (not mentioned in the PR description).
  • src/helpers/resolve-resource.js — adds a fallback URL parameter; returns it (instead of logging an unresolved warning + returning the raw resource string) when the file isn't in the content catalog.
  • gulp.d/tasks/generate-bloblang-grammar.js — changes CONNECT_JSON_BASE from https://docs.redpanda.com/redpanda-connect/components/_attachments to https://docs.redpanda.com/connect/components/_attachments.
  • src/ui.yml — adds redpanda-properties.json and connect.json to static_files.

Cross-repo dependency

Requires: redpanda-data/docs-extensions-and-macros#200 (also OPEN, not merged). Verified it sets the matching attributes:

  • available-properties-tag — highest version with a redpanda-properties-*.json in the catalog
  • available-connect-version — highest version with a connect-*.json in the catalog

Because this PR's (or available-* latest-*) pattern preserves the previous behavior when available-* isn't set, this PR is safe to merge before #200 — it just won't deliver the fix until #200 lands. Worth being explicit about merge order in the PR body.

Critical issues

  1. src/ui.yml adds two static files (redpanda-properties.json, connect.json) that don't appear to be consumed by anything in this diff. The fallback URLs in head-meta.hbs are versioned absolute URLs to production (https://docs.redpanda.com/streaming/.../redpanda-properties-{tag}.json and https://docs.redpanda.com/connect/components/_attachments/connect-{version}.json), not paths to these static UI files. The static files are unversioned and would be served at the UI bundle's root. Either there's a wire-up missing in the HBS (the resolver fallback should point at the static file, not production), or these files are leftover scaffolding that should be removed from ui.yml. Could you clarify the intent?

  2. The gulp URL change redpanda-connectconnect has no explanation. The PR body lists it as a "fix" but doesn't say what was broken. If the production path was redpanda-connect/components/_attachments and that's now connect/components/_attachments, this is a real fix; if it was the other way around, this is a regression. A 30-second test against the live URL would settle it — worth verifying or noting in the PR body what changed upstream.

Suggestions

  1. The disable-property-tooltips opt-out meta tag at the end of head-meta.hbs isn't mentioned in the PR description. It's a useful escape hatch but it's a new public surface for page authors. Worth a line in the body so future writers know they can set :disable-property-tooltips: on a page to suppress tooltips.

  2. Fallback URLs hardcode production (https://docs.redpanda.com/...). That means preview/dev builds fetching a missing local resource will hit production. Probably intentional (keeps previews functional), but worth confirming — a dev who's testing changes to properties JSON locally might be confused when their tooltips still show production data.

  3. Asymmetry between the two streaming-page fallback URLs is intentional but easy to miss. The first uses @root.page.version, the second uses (or @root.site.components.streaming.latest.version @root.site.components.ROOT.latest.version). The reason (one is page-relative, the other is site-default for non-streaming components) is correct, but a one-line Handlebars comment above each block would help future readers.

  4. PR title could mention the path fix. "Add JSON resolution fallback with available-* attribute support" covers the main change, but the gulp URL change and the new disable-tooltips meta tag are also in this PR. Even a sub-bullet in the description would help future archaeologists.

  5. Add a test plan checkbox for the gulp URL change. The current test plan validates property/Bloblang tooltips load and no unresolved-resource errors — it doesn't explicitly cover whether the Bloblang grammar generation now hits the correct upstream Connect JSON path.

Impact on related work

  • The Bloblang grammar generation depends on the gulp URL being correct against the current Connect docs URL structure. If the live Connect docs are at /connect/..., the change is correct; if they're still at /redpanda-connect/..., this PR breaks the build. Quick way to verify: curl -sI https://docs.redpanda.com/connect/components/_attachments/connect-4.79.0.json should return 200 (or whatever version is current).
  • The companion extension PR (#200) doesn't yet have a docs-side test. Once both land, you may want to add an Antora extension integration test that verifies available-properties-tag is actually populated by the catalog scan.
  • The site theme is consumed by docs, cloud-docs, and rp-connect-docs — all three repos pick up this UI bundle. Once this lands, watch builds on all three repos for unexpected meta-tag changes (the new properties-json-url, connect-json-url, disable-property-tooltips).

CodeRabbit findings worth considering

None — CodeRabbit posted no actionable findings on this PR.

What works well

  • Backwards-compatible fallback pattern. The (or available-* latest-*) Handlebars idiom means this PR is safe to merge before #200; nothing breaks if the new attributes aren't set yet.
  • Symmetric handling of streaming vs non-streaming pages. Both branches use the same fallback pattern so the behavior is predictable across component types.
  • resolve-resource.js change is minimal and well-targeted — adds a single optional parameter, preserves the previous error-logging path when no fallback is provided.
  • Cross-references the upstream extension PR clearly in the description so reviewers can follow the dependency.
  • CI is green including Netlify deploy-preview, which exercises the actual Handlebars rendering against the current site catalog.

@Feediver1
Copy link
Copy Markdown
Contributor

Not trusting Claude 100% here:
Did you take into account this info from the PR: Requires:
redpanda-data/docs-extensions-and-macros#200

The extensions PR adds the available-properties-tag and available-connect-version attributes
that this PR consumes. Both PRs should be merged together.

⏺ Yes, I did — I fetched docs-extensions-and-macros#200's diff and verified its commits set
exactly the available-properties-tag and available-connect-version attribute names that this
PR consumes. That's in the "Cross-repo dependency" section of the review I posted.

But you're flagging a real problem with my framing. Jake's PR explicitly says "Both PRs should
be merged together." My review went a step further and added "this PR is safe to merge before
#200 — it just won't deliver the fix until #200 lands." That's me second-guessing the
author's stated merge-order instruction. The technical statement is true (backwards-compat
fallback IS in place), but it's not my call to weaken Jake's "both together" guidance. If he
wants them coupled, the right reviewer behavior is to respect that — not to point out an
escape hatch.

The likely reason Jake wants them coupled, on reflection: landing #384 alone would deploy code
that looks like the fix has shipped (the available-* lookups are in the UI), but with #200
not yet merged, every page would silently take the fallback branch and prod would still emit
the same unresolved-resource errors. That makes diagnosis harder, not easier — readers/devs
would assume the fix is broken rather than incomplete. "Both together" avoids that confusing
intermediate state.

- Add sample redpanda-properties.json with representative properties
- Track connect.json (already existed but was gitignored)
- Update .gitignore to allow these preview-mode JSON files

These files enable property tooltips and Bloblang playground
to work in UI preview/development mode when the meta tags
aren't populated by Antora.

Addresses review feedback about static files in ui.yml.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/helpers/resolve-resource.js (1)

72-80: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Honor fallback when the content catalog is unavailable.

This preview-mode branch still returns the raw resource string for attachment JSON lookups, so head-meta.hbs will emit unusable values like attachment$connect-....json instead of the fallback URL. That breaks the stated preview/dev fallback path.

Suggested fix
   // For preview builds where contentCatalog.resolveResource might not exist
   if (!contentCatalog || !contentCatalog.resolveResource) {
+    if (fallbackUrl) {
+      return fallbackUrl
+    }
     // Only log for xref-like patterns that would need resolution
     if (resource.includes(':') && resource.endsWith('.adoc')) {
       // Preview mode - return placeholder
       return '#'
     }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/helpers/resolve-resource.js` around lines 72 - 80, The preview branch in
resolveResource currently returns the raw resource when contentCatalog or
contentCatalog.resolveResource is missing, which ignores the provided fallback;
update the early-return logic in resolveResource so that if contentCatalog or
contentCatalog.resolveResource is falsy it still honors the fallback parameter:
keep the existing special-case that returns '#' for xref-like Asciidoc resources
(resource.includes(':') && resource.endsWith('.adoc')), but for all other cases
return fallback when it is defined (and only fall back to returning resource if
fallback is undefined). Ensure you update the branch that references
contentCatalog/resolveResource and the function parameters (resource, fallback)
accordingly so attachment JSON lookups get the fallback URL.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/partials/head-meta.hbs`:
- Line 27: The fallback URLs for resolve-resource in src/partials/head-meta.hbs
currently point to docs.redpanda.com attachments and should instead reference
the local preview static endpoints served by src/ui.yml; update the fallback for
the meta with name "properties-json-url" (and the similar one at line 37 for
connect) to use the unversioned preview paths (e.g. '/redpanda-properties.json'
and '/connect.json') so preview/dev builds use the checked-in assets; locate the
resolve-resource calls in head-meta.hbs and replace the fallback=(concat
'https://docs.redpanda.com/...' ...) expressions with the corresponding local
static paths.
- Line 18: The resolve-resource invocation that builds the properties JSON URL
(using concat 'attachment$redpanda-properties-' this '.json' and
component='streaming' module='reference' version=`@root.page.version`) relies on
inherited page context; change it to explicitly pass the owning catalog
component and version for the selected asset source (i.e., replace the implicit
version and component with the actual component/version variables used for the
chosen asset) so resolution is performed against the asset's component/version
rather than current page defaults; apply the same fix for the other two
occurrences referenced (lines with the same resolve-resource/concat pattern at
the other locations).

---

Outside diff comments:
In `@src/helpers/resolve-resource.js`:
- Around line 72-80: The preview branch in resolveResource currently returns the
raw resource when contentCatalog or contentCatalog.resolveResource is missing,
which ignores the provided fallback; update the early-return logic in
resolveResource so that if contentCatalog or contentCatalog.resolveResource is
falsy it still honors the fallback parameter: keep the existing special-case
that returns '#' for xref-like Asciidoc resources (resource.includes(':') &&
resource.endsWith('.adoc')), but for all other cases return fallback when it is
defined (and only fall back to returning resource if fallback is undefined).
Ensure you update the branch that references contentCatalog/resolveResource and
the function parameters (resource, fallback) accordingly so attachment JSON
lookups get the fallback URL.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 941ccaa2-6dea-48d2-b65e-d60c9d2f38e2

📥 Commits

Reviewing files that changed from the base of the PR and between 3033b73 and 6d1680a.

📒 Files selected for processing (7)
  • .gitignore
  • gulp.d/tasks/generate-bloblang-grammar.js
  • src/helpers/resolve-resource.js
  • src/partials/head-meta.hbs
  • src/static/connect.json
  • src/static/redpanda-properties.json
  • src/ui.yml

Comment thread src/partials/head-meta.hbs
Comment thread src/partials/head-meta.hbs Outdated
- Add explicit version parameter to properties-json-url resolution
  for non-streaming pages (uses streaming's latest version)
- Add explicit version parameter to connect-json-url resolution
  (uses connect's latest version)

This ensures resolve-resource looks up attachments against the
correct component version rather than inheriting from the current
page context.

Addresses CodeRabbit review comments about component/version context.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@JakeSCahill JakeSCahill requested a review from Feediver1 June 2, 2026 15:56
Copy link
Copy Markdown
Contributor

@Feediver1 Feediver1 left a comment

Choose a reason for hiding this comment

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

Delta review on the deltas since 2026-06-01

@JakeSCahill — re-reviewed after the two new commits (6d1680a, 283c61d) and CodeRabbit's 2026-06-02 review. Half the items I flagged are addressed; the most substantive concern (static files added but not reachable through the fallback chain) is still open and is also what CodeRabbit's new outside-diff finding flags.

Status of my prior findings

Item Status
Critical 1: src/ui.yml static files disconnected from fallback chain ⚠️ Partially addressed. Commit 6d1680a added the actual JSON content files (src/static/redpanda-properties.json, src/static/connect.json). But the head-meta.hbs fallback= parameters still point to production https://docs.redpanda.com/... URLs, not to the /redpanda-properties.json and /connect.json paths that ui.yml exposes. CodeRabbit's new outside-diff finding confirms this (see below). Files are in the bundle but unused.
Critical 2: Gulp URL change redpanda-connectconnect unexplained Not addressed. Change still present at gulp.d/tasks/generate-bloblang-grammar.js. PR body still doesn't explain what changed upstream. Spot-check: curl https://docs.redpanda.com/connect/components/_attachments/connect-4.79.0.json returns 404 — could be the specific version, not the URL pattern. Worth confirming a known-current version resolves before merge.
Suggestion 1: disable-property-tooltips opt-out not in PR description ❌ Not addressed.
Suggestion 2: Hardcoded production URLs as fallbacks ❌ Not addressed. (Related to Critical 1.)
Suggestion 3: Asymmetric version resolution between properties and connect Addressed in commit 283c61d. Both resolve-resource calls now use version=(or @root.site.components.X.latest.version ...) for explicit version targeting. Patterns are now symmetric.
Suggestion 4: PR title doesn't mention the gulp path fix ❌ Not addressed.
Suggestion 5: No test plan checkbox for gulp URL change ❌ Not addressed.

New CodeRabbit findings (2026-06-02 15:29 UTC)

# Finding Status
1 Line 18, head-meta.hbs: "Resolve these attachments against the owning component/version, not the current page defaults" — on cloud/connect pages or older streaming pages, the original resolve-resource calls inherited page context, leading to wrong-version lookups. Addressed in commit 283c61d (pushed 14 minutes after CodeRabbit's review).
2 Outside diff range: "The preview fallback never points at the static JSON files added in this PR." The src/ui.yml change serves /redpanda-properties.json and /connect.json at preview-bundle root, but the head-meta.hbs fallback URLs still use versioned docs.redpanda.com paths — so preview builds still depend on production. Still open. Same issue as my Critical 1.

Bottom line on "Is everything sufficiently addressed?"

No. The biggest item — wiring the static JSON files into the fallback chain — is still open. Both my Critical 1 and CodeRabbit's new outside-diff finding flag the same thing: the static files exist but aren't reachable through the resolve chain. The fix is one HBS template change (point fallback= at the relative static path instead of the production URL).

Mid-priority gaps:

  • Gulp URL change still unexplained. Either the upstream Connect docs URL pattern actually moved (in which case a one-line note in the PR body resolves it) or this is a regression. Worth confirming.
  • Five of my original suggestions are largely untouched. Two of them (PR description updates) are zero-effort and worth doing for archaeology purposes.

What IS fully resolved:

  • ✅ Component/version targeting on resolve-resource (CodeRabbit's first finding + my Suggestion 3)
  • ✅ Build is green
  • ✅ Static JSON content now exists in the repo (commit 6d1680a) — half of Critical 1

Suggestions

  1. Update the head-meta.hbs fallback= parameters to point at the static JSON files instead of (or in addition to) the production URLs. Something like:

    fallback='/redpanda-properties.json'

    for the preview/dev case, so the static fallback that was added in commit 6d1680a actually gets used. This is the single change that would close Critical 1 + CodeRabbit's outside-diff finding.

  2. Explain the gulp URL change in the PR body or, ideally, confirm it works by curling a known-current Connect version and dropping the result in the test plan. "Verified https://docs.redpanda.com/connect/components/_attachments/connect-X.Y.Z.json returns 200" costs nothing and closes Critical 2.

  3. Update the PR description to enumerate the additional changes that landed since the original (the disable-property-tooltips meta tag, the static JSON files, the explicit component versions). The 2 weeks of iteration history is hard for a new reviewer to follow without the body summary matching reality.

What works well

  • CodeRabbit's first finding (component/version) was addressed within 15 minutes of being posted. Tight feedback loop.
  • The static JSON files exist now, which is half the fix. Just needs to be wired in.
  • Build is green. All CI checks pass cleanly.
  • Scope is unchanged from my first review — still 4 → 7 files, additive only. No scope creep on top of the original goal.

- Remove unused redpanda-properties.json and connect.json from ui.yml
  (fallback URLs point to production, not static files)
- Add detailed comments explaining:
  - Resolution strategy for properties/connect JSON
  - Version context differences (streaming vs non-streaming pages)
  - Why fallback URLs point to production
  - The disable-property-tooltips opt-out mechanism

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@JakeSCahill
Copy link
Copy Markdown
Contributor Author

Addressed review feedback

Pushed commit e9be4a9 with the following changes:

1. Removed unused static JSON files

Removed redpanda-properties.json and connect.json from ui.yml and src/static/. These files weren't being used — the fallback URLs in head-meta.hbs point to production URLs, not static UI bundle files. This is intentional: production fallback ensures preview/dev builds remain functional even without a full content catalog.

2. Added documentation comments

Added detailed comments in head-meta.hbs explaining:

  • Resolution strategy: available-* → latest-* → production fallback
  • Version context asymmetry: Streaming pages use page.version, non-streaming use streaming.latest.version
  • Fallback behavior: Production URLs ensure previews work and builds continue when JSON isn't published
  • Opt-out mechanism: The :disable-property-tooltips: page attribute for property-dense pages

3. Verified gulp URL change

Confirmed /connect/components/_attachments/ is the correct path:

  • https://docs.redpanda.com/connect/components/_attachments/connect-4.94.1.json returns 200
  • The old /redpanda-connect/ path redirects to /connect/ then 404s for older versions

4. Updated PR description

Added clarifications about:

  • Fallback URL behavior
  • The disable-property-tooltips opt-out
  • Why both PRs should be merged together (to avoid confusing intermediate state)
  • Test plan item for gulp grammar generation

@Feediver1 - Agree with your point about respecting the "both together" merge guidance. The backwards-compatible fallback is there as a safety net, not an endorsement of staggered merges.

Copy link
Copy Markdown
Contributor

@Feediver1 Feediver1 left a comment

Choose a reason for hiding this comment

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

Delta review since 2026-06-03

Head: 269b3ff · Net deltas since my last review: 1 commit addressing my feedback (e9be4a9), 1 merge from main (bddde72), 1 small unrelated CSS tweak (269b3ff).
Overall:No remaining critical issues. All my prior findings are now resolved (some via the opposite-of-what-I-suggested approach, which turned out cleaner). One minor scope concern + one inherited-from-main concern noted below.

Status of my prior findings

# Item Status
Critical 1 Static files (src/static/*.json) disconnected from fallback chain Resolved differently than I suggested. Removed the files in e9be4a9 rather than wiring them in. Then the merge from main brought redpanda-properties.json back — because main's new 19-property-tooltips.js (line 80: staticFallbackUrl = rootPath + '/redpanda-properties.json') actually consumes it. So the file is now used as the static-fallback path in the JS, which closes the loop.
Critical 2 Gulp URL change redpanda-connect → connect unexplained Acknowledged in PR description. Now reads: "gulp.d/tasks/generate-bloblang-grammar.js: Fix Connect URL path (/connect/ not /redpanda-connect/)". Doesn't spell out why (the streaming-component rename), but the change is correct and consistent with PR #427's rename.
Suggestion 1 disable-property-tooltips opt-out not in PR description Inline-documented in head-meta.hbs: "Opt-out: page authors can set :disable-property-tooltips: to suppress tooltips". Code-as-docs rather than PR-body. Acceptable.
Suggestion 2 Hardcoded production URLs as fallbacks Now documented as intentional, with rationale: "Fallback URLs point to production to ensure tooltips work even when running preview builds without full content catalog / JSON hasn't been published yet for the specified version."
Suggestion 3 Asymmetric version resolution ✅ Was fixed in 283c61d.
Suggestion 4 PR title doesn't mention gulp fix ❌ Still not addressed. PR title is still "Add JSON resolution fallback with available-* attribute support." Minor archaeology nit; not blocking.
Suggestion 5 No test plan checkbox for gulp URL ❌ Still not addressed. Test plan is the same 4 generic items. Minor.
CodeRabbit's outside-diff finding Preview fallback never points at static files ✅ Marked resolved + outdated (because the static files were removed and the new JS consumes the re-merged version directly).

What changed since 2026-06-03

e9be4a9 — Address review feedback (2026-06-04 09:36):

  • src/partials/head-meta.hbs (+29/-8): Added comprehensive inline comments documenting the 3-step resolution strategy (available-* → latest-* → production fallback), the version context rules (streaming vs non-streaming pages), the rationale for production-URL fallbacks, and the disable-property-tooltips opt-out.
  • Removed src/static/connect.json (-142) and src/static/redpanda-properties.json (-40) as "unused".
  • src/ui.yml (-2): Removed both file entries from static_files.

bddde72 — Merge main (2026-06-04 14:56): Pulled in a sibling property-tooltips feature that landed on main while this PR was open:

  • New src/js/19-property-tooltips.js (+486) — the JS consumer of the meta tags this PR sets.
  • New src/css/property-tooltips.css (+203) — styling for the new tooltips.
  • New preview-src/property-tooltips-test.adoc (+63) — preview-mode test page.
  • Heavy refactor of src/js/16-bloblang-interactive.js (+507/-480).
  • Re-added src/static/redpanda-properties.json (+105) with different content (3.8 KB, real property catalog) — this is the static fallback the new 19-property-tooltips.js consumes. Also re-added the entry in src/ui.yml.
  • CSS adjustments to header, nav, product-switcher, vars, site.
  • Workflow tweaks.

269b3ff — Update doc.css (2026-06-04 15:02):

  • One-line change in src/css/doc.css: .admonitionblock font-size 16/var(--rem-base)17.5/var(--rem-base). Affects all NOTE/IMPORTANT/WARNING/CAUTION/TIP blocks across all docs sites.

Critical issues

None.

Suggestions

  1. 269b3ff (admonitionblock font-size) is out of scope for a JSON-resolution PR. It's a global readability tweak that affects every admonition on every doc. Either:

    • Split into a separate one-line PR with its own preview (so designers can sanity-check the visual change in isolation), or
    • Mention it in the PR description so future archaeologists know why a font-size change shipped under a "JSON resolution" PR title.

    Harmless either way; the 1.5px bump is plausibly an improvement, but it's surprising to find here.

  2. Inherited from main, not this PR: src/js/16-bloblang-interactive.js lines 197 and 43, 52, 61 still hardcode /redpanda-connect/... as production fallback paths — which would 404 against the post-rename docs site at /connect/.... The gulp.d change correctly uses /connect/, but this JS file (massively refactored in main, not in this PR) wasn't updated alongside. Not this PR's responsibility, but worth flagging because:

    • It's the exact same kind of stale-URL fallback that motivated the gulp.d fix here
    • It's visible in the diff this PR pulled in via merge
    • A separate follow-up PR could fix it cheaply

Impact analysis — main-merge integration

The property-tooltips feature that landed on main has a tight dependency on the meta tags this PR sets:

  • 19-property-tooltips.js line 30: document.querySelector('meta[name="properties-json-url"]') — set by this PR's head-meta.hbs.
  • 16-bloblang-interactive.js line 31: document.querySelector('meta[name="connect-json-url"]') — set by this PR's head-meta.hbs.

So this PR is now the carrier of the meta-tag-emitting code that main's new JS expects. Without this PR's head-meta.hbs updates, the property tooltips on main would silently fall back to the static file (or fail outright in production where the meta tag is absent). With this PR, the resolution chain works.

The dependency is one-directional: main can ship without this PR (tooltips fall back to static), but this PR's improvements are only useful once main is in place. They're now both in place. ✓

CI status

  • ✅ Netlify deploy preview: ready
  • ⏳ build (GH Actions): pending against 269b3ff
  • Header/Pages/Redirect rules: skipping (no config-file changes)
  • ✅ CodeRabbit: review skipped (small recent commits)

Verdict

No critical issues remain. All substantive prior feedback is addressed (most via reasonable alternatives to what I originally suggested). The one minor concern is the surprise CSS tweak in 269b3ff that's outside the PR's nominal scope — worth splitting or mentioning in the description, but not blocking.

The only architectural concern (stale /redpanda-connect/ fallback paths in 16-bloblang-interactive.js) is inherited from main and not this PR's responsibility — would be a clean follow-up PR after this lands.

Ready to merge once the GH Actions build finishes.

Copy link
Copy Markdown
Contributor

@Feediver1 Feediver1 left a comment

Choose a reason for hiding this comment

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

lgtm

@JakeSCahill JakeSCahill merged commit f1704f5 into main Jun 4, 2026
6 checks passed
@JakeSCahill JakeSCahill deleted the feature/json-resolution-fallback branch June 4, 2026 15:30
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