Skip to content

fix(explore): Increase strictness on URLs#115881

Open
nsdeschenes wants to merge 9 commits into
masterfrom
nd/EXP-957/fix-explore-be-stricter-about-urls
Open

fix(explore): Increase strictness on URLs#115881
nsdeschenes wants to merge 9 commits into
masterfrom
nd/EXP-957/fix-explore-be-stricter-about-urls

Conversation

@nsdeschenes
Copy link
Copy Markdown
Contributor

@nsdeschenes nsdeschenes commented May 20, 2026

The goal of this PR is to be a bit more strict when it comes to URLs so that we don't allow link cell actions, etc. to take place for a URL like http://*/api/cool-endpoint.

Closes EXP-957

Before:
Screenshot 2026-05-20 at 10 06 51
Screenshot 2026-05-20 at 10 06 58


After:
Screenshot 2026-05-20 at 10 07 06
Screenshot 2026-05-20 at 10 07 12

nsdeschenes and others added 5 commits May 20, 2026 09:18
URL.parse accepts hostnames like * or {host} that are not real navigable
hosts. Reject wildcard and template characters so these render as plain
text instead of clickable links.

Refs EXP-957
Co-Authored-By: Composer <noreply@cursor.com>

Co-authored-by: Cursor <cursoragent@cursor.com>
Switch event detail surfaces from isUrl to isValidUrl so wildcard and
template hostnames are not treated as navigable links.

Refs EXP-957
Co-Authored-By: Composer <noreply@cursor.com>

Co-authored-by: Cursor <cursoragent@cursor.com>
Switch Discover field renderers and cell actions from isUrl to
isValidUrl, and add coverage for wildcard URL span names.

Refs EXP-957
Co-Authored-By: Composer <noreply@cursor.com>

Co-authored-by: Cursor <cursoragent@cursor.com>
Switch Explore attribute trees and field renderers from isUrl to
isValidUrl, and add coverage for wildcard URL span names.

Refs EXP-957
Co-Authored-By: Composer <noreply@cursor.com>

Co-authored-by: Cursor <cursoragent@cursor.com>
Switch tag details and trace request sections from isUrl to isValidUrl
so wildcard hostnames are not treated as navigable links.

Refs EXP-957
Co-Authored-By: Composer <noreply@cursor.com>

Co-authored-by: Cursor <cursoragent@cursor.com>
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 20, 2026

EXP-957

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 20, 2026
@nsdeschenes
Copy link
Copy Markdown
Contributor Author

@cursor review

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 02075b2. Configure here.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.57%

Tighten isValidUrl to reject template characters in the URL authority.
Add renderUrlCellValue so valid URLs use ExternalLink with the
external-link modal while invalid URLs stay plain text. Restrict cell
action "Open link" to same-origin paths so stripURLOrigin no longer
turns wildcard hosts into in-app routes.

Refs EXP-957
Co-Authored-By: Composer <noreply@cursor.com>

Co-authored-by: Cursor <cursoragent@cursor.com>
@nsdeschenes
Copy link
Copy Markdown
Contributor Author

@cursor review

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 9ae8c88. Configure here.

@nsdeschenes nsdeschenes marked this pull request as ready for review May 20, 2026 13:10
@nsdeschenes nsdeschenes requested review from a team as code owners May 20, 2026 13:10
Copy link
Copy Markdown
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

I think there's one bug around duplicate/inverse checking for valid value. But otherwise LGTM!

Comment thread static/app/utils/discover/fieldRenderers.tsx Outdated
Copy link
Copy Markdown
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

The added deduplication is a nice touch. ✨

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8bb9cc9. Configure here.

Comment thread static/app/utils/discover/fieldRenderers.tsx
nsdeschenes and others added 2 commits May 20, 2026 15:12
String formatter used slice(-1), which returns a one-element array.
After renderUrlCellValue, that showed (no value) instead of the tail
value for tag fields stored as arrays.

Refs EXP-957
Co-Authored-By: Composer <noreply@cursor.com>

Co-authored-by: Cursor <cursoragent@cursor.com>
Render numeric and boolean fallback values instead of treating every non-string URL cell value as missing. This keeps measurement fields visible when they use the string renderer because response metadata is incomplete.

Co-Authored-By: OpenAI Codex <codex@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants