fix(supernav): highlight WCM tab on the /wcm/ page - #47
Conversation
Signed-off-by: rajnisht7 <rajnishtiwari9787@gmail.com>
lywinged
left a comment
There was a problem hiding this comment.
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.
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: