HTML: Omit version meta tags for versionless pages#3020
Conversation
Versionless pages (serverless, cloud, etc.) were rendering the sentinel value 99999.0+ in product_version and DC.identifier meta tags. Now these tags are omitted entirely when the page's versioning system is versionless. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe change makes page version optional by changing Sequence Diagram(s)sequenceDiagram
participant HtmlWriter
participant PageVersioning
participant IndexViewModel
participant RazorView
participant Browser
HtmlWriter->>PageVersioning: get IsVersionless / Base
alt versionless
HtmlWriter-->>IndexViewModel: set CurrentVersion = null
else versioned
HtmlWriter-->>IndexViewModel: set CurrentVersion = format(Base)
end
IndexViewModel->>RazorView: pass model (CurrentVersion may be null)
RazorView->>RazorView: if Model.CurrentVersion != null emit meta tags
RazorView-->>Browser: send rendered HTML
Suggested labels
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches✨ Simplify code
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/Elastic.Markdown/Page/IndexViewModel.cs`:
- Line 39: Restore the required modifier on the CurrentVersion property so
constructors/object initializers must supply it: change the declaration of
CurrentVersion in IndexViewModel (public string? CurrentVersion { get; init; })
to include required (public required string? CurrentVersion { get; init; }),
ensuring callers like the construction path in ApiEndpoint are updated to
provide a value.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: eb965f27-a85a-4813-9971-6f7ac8bf3bb0
📒 Files selected for processing (4)
src/Elastic.Codex/Page/Index.cshtmlsrc/Elastic.Markdown/HtmlWriter.cssrc/Elastic.Markdown/Page/Index.cshtmlsrc/Elastic.Markdown/Page/IndexViewModel.cs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* HTML: Omit version meta tags for versionless pages Versionless pages (serverless, cloud, etc.) were rendering the sentinel value 99999.0+ in product_version and DC.identifier meta tags. Now these tags are omitted entirely when the page's versioning system is versionless. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * HTML: Restore required modifier on CurrentVersion property Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add skip-labels to evaluate-pr's output * Add tests * Resolve conflicts * Fix docs-builder redirect tests (#3008) * Fix redirect tests * Remove changelog redirects implemented elsewhere * Search: Use default semantic_text inference, remove Jina mappings (#3014) Elasticsearch Serverless now defaults semantic_text to Jina, making the explicit Jina sub-fields redundant and the ELSER inference ID unnecessary. This removes both inference ID constants, all .jina field mappings, and lets semantic_text fields use the platform default. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: Update config/versions.yml eck 3.3.2 (#3019) Made with ❤️️ by updatecli Co-authored-by: elastic-observability-automation[bot] <180520183+elastic-observability-automation[bot]@users.noreply.github.com> * Deploy: Use write-scoped filesystem for apply command (#3021) The deploy apply command used RealRead which lacks AllowedSpecialFolder.Temp, causing ScopedFileSystemException when AwsS3SyncApplyStrategy stages files in /tmp/ for S3 upload. Switch to RealWrite which permits temp directory access. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Update Azure EDOT CF version (#3022) +CC @zmoog * Enable AOT/trim analyzers on library projects and skip AOT publish on PRs (#2971) Add IsAotCompatible to 12 library projects referenced by docs-builder so Roslyn's trim/AOT analyzers (IL2026/IL3050) run during regular builds. This catches AOT issues at compile time, removing the need for the expensive native ILC publish step on pull requests. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * HTML: Omit version meta tags for versionless pages (#3020) * HTML: Omit version meta tags for versionless pages Versionless pages (serverless, cloud, etc.) were rendering the sentinel value 99999.0+ in product_version and DC.identifier meta tags. Now these tags are omitted entirely when the page's versioning system is versionless. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * HTML: Restore required modifier on CurrentVersion property Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Layout: Adapt to static elastic-nav by making secondary nav sticky (#3025) * Layout: Adapt to static elastic-nav by making secondary nav sticky The global elastic-nav.js (v2026-03) changed the header from fixed to static positioning. This makes the secondary docs nav sticky at the top and simplifies --offset-top to match its height. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Layout: Only make secondary nav sticky on md+ viewports On mobile the sticky secondary nav takes too much vertical space. Keep it static on small screens (--offset-top: 0) and only sticky on md+ where it provides persistent navigation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: Upgrade lodash to 4.18.x to fix high severity vulnerabilities Fixes code injection via _.template (GHSA-r5fr-rjxr-66jc) and prototype pollution via _.unset/_.omit (GHSA-f23m-r3pf-42rh). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Layout: Add bottom border to secondary nav The visual separator was coming from #main-container's border-top, which scrolls away. Adding border-b to the nav itself keeps the line visible while sticky. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Layout: Remove border-top from main-container The secondary nav now has border-b, so the main-container border-t was causing a double border. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * lint --------- Co-authored-by: Lisa Cawley <lcawley@elastic.co> Co-authored-by: Jan Calanog <jan.calanog@elastic.co> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: elastic-observability-automation[bot] <180520183+elastic-observability-automation[bot]@users.noreply.github.com> Co-authored-by: Fabrizio Ferri-Benedetti <fabri.ferribenedetti@elastic.co>
* HTML: Omit version meta tags for versionless pages Versionless pages (serverless, cloud, etc.) were rendering the sentinel value 99999.0+ in product_version and DC.identifier meta tags. Now these tags are omitted entirely when the page's versioning system is versionless. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * HTML: Restore required modifier on CurrentVersion property Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add skip-labels to evaluate-pr's output * Add tests * Resolve conflicts * Fix docs-builder redirect tests (#3008) * Fix redirect tests * Remove changelog redirects implemented elsewhere * Search: Use default semantic_text inference, remove Jina mappings (#3014) Elasticsearch Serverless now defaults semantic_text to Jina, making the explicit Jina sub-fields redundant and the ELSER inference ID unnecessary. This removes both inference ID constants, all .jina field mappings, and lets semantic_text fields use the platform default. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: Update config/versions.yml eck 3.3.2 (#3019) Made with ❤️️ by updatecli Co-authored-by: elastic-observability-automation[bot] <180520183+elastic-observability-automation[bot]@users.noreply.github.com> * Deploy: Use write-scoped filesystem for apply command (#3021) The deploy apply command used RealRead which lacks AllowedSpecialFolder.Temp, causing ScopedFileSystemException when AwsS3SyncApplyStrategy stages files in /tmp/ for S3 upload. Switch to RealWrite which permits temp directory access. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Update Azure EDOT CF version (#3022) +CC @zmoog * Enable AOT/trim analyzers on library projects and skip AOT publish on PRs (#2971) Add IsAotCompatible to 12 library projects referenced by docs-builder so Roslyn's trim/AOT analyzers (IL2026/IL3050) run during regular builds. This catches AOT issues at compile time, removing the need for the expensive native ILC publish step on pull requests. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * HTML: Omit version meta tags for versionless pages (#3020) * HTML: Omit version meta tags for versionless pages Versionless pages (serverless, cloud, etc.) were rendering the sentinel value 99999.0+ in product_version and DC.identifier meta tags. Now these tags are omitted entirely when the page's versioning system is versionless. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * HTML: Restore required modifier on CurrentVersion property Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Layout: Adapt to static elastic-nav by making secondary nav sticky (#3025) * Layout: Adapt to static elastic-nav by making secondary nav sticky The global elastic-nav.js (v2026-03) changed the header from fixed to static positioning. This makes the secondary docs nav sticky at the top and simplifies --offset-top to match its height. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Layout: Only make secondary nav sticky on md+ viewports On mobile the sticky secondary nav takes too much vertical space. Keep it static on small screens (--offset-top: 0) and only sticky on md+ where it provides persistent navigation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: Upgrade lodash to 4.18.x to fix high severity vulnerabilities Fixes code injection via _.template (GHSA-r5fr-rjxr-66jc) and prototype pollution via _.unset/_.omit (GHSA-f23m-r3pf-42rh). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Layout: Add bottom border to secondary nav The visual separator was coming from #main-container's border-top, which scrolls away. Adding border-b to the nav itself keeps the line visible while sticky. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Layout: Remove border-top from main-container The secondary nav now has border-b, so the main-container border-t was causing a double border. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * lint --------- Co-authored-by: Lisa Cawley <lcawley@elastic.co> Co-authored-by: Jan Calanog <jan.calanog@elastic.co> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: elastic-observability-automation[bot] <180520183+elastic-observability-automation[bot]@users.noreply.github.com> Co-authored-by: Fabrizio Ferri-Benedetti <fabri.ferribenedetti@elastic.co>
* HTML: Omit version meta tags for versionless pages Versionless pages (serverless, cloud, etc.) were rendering the sentinel value 99999.0+ in product_version and DC.identifier meta tags. Now these tags are omitted entirely when the page's versioning system is versionless. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * HTML: Restore required modifier on CurrentVersion property Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add skip-labels to evaluate-pr's output * Add tests * Resolve conflicts * Fix docs-builder redirect tests (#3008) * Fix redirect tests * Remove changelog redirects implemented elsewhere * Search: Use default semantic_text inference, remove Jina mappings (#3014) Elasticsearch Serverless now defaults semantic_text to Jina, making the explicit Jina sub-fields redundant and the ELSER inference ID unnecessary. This removes both inference ID constants, all .jina field mappings, and lets semantic_text fields use the platform default. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: Update config/versions.yml eck 3.3.2 (#3019) Made with ❤️️ by updatecli Co-authored-by: elastic-observability-automation[bot] <180520183+elastic-observability-automation[bot]@users.noreply.github.com> * Deploy: Use write-scoped filesystem for apply command (#3021) The deploy apply command used RealRead which lacks AllowedSpecialFolder.Temp, causing ScopedFileSystemException when AwsS3SyncApplyStrategy stages files in /tmp/ for S3 upload. Switch to RealWrite which permits temp directory access. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Update Azure EDOT CF version (#3022) +CC @zmoog * Enable AOT/trim analyzers on library projects and skip AOT publish on PRs (#2971) Add IsAotCompatible to 12 library projects referenced by docs-builder so Roslyn's trim/AOT analyzers (IL2026/IL3050) run during regular builds. This catches AOT issues at compile time, removing the need for the expensive native ILC publish step on pull requests. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * HTML: Omit version meta tags for versionless pages (#3020) * HTML: Omit version meta tags for versionless pages Versionless pages (serverless, cloud, etc.) were rendering the sentinel value 99999.0+ in product_version and DC.identifier meta tags. Now these tags are omitted entirely when the page's versioning system is versionless. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * HTML: Restore required modifier on CurrentVersion property Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Layout: Adapt to static elastic-nav by making secondary nav sticky (#3025) * Layout: Adapt to static elastic-nav by making secondary nav sticky The global elastic-nav.js (v2026-03) changed the header from fixed to static positioning. This makes the secondary docs nav sticky at the top and simplifies --offset-top to match its height. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Layout: Only make secondary nav sticky on md+ viewports On mobile the sticky secondary nav takes too much vertical space. Keep it static on small screens (--offset-top: 0) and only sticky on md+ where it provides persistent navigation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: Upgrade lodash to 4.18.x to fix high severity vulnerabilities Fixes code injection via _.template (GHSA-r5fr-rjxr-66jc) and prototype pollution via _.unset/_.omit (GHSA-f23m-r3pf-42rh). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Layout: Add bottom border to secondary nav The visual separator was coming from #main-container's border-top, which scrolls away. Adding border-b to the nav itself keeps the line visible while sticky. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Layout: Remove border-top from main-container The secondary nav now has border-b, so the main-container border-t was causing a double border. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * lint --------- Co-authored-by: Lisa Cawley <lcawley@elastic.co> Co-authored-by: Jan Calanog <jan.calanog@elastic.co> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: elastic-observability-automation[bot] <180520183+elastic-observability-automation[bot]@users.noreply.github.com> Co-authored-by: Fabrizio Ferri-Benedetti <fabri.ferribenedetti@elastic.co>
What
Omit
product_versionandDC.identifiermeta tags from the HTML<head>for versionless pages instead of rendering the sentinel value99999.0+.Why
Versionless pages (serverless, cloud, etc.) were exposing the internal sentinel version
99999.0+in meta tags, which is meaningless to consumers.How
CurrentVersiontonullwhenpageVersioning.IsVersionlessinHtmlWriterCurrentVersionis not nullCurrentVersionnullable inIndexViewModelTest plan
<head>— theproduct_versionandDC.identifiermeta tags should be absent🤖 Generated with Claude Code