Skip to content

A major renaming: DashboardQuery -> DashboardState#6059

Merged
RobertJoonas merged 4 commits intomasterfrom
fe-query-to-dashboardstate
Feb 12, 2026
Merged

A major renaming: DashboardQuery -> DashboardState#6059
RobertJoonas merged 4 commits intomasterfrom
fe-query-to-dashboardstate

Conversation

@RobertJoonas
Copy link
Contributor

@RobertJoonas RobertJoonas commented Feb 10, 2026

Changes

This PR is a pure refactor dealing only with renaming. The diff is quite enormous so I decided to open a separate PR just for that.

Renaming query -> dashboardState globally in the frontend makes sense because:

  • the "dashboard state" that is derived from url search params, doesn't yet represent a query. In order to actually define a "query" dimensions and metrics need to be provided
  • dashboardState also includes fields that are irrelevant when "querying". E.g. resolvedFilters (used for flattening segment filters so the FE could be aware of what filters are applied), and labels (for rendering country, city, region, segment names in filter labels)
  • An actual StatsQuery object is about to be introduced with Move Top Stats to new internal stats endpoint #6035, so this is to avoid a naming clash.

Tests

  • This PR does not require tests

Changelog

  • This PR does not make a user-facing change

Documentation

  • This change does not need a documentation update

Dark mode

  • This PR does not change the UI

@RobertJoonas RobertJoonas requested a review from a team February 10, 2026 14:46
@RobertJoonas RobertJoonas force-pushed the fe-query-to-dashboardstate branch from 90de553 to 8d84d45 Compare February 10, 2026 14:48
@apata apata added the preview label Feb 10, 2026
@github-actions
Copy link

Preview environment👷🏼‍♀️🏗️
PR-6059

Copy link
Contributor

@apata apata left a comment

Choose a reason for hiding this comment

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

Wow, we do use the word query in a lot of places. Great job getting them all replaced successfully!

Regarding the new name, I can't think of a better one, but I think internally we should be careful with it for future features. Everything the user sees on the dashboard is part of its state, but not everything should be part of DashboardState and DashboardStateContext. Otherwise, we may trigger unnecessary re-renders that in turn make the page slow for the users.

@coderabbitai
Copy link

coderabbitai bot commented Feb 12, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fe-query-to-dashboardstate

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Comment @coderabbitai help to get the list of available commands and usage tips.

@RobertJoonas
Copy link
Contributor Author

Regarding the new name, I can't think of a better one, but I think internally we should be careful with it for future features. Everything the user sees on the dashboard is part of its state, but not everything should be part of DashboardState and DashboardStateContext. Otherwise, we may trigger unnecessary re-renders that in turn make the page slow for the users.

@apata, Fair point about being careful!

@RobertJoonas RobertJoonas added this pull request to the merge queue Feb 12, 2026
Merged via the queue into master with commit c7eaba1 Feb 12, 2026
22 checks passed
@RobertJoonas RobertJoonas deleted the fe-query-to-dashboardstate branch February 12, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants