Skip to content

NO-JIRA: feat: keep current data while loading new data in perses dashboards#1020

Open
jgbernalp wants to merge 1 commit into
openshift:mainfrom
jgbernalp:keep-current-data-while-loading
Open

NO-JIRA: feat: keep current data while loading new data in perses dashboards#1020
jgbernalp wants to merge 1 commit into
openshift:mainfrom
jgbernalp:keep-current-data-while-loading

Conversation

@jgbernalp

@jgbernalp jgbernalp commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Keeps the current charts data while loading new data to avoid flickering.

Summary by CodeRabbit

  • Bug Fixes
    • Improved dashboard and tool pages so previously loaded data stays visible while new results are loading.
    • Reduced flicker and empty states when switching filters, routes, or query parameters.

Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 30, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@jgbernalp: This pull request explicitly references no jira issue.

Details

In response to this:

Keeps the current charts data while loading new data to avoid flickering.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot requested a review from etmurasaki June 30, 2026 16:48
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 30, 2026
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: f4da3b77-14ed-466a-81ff-9692b33edbed

📥 Commits

Reviewing files that changed from the base of the PR and between 4cdeb09 and f1ce05e.

📒 Files selected for processing (3)
  • web/src/components/dashboards/perses/dashboard-list-page.tsx
  • web/src/components/dashboards/perses/dashboard-page.tsx
  • web/src/components/ols-tool-ui/helpers/OlsToolUIPersesWrapper.tsx

Walkthrough

keepPreviousData: true is added to the QueryClient default query options in three files: dashboard-list-page.tsx, dashboard-page.tsx, and OlsToolUIPersesWrapper.tsx.

QueryClient keepPreviousData

Layer / File(s) Summary
keepPreviousData in all QueryClient configs
web/src/components/dashboards/perses/dashboard-list-page.tsx, web/src/components/dashboards/perses/dashboard-page.tsx, web/src/components/ols-tool-ui/helpers/OlsToolUIPersesWrapper.tsx
Adds keepPreviousData: true to defaultOptions.queries in each QueryClient instance.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: perses dashboards now keep current data visible while new data loads.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The PR only changes QueryClient config in component TSX files; no Ginkgo test declarations or titles were added/edited.
Test Structure And Quality ✅ Passed No Ginkgo tests were changed; the PR only updates React Query config in three TSX components, so the test-structure check is not applicable.
Microshift Test Compatibility ✅ Passed The PR only changes React Query config in UI components; no Ginkgo/e2e tests or MicroShift-unsupported APIs were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR only changes React Query options in TSX UI wrappers; no new Ginkgo/Describe/It tests or SNO-unsafe node assumptions were added.
Topology-Aware Scheduling Compatibility ✅ Passed Only React Query UI files changed; no manifests, operator/controller code, or scheduling constraints were added.
Ote Binary Stdout Contract ✅ Passed PR only changes frontend QueryClient keepPreviousData in three TSX files; no process-level stdout writes or logging changes.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No Ginkgo e2e tests were added; the PR only tweaks React Query settings in TSX components, so the IPv6/disconnected test check is not applicable.
No-Weak-Crypto ✅ Passed Touched files only add keepPreviousData: true; no weak crypto, custom crypto, or secret/token comparisons appear in the patch.
Container-Privileges ✅ Passed Changed manifests only set restrictive securityContext values (runAsNonRoot:true, allowPrivilegeEscalation:false, drop ALL); no privileged/host* or root settings found.
No-Sensitive-Data-In-Logs ✅ Passed The changed files only add keepPreviousData to QueryClient; they contain no console/logger calls or sensitive fields, and no new logging appears in those paths.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@openshift-ci

openshift-ci Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

@jgbernalp: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@PeterYurkovich

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 30, 2026
@openshift-ci

openshift-ci Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jgbernalp, PeterYurkovich

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [PeterYurkovich,jgbernalp]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@PeterYurkovich

Copy link
Copy Markdown
Contributor

Please hold the backport PR's until after 1.5.1, the build server is having a large number of issues and adding anything else to the branches will retrigger pipelines and make it worse

@jgbernalp

Copy link
Copy Markdown
Contributor Author

/hold

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants