Skip to content

[ENHANCEMENT] Stabilize query results and legend columns - #346

Merged
Gladorme merged 1 commit into
perses:mainfrom
Gladorme:perf/stabilize-query-results
Oct 2, 2026
Merged

Gladorme merged 1 commit into
perses:mainfrom
Gladorme:perf/stabilize-query-results

Conversation

@Gladorme

@Gladorme Gladorme commented Oct 2, 2026

Copy link
Copy Markdown
Member

Description

Split out of #319 to ease review (independent from the other split PRs, based on main).

Keep references stable so downstream memoized chart transformations can be reused.

  • useDataQueries(queryType) memoizes the filtered queryDefinitions / queryResults / errors instead of returning new arrays on every render.
  • TableLegend: the default columns value is a module-level constant instead of a new [] per render.
  • Added DataQueriesProvider tests checking referential stability.

Validation on this branch: npm run lint, npm run format:check, npm run type-check and npm run test all pass.

Screenshots

No visual change.

Checklist

  • Pull request has a descriptive title and context useful to a reviewer.
  • Pull request title follows the [<catalog_entry>] <commit message> naming convention using one of the
    following catalog_entry values: FEATURE, ENHANCEMENT, BUGFIX, BREAKINGCHANGE, DOC,IGNORE.
  • All commits have DCO signoffs.

UI Changes

  • Changes that impact the UI include screenshots and/or screencasts of the relevant changes.
  • Code follows the UI guidelines.
  • E2E tests are stable and unlikely to be flaky.
    See e2e docs for more details. Common issues include:
    • Is the data inconsistent? You need to mock API requests.
    • Does the time change? You need to use consistent time values or mock time utilities.
    • Does it have loading states? You need to wait for loading to complete.

Signed-off-by: Guillaume LADORME <gladorme@gmail.com>
@Gladorme
Gladorme merged commit 354e65a into perses:main Oct 2, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants