Conversation
Walk composedPath() to find the first ancestor with data-id and data-shape-type, so clicking a child <span class="grpc-stream-type"> inside the <a> correctly fires api-navigation-selection-changed. Adds two regression tests: one for the span click path and one for the direct anchor click. Bumps version to 4.6.19. Made-with: Cursor
spezzirriemiliano
approved these changes
Mar 10, 2026
This was referenced Mar 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes gRPC method badge clicks not triggering navigation in the API summary TOC.
_navigateItemwas readinge.composedPath()[0](the deepest element clicked). For gRPC methods, the<a>contains a child<span class="grpc-stream-type">, so clicking the badge returned the span — which has nodata-id— and the handler silently exited.composedPath()until finding the first element with bothdata-idanddata-shape-type, instead of assuming the first element always has them.Changes
src/ApiSummary.js—_navigateItem: walk composedPath to find data-bearing ancestortest/api-summary.test.js— 2 new regression tests in the gRPC suite:.grpc-stream-typespan → event fires with correctidandtype: "method".method-label.grpc-containeranchor → still workspackage.json— version bump4.6.18 → 4.6.19Test plan
npm testpasses (125 tests, 0 failures, 95.62% coverage)api-navigation-selection-changedTest in API Console
Screen.Recording.2026-03-10.at.2.45.29.PM.mov
GUS
W-21514384