ref(pagefilters) move isSelectionEqual outside of utils#107978
ref(pagefilters) move isSelectionEqual outside of utils#107978
Conversation
| @@ -0,0 +1,246 @@ | |||
| import {OrganizationFixture} from 'sentry-fixture/organization'; | |||
There was a problem hiding this comment.
This file was the only one that was using the isSelectionEqual, so I've moved the functionality here and added the tests. Eod, it is up to the consumers to detect this and not something that pageFilters should provide functionality for.
| @@ -1,64 +0,0 @@ | |||
| import type {Location} from 'history'; | |||
There was a problem hiding this comment.
Removed this by moving the filters to the appropriate locations
Resolved conflicts by keeping our refactored structure: - extractSelectionParameters moved to parse.tsx - getDefaultPageFilterSelection in actions.tsx - utils.tsx and utils.spec.tsx removed (functions relocated) - Added PageFiltersStringified type from master - Updated all imports to reference parse.tsx instead of utils.tsx
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨Aci
Admin
Agent
Agents
Ai Conversations
Ai Insights
Autofix
Autopilot
Billing
Cells
Code Review
Conversations
Copilot
Core
Crons Detector Schedule Preview
Dashboards
Dynamic Grouping
Dynamic Sampling
Eco
Explore
Grouping
Infra
Integrations
Issue Details
Issues
Js Loader
Lint
Llm Detection
Notifications
Oauth
Objectstore
Occurrences On Eap
Onboarding
Preprod
Replay
Replays
Search Agent
Seer
Seer Explorer
Sentry Apps
Settings
Spans
Spans Buffer
Toolbar
Trace
Tracemetrics
Ui
Uptime
Uptime Assertion Failure Data
Webhook
Other
Bug Fixes 🐛Aci
Agent Insights
Agents
Ai Conversations
Ai Insights
Alerts
Auth
Autofix
Autopilot
Billing
Cells
Code Mappings
Code Review
Codeowners
Cursor
Dashboards
Data Forwarding
Eap
Explore
Explorer
Forms
Github Copilot
Grouping
Infra
Insights
Issue Details
Issues
Lint
Logs
Notifications
Onboarding
Preprod
Releases
Replay
Seer
Settings
Span Buffer
Spans Migration
Stories
Tests
Top Issues
Trace Waterfall
Tracemetrics
Typing
Ui
Uptime
Users
Other
Documentation 📚
Internal Changes 🔧Aci
Agent
Agents
Alerts
Api
Autofix
Autopilot
Billing
Cells
Code Review
Code Review
Codeowners
Conversations
Cross Event
Dashboards
Deps
Dynamic Sampling
Eslint
Explorer
Forms
Grouping
Infra
Insights
Integrations
Issues
Llm Detection
Open Periods
Ownership
Preprod
Promotions
Relay
Replay
Routes
Scraps
Seer
Sentry Apps
Slack
Span Buffer
Spans
Stories
Tests
Theme
Tracemetrics
Ui
Uptime
Workflow Engine
Other
Other
Plus 103 more 🤖 This preview updates automatically when you update the PR. |
|
|
||
| class ProjectBaseEventsChart extends Component<Props> { | ||
| defaultProps = { | ||
| static defaultProps = { |
There was a problem hiding this comment.
Adding static to defaultProps changes API dataset parameter
High Severity
Changing defaultProps from an instance property to static defaultProps activates a previously non-functional default. React only reads static defaultProps — the old instance property was dead code, so dataset was always undefined for callers that didn't pass it. Now it defaults to DiscoverDatasets.METRICS_ENHANCED ('metricsEnhanced'), which gets sent to both the events-meta and events-stats API endpoints via fetchTotalCount and EventsChart. Four chart types in projectCharts.tsx (Apdex, Failure Rate, TPM, Transactions) don't pass dataset, so they'll switch from querying the default "discover" dataset to the "metricsEnhanced" dataset — potentially returning different data to users.
| import type {Location} from 'history'; | ||
| import identity from 'lodash/identity'; | ||
| import pick from 'lodash/pick'; | ||
| import pickBy from 'lodash/pickBy'; |
There was a problem hiding this comment.
Heavy datetime module leaks into simple links
Medium Severity
Moving extractSelectionParameters into parse.tsx makes lightweight callers pull in parse.tsx and its top-level moment-timezone dependency. Components like globalSelectionLink.tsx now import a heavy datetime module just to copy query keys, which increases bundle weight on common navigation paths.
Additional Locations (1)
Moves getDefaultPageFilterSelection() from actions.tsx to constants.tsx to resolve a circular dependency between store.tsx and actions.tsx. Previously, store.tsx imported the function from actions.tsx, and actions.tsx imported PageFiltersStore from store.tsx, creating a cycle. The function is called at module-level in store.tsx during initialization, which worked only due to function hoisting but was fragile. Moving the function to constants.tsx eliminates the circular dependency while maintaining the single source of truth for default page filter values.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Removes the PageFiltersStringified export type that was reintroduced during a master merge but is no longer used in the codebase. This type was previously removed as part of the pagefilters refactoring.
Merge some page filter modules that have been scattered around the different files, but have matching or similar implementations.


Merge some page filter modules that have been scattered around the different files, but have matching or similar implementations.