Skip to content

fix(supernav): highlight WCM tab on the /wcm/ page - #47

Open
rajnisht7 wants to merge 1 commit into
agentrust-io:mainfrom
rajnisht7:fix-wcm-supernav
Open

fix(supernav): highlight WCM tab on the /wcm/ page#47
rajnisht7 wants to merge 1 commit into
agentrust-io:mainfrom
rajnisht7:fix-wcm-supernav

Conversation

@rajnisht7

Copy link
Copy Markdown

The nav bar has a path check for every other apex-hosted property (quickstart, demos, telemetry, registry) but not for wcm, even though wcm/index.html already loads supernav.js. So visiting agentrust-io.com/wcm/ fell through to the default and highlighted "agentrust-io" instead of "WCM".

This looks like it slipped through by accident: #45 added the registry check and its commit message says it was "built on the same pattern as /wcm/" implying wcm already had this handling. It never did. WCM was added to the nav in #32 pointing at a future subdomain (wcm.agentrust-io.com), and the actual /wcm/ page came from a separate commit (#30) that never touched supernav.js.

Added both checks, same as how cA2A already handles its two homes:

  • agentrust-io.com/wcm/ -> wcm
  • wcm.agentrust-io.com -> wcm (for when that subdomain goes live)

Signed-off-by: rajnisht7 <rajnishtiwari9787@gmail.com>

@lywinged lywinged 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.

Checked on 03134dc over 9697f58. I ran supernav.js under a stub DOM with location set by hand. On main, agentrust-io.com/wcm/ marks the apex entry active; on this head it marks WCM, and wcm.agentrust-io.com, which today answers 307 to /wcm/, resolves to WCM as well. The other entries are unchanged: /registry/ still resolves to Registry and tests. to TRACE. The history in the body holds: #32 added the WCM entry and touched supernav.js, #30 added the page and did not, and the #45 message says "built on the same pattern as /wcm/". wcm/index.html loads the script at line 300. The site's dash check and the WCM launch-page test pass on this head.

Two notes, neither a change request. The match is a prefix, so /wcm-anything would also light WCM; that is the convention the four entries above it use and no such path exists. And the diff adds one blank line between the comment and the assignment.

Tool-assisted: the checks and this write-up.

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