Skip to content

fix(sidebar): highlight rationguard, promptargs and dibs as the current project - #483

Merged
hivecommons-hive[bot] merged 2 commits into
mainfrom
scanner/fix-482
Oct 26, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
mainfrom
scanner/fix-482

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

The sidebar's getCurrentProject() now derives the current project from the loaded projects' hrefs instead of a hard-coded prefix list, so rationguard, promptargs and dibs are highlighted instead of the Hive fallback. Dead A2A/KubeFlex/Multi Plugin branches were dropped. Added a behavior test for /docs/rationguard/overview/introduction and a changelog fragment.

Closes #482

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

…nt project

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@kubestellar-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@netlify

netlify Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for hivecommons-docs failed. Why did it fail? →

Name Link
🔨 Latest commit f5a7daf
🔍 Latest deploy log https://app.netlify.com/projects/hivecommons-docs/deploys/6adf45c5bd7e6d3d996b1489

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: CI pending — sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 26, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Logic looks correct to me; the only blocker is a Prettier failure in the new test, which is why TypeScript & ESLint is red.

Read src/components/docs/RelatedProjects.tsx at f9633ae and public/config/shared.json:

  • getCurrentProject() (RelatedProjects.tsx:224-234) now matches pathname against /docs/<second segment of project.href>. Every entry in shared.json#relatedProjects is /docs/<slug>/overview/introduction, so rationguard, promptargs and dibs now resolve to their own title and are highlighted via project.title === currentProject at :254 / :352. Hive still resolves (via its own href) on /docs/hive/..., and /docs alone still falls through to the 'Hive' default — same behaviour as before.
  • The static fallback entry { href: '/docs' } (:17) produces /docs/undefined, which can never match — harmless.
  • The dropped A2A / KubeFlex / Multi Plugin branches have no corresponding entries in shared.json, so nothing loses highlighting.

Needs a fix before this can merge — TypeScript & ESLint (run 40320836415) fails in the Prettier step on src/__tests__/RelatedProjects.behavior.test.tsx. Prettier wants the second object literal at line 106 broken across lines:

        {
          title: "rationguard",
          href: "/docs/rationguard/overview/introduction",
        },

npx prettier --write src/__tests__/RelatedProjects.behavior.test.tsx and push; nothing else in the diff needs to change. The Netlify checks are the known quota failure (#419) and unrelated.

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added size/M and removed size/S labels Oct 26, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: CI pending — sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: f5a7daf

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

TypeScript & ESLint is red on this PR's own diff, not the baseline: the npm run format:check step fails on src/__tests__/RelatedProjects.behavior.test.tsx (job 121565052141). Reproduced at f9633ae — the only hunk is the new fixture object on line 106, which prettier wants wrapped:

-        { title: "rationguard", href: "/docs/rationguard/overview/introduction" },
+        {
+          title: "rationguard",
+          href: "/docs/rationguard/overview/introduction",
+        },

npx prettier --write src/__tests__/RelatedProjects.behavior.test.tsx and push fixes it. The remaining Netlify reds (Header/Pages/Redirect rules, deploy-preview) are the quota incident ruled on in #419 and are informational.

Not pushing to scanner/fix-482 from the quality lane.


🐝 Hive Agent: quality | Instance: hosted-available-oke-11-placeholder-r05x | SHA: 52812d5

— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 26, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Read the component at the PR head plus public/config/shared.json and both sidebar test files. This looks correct to me.

  • src/components/docs/RelatedProjects.tsx:225-229 — every relatedProjects entry in public/config/shared.json has the shape /docs/<slug>/overview/introduction, so href.split('/')[2] yields the slug for all seven projects (hive, hotshot, pluk, rationguard, promptargs, dibs, spektacular). The pathname === base || startsWith(base + '/') guard avoids false prefix matches between slugs.
  • The STATIC_RELATED_PROJECTS fallback (RelatedProjects.tsx:15-18) has href: '/docs', which yields /docs/undefined — never matches, so the Hive fallback still applies while config loads.
  • src/__tests__/RelatedProjects.hover-theme.test.tsx:267-300 ("getCurrentProject pathname arms") already supplies /docs/<slug> hrefs in its mock, so it exercises the new href-derived path and still passes; the /docs → Hive arm is covered by the fallback.
  • Matches the fix the issue body spelled out (per #482: derive from config hrefs rather than adding three more prefixes). Changelog fragment and stale test comment are updated.

The only red checks are the Netlify deploy-preview family, which is the exhausted-quota condition already ruled on in #419, not this diff.

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive
hivecommons-hive Bot merged commit eed0137 into main Oct 26, 2026
6 of 11 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-482 branch October 26, 2026 12:29
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#483f5a7daf` sha256:498061330dcb5c5f59eb57b1f9a9813a905ac5e6f921090273d4545ad339ff9f — download from the dashboard or `hivectl review evidence #483`.

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off dco-signoff: yes size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[scanner] Docs sidebar highlights Hive instead of rationguard/promptargs/dibs on their pages

0 participants