Skip to content

chore(docs): fix base url paths#130

Open
coryrylan wants to merge 1 commit into
mainfrom
topic-base-path-fix
Open

chore(docs): fix base url paths#130
coryrylan wants to merge 1 commit into
mainfrom
topic-base-path-fix

Conversation

@coryrylan

@coryrylan coryrylan commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator
  • Changed internal links in documentation to use root-relative paths for consistency.
  • Added a new transform for site URLs to ensure correct linking in different environments.
  • Updated various files to reflect these changes, including configuration and layout files.
  • Added tests to verify that all internal links are correctly formatted.

Summary by CodeRabbit

  • Bug Fixes

    • Fixed inconsistent internal link paths throughout the documentation site by converting relative URLs to consistent absolute paths, improving navigation accuracy across different page locations.
    • Enhanced URL resolution logic to properly handle base path deployments.
  • New Features

    • Added URL transformation system for automatic link path normalization in generated HTML.
    • Added validation tests to prevent future introduction of invalid internal link formats.

- Changed internal links in documentation to use root-relative paths for consistency.
- Added a new transform for site URLs to ensure correct linking in different environments.
- Updated various files to reflect these changes, including configuration and layout files.
- Added tests to verify that all internal links are correctly formatted.

Signed-off-by: Cory Rylan <crylan@nvidia.com>
@coryrylan coryrylan requested a review from jareddlc June 9, 2026 23:41
@coryrylan coryrylan self-assigned this Jun 9, 2026
@github-actions github-actions Bot added scope(core) scope(ci) scope(docs) dependencies Pull requests that update a dependency file labels Jun 9, 2026
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR systematically normalizes internal site URLs by introducing centralized URL utilities, an HTML transform for automatic rewriting during the build pipeline, and updating all code and documentation to use absolute root-relative paths instead of relative paths.

Changes

URL Normalization Infrastructure and Implementation

Layer / File(s) Summary
Centralized URL utilities and path helpers
projects/site/src/_11ty/utils/site-url.js
New module exports BASE_URL, DEPLOYED_SITE_URL, and utility functions including getSiteHref(), getSitePath(), and getSiteUrl() that normalize paths and compute absolute or base-path URLs depending on Eleventy's build vs. serve mode.
HTML transform that rewrites site URLs
projects/site/src/_11ty/transforms/site-urls.js, projects/site/src/_11ty/transforms/site-urls.test.ts
New transform siteUrlsTransform parses HTML output, walks the DOM to detect and rewrite same-site relative URLs using the centralized utilities, while preserving external URLs, fragments, and template content. Comprehensive test suite validates build-mode qualification, serve-mode preservation, local preview handling, module source URLs, external schemes, and template exclusions.
Eleventy configuration integration
projects/site/eleventy.config.js
Sets pathPrefix to BASE_URL early, registers HtmlBasePlugin with environment-dependent base-href (build: ELEMENTS_SITE_ORIGIN, serve: /), and adds the site-urls transform. Removes prior development server redirect.
URL metadata and build configuration
projects/site/src/_11ty/layouts/metadata.js, projects/site/package.json
Imports and re-exports URL constants from the centralized utility instead of computing them locally. Adds ELEMENTS_SITE_URL to the build environment and expands Vitest test file coverage to include more layout, transform, and shortcode test modules.
Template and layout URL updates
projects/site/src/_11ty/layouts/common.js, projects/site/src/_11ty/layouts/page.11ty.js, projects/site/src/_11ty/layouts/docs.11ty.js
Updates sidebar navigation, header navigation buttons, and documentation tab links to use absolute / and /docs/... paths instead of relative ., docs/..., or ./docs/... equivalents.
Plugin and shortcode URL wiring
projects/site/src/_11ty/plugins/llms-txt.js, projects/site/src/_11ty/plugins/sitemap-xml.js, projects/site/src/_11ty/transforms/anchor-generator.js, projects/site/src/_11ty/templates/api.js, projects/site/src/_11ty/shortcodes/index.js
Updates plugins and templates to use centralized URL utilities: llms-txt.js applies the HTML transform to generated context pages, sitemap-xml.js uses getSiteUrl() for sitemap entries, anchor-generator.js uses getSiteHref() for heading anchors, and api.js template updates badge link paths to absolute form.
Documentation and example content URL normalization
projects/core/src/tabs/tabs.examples.ts, projects/site/src/index.md, projects/site/src/examples/..., projects/site/src/docs/... (100+ files), projects/site/src/_internal/metrics-carousel/metrics-carousel.ts
Systematically updates all documentation files (markdown, 11ty templates, and examples) across foundations, elements, integrations, patterns, metrics, and skills to use absolute /docs/..., /examples/..., and /starters/... paths instead of relative equivalents. Also updates metrics carousel and index page navigation.
Validation test for internal link consistency
projects/site/src/_11ty/layouts/links.test.ts
New Vitest test scans authored documentation files for disallowed relative internal-link patterns (both HTML href and JavaScript href: forms) and enforces the absolute-path convention by failing if any relative links are detected.

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant EleventyBuild as Eleventy Build
  participant HtmlBase as HtmlBasePlugin
  participant Transform as siteUrlsTransform
  participant Utils as URL Utils
  participant Output as HTML Output
  Browser->>EleventyBuild: trigger build
  EleventyBuild->>HtmlBase: render templates
  HtmlBase->>EleventyBuild: add <base href>
  EleventyBuild->>Transform: pass generated HTML
  Transform->>Utils: parse & resolve URLs
  Utils->>Transform: absolute or base-relative paths
  Transform->>Output: rewrite href/src attributes
  EleventyBuild->>Browser: serve normalized URLs
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • NVIDIA/elements#91: Updates projects/site/package.json Vitest/wireit test configuration, directly related to this PR's test setup and coverage expansion.

Suggested labels

scope(docs), type(chore), scope(pages), scope(markdown)

Suggested reviewers

  • johnyanarella
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 17.02% 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore(docs): fix base url paths' clearly summarizes the primary change—updating internal documentation links to use consistent root-relative URL paths throughout the codebase.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch topic-base-path-fix

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment on lines +6 to +12
import {
DEPLOYED_SITE_URL,
ELEMENTS_SITE_ORIGIN,
getSitePath as getBaseFreeSitePath,
getSiteHref,
getSiteUrl
} from '../utils/site-url.js';
@coryrylan coryrylan requested a review from johnyanarella June 9, 2026 23:46

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

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

⚠️ Outside diff range comments (1)
projects/site/src/_11ty/layouts/docs.11ty.js (1)

50-54: 🧹 Nitpick | 🔵 Trivial | 💤 Low value

Consider simplifying the baseTabUrl construction.

The baseTabUrl removes the leading / on line 51 (.replace('/', '')), then lines 91, 94, and 99 add it back (href="/${baseTabUrl}"). This could be simplified by keeping the leading / in baseTabUrl:

 const baseTabUrl = `${data.page.url
-  .replace('/', '')
   .replace('/api/', '/')
   .replace('/examples/', '/')
   .replace(/(.*\/data-grid\/).+/, '$1')}`;

Then use it directly:

-<a href="/${baseTabUrl}">Overview</a>
+<a href="${baseTabUrl}">Overview</a>

This would be clearer and avoid the remove-then-add pattern.

Also applies to: 91-99

🤖 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 `@projects/site/src/_11ty/layouts/docs.11ty.js` around lines 50 - 54, The code
builds baseTabUrl by stripping the leading '/' from data.page.url then later
prepends '/' again when creating hrefs; to simplify, stop removing the leading
slash: remove the initial .replace('/', '') from the baseTabUrl expression
(leave data.page.url as-is when applying the subsequent .replace('/api/', '/'),
.replace('/examples/', '/'), and .replace(/(.*\/data-grid\/).+/, '$1')), and
update all call sites that currently do href="/${baseTabUrl}" to use
href="${baseTabUrl}" (references: the baseTabUrl variable and the href usages
that add '/').
🤖 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 `@projects/site/package.json`:
- Around line 204-211: The current package.json test task watches all source
files via the "files" array which causes tests defined in the "command" (e.g.,
metadata.test.ts, links.test.ts, site-urls.test.ts, api.test.ts) to re-run on
any src change; update the "files" array to only match test files (for example
restrict to patterns like src/**/*.{test,spec}.ts or src/**/*.test.ts and
include matching .js/.md if you have test variants) so that vitest only reruns
when test files change, leaving the "command" unchanged.

In `@projects/site/src/_11ty/layouts/links.test.ts`:
- Around line 6-9: The four regex constants RELATIVE_INTERNAL_LINK_PATTERN,
BASE_PREFIXED_INTERNAL_LINK_PATTERN, JS_RELATIVE_INTERNAL_LINK_PATTERN, and
JS_BASE_PREFIXED_INTERNAL_LINK_PATTERN only account for "./" relative paths;
update each pattern to also match one or more "../" segments so "../docs/...",
"../examples/...", and "../starters/..." are caught too — modify the group that
currently matches (?:\.\/)? to allow sequences like (?:\.\.\/|\.\/)+ or a more
concise (?:\.\.\/)*\.\/? depending on desired strictness so both single and
multi-level parent traversals are rejected for both HTML and JS forms.

In `@projects/site/src/docs/metrics/testing-and-performance.11ty.js`:
- Around line 29-32: Remove the duplicate selected attribute from the wrong tab:
the first <nve-tabs-item> that links to "/docs/metrics/" currently has selected
but the page's correct active tab is the <nve-tabs-item> for "Testing &
Performance" (the one linking to "/docs/metrics/testing-and-performance/");
remove the selected attribute from the Metrics tab so only the Testing &
Performance <nve-tabs-item> remains selected to prevent conflicting active-state
behavior.

In `@projects/site/src/docs/metrics/wireit.11ty.js`:
- Line 59: Duplicate selected attribute: remove the extra selected on the
Metrics tab so only the Wireit Explorer tab remains selected. Locate the
<nve-tabs-item> element that renders the "Metrics" tab (the tag containing "<a
href=\"/docs/metrics/\">Metrics</a>") and delete the selected attribute from
that element, leaving the selected attribute only on the "Wireit Explorer"
<nve-tabs-item>.

---

Outside diff comments:
In `@projects/site/src/_11ty/layouts/docs.11ty.js`:
- Around line 50-54: The code builds baseTabUrl by stripping the leading '/'
from data.page.url then later prepends '/' again when creating hrefs; to
simplify, stop removing the leading slash: remove the initial .replace('/', '')
from the baseTabUrl expression (leave data.page.url as-is when applying the
subsequent .replace('/api/', '/'), .replace('/examples/', '/'), and
.replace(/(.*\/data-grid\/).+/, '$1')), and update all call sites that currently
do href="/${baseTabUrl}" to use href="${baseTabUrl}" (references: the baseTabUrl
variable and the href usages that add '/').
🪄 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: ASSERTIVE

Plan: Enterprise

Run ID: ce99f9ec-a08b-4139-a9d2-571dfc979998

📥 Commits

Reviewing files that changed from the base of the PR and between 686ff96 and da90867.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (69)
  • projects/core/src/tabs/tabs.examples.ts
  • projects/site/eleventy.config.js
  • projects/site/package.json
  • projects/site/src/_11ty/layouts/common.js
  • projects/site/src/_11ty/layouts/docs.11ty.js
  • projects/site/src/_11ty/layouts/links.test.ts
  • projects/site/src/_11ty/layouts/metadata.js
  • projects/site/src/_11ty/layouts/page.11ty.js
  • projects/site/src/_11ty/plugins/llms-txt.js
  • projects/site/src/_11ty/plugins/sitemap-xml.js
  • projects/site/src/_11ty/shortcodes/index.js
  • projects/site/src/_11ty/templates/api.js
  • projects/site/src/_11ty/transforms/anchor-generator.js
  • projects/site/src/_11ty/transforms/site-urls.js
  • projects/site/src/_11ty/transforms/site-urls.test.ts
  • projects/site/src/_11ty/utils/site-url.js
  • projects/site/src/_internal/metrics-carousel/metrics-carousel.ts
  • projects/site/src/docs/about/contributions.md
  • projects/site/src/docs/about/migration.md
  • projects/site/src/docs/about/support.md
  • projects/site/src/docs/api-design/logs.md
  • projects/site/src/docs/api-design/packaging.md
  • projects/site/src/docs/changelog/changelog.11ty.js
  • projects/site/src/docs/changelog/index.11ty.js
  • projects/site/src/docs/elements/dialog.md
  • projects/site/src/docs/elements/drawer.md
  • projects/site/src/docs/elements/dropdown.md
  • projects/site/src/docs/elements/forms/index.md
  • projects/site/src/docs/elements/icon.md
  • projects/site/src/docs/elements/notification.md
  • projects/site/src/docs/elements/page.md
  • projects/site/src/docs/elements/toast.md
  • projects/site/src/docs/elements/toggletip.md
  • projects/site/src/docs/elements/tooltip.md
  • projects/site/src/docs/foundations/iconography.md
  • projects/site/src/docs/foundations/index.md
  • projects/site/src/docs/foundations/layout/grid.md
  • projects/site/src/docs/foundations/layout/horizontal.md
  • projects/site/src/docs/foundations/layout/index.md
  • projects/site/src/docs/foundations/layout/responsive/container.md
  • projects/site/src/docs/foundations/layout/responsive/index.md
  • projects/site/src/docs/foundations/layout/responsive/viewport.md
  • projects/site/src/docs/foundations/layout/vertical.md
  • projects/site/src/docs/foundations/popovers.md
  • projects/site/src/docs/foundations/themes/index.11ty.js
  • projects/site/src/docs/foundations/typography.md
  • projects/site/src/docs/foundations/view-transitions.md
  • projects/site/src/docs/integrations/angular.md
  • projects/site/src/docs/integrations/index.11ty.js
  • projects/site/src/docs/integrations/lit.md
  • projects/site/src/docs/integrations/mcp-apps.md
  • projects/site/src/docs/integrations/shortcodes.js
  • projects/site/src/docs/internal/guidelines/component-creation.md
  • projects/site/src/docs/internal/guidelines/testing.md
  • projects/site/src/docs/metrics/api-status.11ty.js
  • projects/site/src/docs/metrics/bundle-explorer.11ty.js
  • projects/site/src/docs/metrics/index.11ty.js
  • projects/site/src/docs/metrics/metadata.11ty.js
  • projects/site/src/docs/metrics/testing-and-performance.11ty.js
  • projects/site/src/docs/metrics/wireit.11ty.js
  • projects/site/src/docs/monaco/diff-editor.md
  • projects/site/src/docs/monaco/editor.md
  • projects/site/src/docs/patterns/editor.md
  • projects/site/src/docs/patterns/index.md
  • projects/site/src/docs/patterns/panel.md
  • projects/site/src/docs/skills/index.md
  • projects/site/src/examples/examples.11ty.js
  • projects/site/src/examples/index.11ty.js
  • projects/site/src/index.md

Comment on lines +204 to 211
"command": "vitest run src/_11ty/layouts/metadata.test.ts src/_11ty/layouts/links.test.ts src/_11ty/transforms/site-urls.test.ts src/_11ty/shortcodes/api.test.ts",
"files": [
"src/docs/**/*.md",
"src/_11ty/layouts/common.js",
"src/_11ty/layouts/metadata.js",
"src/_11ty/layouts/metadata.test.ts",
"src/_11ty/shortcodes/api.js",
"src/_11ty/shortcodes/api.test.ts",
"src/**/*.js",
"src/**/*.md",
"src/**/*.ts",
"vitest.config.ts"
],
"output": []

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial | ⚖️ Poor tradeoff

Consider narrowing the test watch patterns to test files only.

The files array now watches all source files (src/**/*.js, src/**/*.md, src/**/*.ts) rather than just test files. This means tests will re-run whenever any source file changes, not just when test files change. While this ensures tests stay fresh, it may cause unnecessary test runs during development.

If tests should only re-run when test files change, consider:

 "files": [
-  "src/**/*.js",
-  "src/**/*.md",
-  "src/**/*.ts",
+  "src/**/*.test.ts",
+  "src/**/*.test.js",
   "vitest.config.ts"
 ],

Otherwise, if the current behavior is intentional (to ensure tests run on any source change), this is fine.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"command": "vitest run src/_11ty/layouts/metadata.test.ts src/_11ty/layouts/links.test.ts src/_11ty/transforms/site-urls.test.ts src/_11ty/shortcodes/api.test.ts",
"files": [
"src/docs/**/*.md",
"src/_11ty/layouts/common.js",
"src/_11ty/layouts/metadata.js",
"src/_11ty/layouts/metadata.test.ts",
"src/_11ty/shortcodes/api.js",
"src/_11ty/shortcodes/api.test.ts",
"src/**/*.js",
"src/**/*.md",
"src/**/*.ts",
"vitest.config.ts"
],
"output": []
"command": "vitest run src/_11ty/layouts/metadata.test.ts src/_11ty/layouts/links.test.ts src/_11ty/transforms/site-urls.test.ts src/_11ty/shortcodes/api.test.ts",
"files": [
"src/**/*.test.ts",
"src/**/*.test.js",
"vitest.config.ts"
],
"output": []
🤖 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 `@projects/site/package.json` around lines 204 - 211, The current package.json
test task watches all source files via the "files" array which causes tests
defined in the "command" (e.g., metadata.test.ts, links.test.ts,
site-urls.test.ts, api.test.ts) to re-run on any src change; update the "files"
array to only match test files (for example restrict to patterns like
src/**/*.{test,spec}.ts or src/**/*.test.ts and include matching .js/.md if you
have test variants) so that vitest only reruns when test files change, leaving
the "command" unchanged.

Comment on lines +6 to +9
const RELATIVE_INTERNAL_LINK_PATTERN = /(?:href=["']|]\()(?:\.\/)?(?:docs|examples|starters)\//;
const BASE_PREFIXED_INTERNAL_LINK_PATTERN = /(?:href=["']|]\()\/elements\/(?:docs|examples|starters)\//;
const JS_RELATIVE_INTERNAL_LINK_PATTERN = /\bhref:\s*['"](?:\.\/)?(?:docs|examples|starters)\//;
const JS_BASE_PREFIXED_INTERNAL_LINK_PATTERN = /\bhref:\s*['"]\/elements\/(?:docs|examples|starters)\//;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Expand invalid-link regexes to catch ../ relative paths.

Line 6 and Line 8 only reject ./... relative links. ../docs/..., ../examples/..., and ../starters/... are still relative and currently bypass this test.

Suggested patch
-const RELATIVE_INTERNAL_LINK_PATTERN = /(?:href=["']|]\()(?:\.\/)?(?:docs|examples|starters)\//;
+const RELATIVE_INTERNAL_LINK_PATTERN = /(?:href=["']|]\()(?:(?:\.\.\/)+|\.\/)?(?:docs|examples|starters)\//;
 ...
-const JS_RELATIVE_INTERNAL_LINK_PATTERN = /\bhref:\s*['"](?:\.\/)?(?:docs|examples|starters)\//;
+const JS_RELATIVE_INTERNAL_LINK_PATTERN = /\bhref:\s*['"](?:(?:\.\.\/)+|\.\/)?(?:docs|examples|starters)\//;

As per coding guidelines, “**/*.test.ts: Follow unit testing patterns ... including ... patterns” and this test should fully enforce the intended invalid-link patterns.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const RELATIVE_INTERNAL_LINK_PATTERN = /(?:href=["']|]\()(?:\.\/)?(?:docs|examples|starters)\//;
const BASE_PREFIXED_INTERNAL_LINK_PATTERN = /(?:href=["']|]\()\/elements\/(?:docs|examples|starters)\//;
const JS_RELATIVE_INTERNAL_LINK_PATTERN = /\bhref:\s*['"](?:\.\/)?(?:docs|examples|starters)\//;
const JS_BASE_PREFIXED_INTERNAL_LINK_PATTERN = /\bhref:\s*['"]\/elements\/(?:docs|examples|starters)\//;
const RELATIVE_INTERNAL_LINK_PATTERN = /(?:href=["']|]\()(?:(?:\.\.\/)+|\.\/)?(?:docs|examples|starters)\//;
const BASE_PREFIXED_INTERNAL_LINK_PATTERN = /(?:href=["']|]\()\/elements\/(?:docs|examples|starters)\//;
const JS_RELATIVE_INTERNAL_LINK_PATTERN = /\bhref:\s*['"](?:(?:\.\.\/)+|\.\/)?(?:docs|examples|starters)\//;
const JS_BASE_PREFIXED_INTERNAL_LINK_PATTERN = /\bhref:\s*['"]\/elements\/(?:docs|examples|starters)\//;
🤖 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 `@projects/site/src/_11ty/layouts/links.test.ts` around lines 6 - 9, The four
regex constants RELATIVE_INTERNAL_LINK_PATTERN,
BASE_PREFIXED_INTERNAL_LINK_PATTERN, JS_RELATIVE_INTERNAL_LINK_PATTERN, and
JS_BASE_PREFIXED_INTERNAL_LINK_PATTERN only account for "./" relative paths;
update each pattern to also match one or more "../" segments so "../docs/...",
"../examples/...", and "../starters/..." are caught too — modify the group that
currently matches (?:\.\/)? to allow sequences like (?:\.\.\/|\.\/)+ or a more
concise (?:\.\.\/)*\.\/? depending on desired strictness so both single and
multi-level parent traversals are rejected for both HTML and JS forms.

Source: Coding guidelines

Comment on lines +29 to +32
<nve-tabs-item selected><a href="/docs/metrics/">Metrics</a></nve-tabs-item>
<nve-tabs-item><a href="/docs/metrics/api-status/">API Status</a></nve-tabs-item>
<nve-tabs-item selected><a href="/docs/metrics/testing-and-performance/">Testing &amp; Performance</a></nve-tabs-item>
<nve-tabs-item><a href="/docs/metrics/wireit/">Wireit Explorer</a></nve-tabs-item>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Remove duplicate selected state in the metrics tab list.

At Line 29 and Line 31, two <nve-tabs-item> entries are marked selected. Keep only the current page tab selected (Testing & Performance) to avoid conflicting active-state behavior.

Suggested fix
-    <nve-tabs-item selected><a href="/docs/metrics/">Metrics</a></nve-tabs-item>
+    <nve-tabs-item><a href="/docs/metrics/">Metrics</a></nve-tabs-item>
       <nve-tabs-item><a href="/docs/metrics/api-status/">API Status</a></nve-tabs-item>
       <nve-tabs-item selected><a href="/docs/metrics/testing-and-performance/">Testing &amp; Performance</a></nve-tabs-item>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<nve-tabs-item selected><a href="/docs/metrics/">Metrics</a></nve-tabs-item>
<nve-tabs-item><a href="/docs/metrics/api-status/">API Status</a></nve-tabs-item>
<nve-tabs-item selected><a href="/docs/metrics/testing-and-performance/">Testing &amp; Performance</a></nve-tabs-item>
<nve-tabs-item><a href="/docs/metrics/wireit/">Wireit Explorer</a></nve-tabs-item>
<nve-tabs-item><a href="/docs/metrics/">Metrics</a></nve-tabs-item>
<nve-tabs-item><a href="/docs/metrics/api-status/">API Status</a></nve-tabs-item>
<nve-tabs-item selected><a href="/docs/metrics/testing-and-performance/">Testing &amp; Performance</a></nve-tabs-item>
<nve-tabs-item><a href="/docs/metrics/wireit/">Wireit Explorer</a></nve-tabs-item>
🤖 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 `@projects/site/src/docs/metrics/testing-and-performance.11ty.js` around lines
29 - 32, Remove the duplicate selected attribute from the wrong tab: the first
<nve-tabs-item> that links to "/docs/metrics/" currently has selected but the
page's correct active tab is the <nve-tabs-item> for "Testing & Performance"
(the one linking to "/docs/metrics/testing-and-performance/"); remove the
selected attribute from the Metrics tab so only the Testing & Performance
<nve-tabs-item> remains selected to prevent conflicting active-state behavior.

<nve-tabs-item selected><a href="docs/metrics/wireit/">Wireit Explorer</a></nve-tabs-item>
<nve-tabs-item><a href="docs/metrics/bundle-explorer/">Bundle Explorer</a></nve-tabs-item>
<nve-tabs-item><a href="docs/metrics/metadata/">Raw Metadata</a></nve-tabs-item>
<nve-tabs-item selected><a href="/docs/metrics/">Metrics</a></nve-tabs-item>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Remove the duplicate selected attribute.

Two tabs are marked as selected (lines 59 and 62), but only the "Wireit Explorer" tab (line 62) should be selected on this page.

🐛 Proposed fix
-      <nve-tabs-item selected><a href="/docs/metrics/">Metrics</a></nve-tabs-item>
+      <nve-tabs-item><a href="/docs/metrics/">Metrics</a></nve-tabs-item>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<nve-tabs-item selected><a href="/docs/metrics/">Metrics</a></nve-tabs-item>
<nve-tabs-item><a href="/docs/metrics/">Metrics</a></nve-tabs-item>
🤖 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 `@projects/site/src/docs/metrics/wireit.11ty.js` at line 59, Duplicate selected
attribute: remove the extra selected on the Metrics tab so only the Wireit
Explorer tab remains selected. Locate the <nve-tabs-item> element that renders
the "Metrics" tab (the tag containing "<a href=\"/docs/metrics/\">Metrics</a>")
and delete the selected attribute from that element, leaving the selected
attribute only on the "Wireit Explorer" <nve-tabs-item>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file scope(ci) scope(core) scope(docs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant