Skip to content

Conversation

@evanpurkhiser
Copy link
Member

No description provided.

@evanpurkhiser evanpurkhiser requested a review from a team as a code owner December 16, 2025 17:15
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Dec 16, 2025
Comment on lines +226 to +229
: {
pathname: makeMonitorDetailsPathname(org.slug, detector.id),
query,
};

This comment was marked as outdated.

: detector.name;

// Preserve page filters when navigating to detector details
const query = pick(location.query, ['start', 'end', 'statsPeriod', 'environment']);
Copy link
Member

Choose a reason for hiding this comment

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

Is this necessary? The monitor details page reads from page filters, so it should be setting the date/env filters appropriately

Copy link
Member Author

Choose a reason for hiding this comment

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

It doesn't seem to work right now? If I change the date range on the uptime monitors list and click a monitor, we lose the parameters

Copy link
Member

Choose a reason for hiding this comment

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

Oh, it looks like it works when selecting from the page filters but not if you use the chart

@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/feat-detectors-preserve-page-filters-env-in-detectorlink branch from 4ffb1b3 to c2fcf22 Compare December 16, 2025 20:33
@getsantry
Copy link
Contributor

getsantry bot commented Jan 7, 2026

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you add the label WIP, I will leave it alone unless WIP is removed ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added the Stale label Jan 7, 2026
@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/feat-detectors-preserve-page-filters-env-in-detectorlink branch from c2fcf22 to 07898ea Compare January 13, 2026 21:35
href = link;
} else {
const pathname = link.pathname ?? '';
const search = link.search ?? (link.query ? `?${qs.stringify(link.query)}` : '');
Copy link
Contributor

Choose a reason for hiding this comment

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

Trailing ? in URLs when query object is empty

Low Severity

When openInNewTab is true and link.query is an empty object {}, the condition link.query ? evaluates to true since empty objects are truthy. However, qs.stringify({}) returns an empty string, resulting in search being just "?" with no parameters. This causes URLs to have a trailing ? when navigating without any page filters set. The check needs to verify the query object has properties, not just that it exists.

Fix in Cursor Fix in Web

@evanpurkhiser evanpurkhiser merged commit 00e8cc9 into master Jan 13, 2026
53 checks passed
@evanpurkhiser evanpurkhiser deleted the evanpurkhiser/feat-detectors-preserve-page-filters-env-in-detectorlink branch January 13, 2026 21:47
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 Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants