Repository navigation
Keep the end of an API path visible in search results - #4890
Merged
Merged
Conversation
The route line cut long paths at the end with an ellipsis, which hid the
only part that tells operations apart. Two Insights results both read
`/v1/monitoring/{resourceType}/{resourceId}/in…`. The row now truncates
like the search breadcrumb: the first segment stays, the middle shrinks
first, and the last literal segment shrinks last.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…by Libra) The route line highlighted each of its three parts on its own, so a query like `/api/fleet` matched nothing in `/api/fleet/agents`. Matches are now found on the whole path and clipped to each part. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
akira28
approved these changes
Nov 17, 2026
reakaleek
enabled auto-merge (squash)
November 17, 2026 11:55
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4890/ |
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.
An API search result now truncates a long route like the search breadcrumb does. The end of the path stays visible and the shared start shrinks first.
Affects: Site UI
Prompt summary: Searching "insights by id" cuts the API path in the results with an ellipsis in an odd place. The author asked for a better way to show it and suggested truncating it the same way as the breadcrumbs in search results.
Why
The route line cut every long path at its end with
text-overflow: ellipsis. The end is the only part that tells operations apart. Two Insights results both read/v1/monitoring/{resourceType}/{resourceId}/in…, so a reader cannot tell "Get insight by ID" from "Search insights".What
Route truncation
A long route now splits into three parts, like the search breadcrumb. The first segment never shrinks. The middle gives up its width first. The last literal segment, with any parameters after it, shrinks last. The row from the report reads
GET /v1…/insights/{insightId}at the same width. A path that fits looks the same as before.Path splitting
splitRoutePathfinds the last segment that is not a{parameter}and splits the path around it. A path with no literal segment, or with one segment, has no first or middle part and renders whole.Tests
RouteLine.test.tsxchecks the split for four paths against literal values. The existing.route-lineassertions inSearchResultsList.test.tsxpass unchanged.Out of scope The
idtoken still highlights theIdinresourceId. Property rows highlight the same way, and changing it affects every highlighted surface.Verify
🤖 Generated with Claude Code