Skip to content

Conversation

@ktx-abhay
Copy link
Collaborator

No description provided.

@github-actions github-actions bot added the ☢️ Bug Something isn't working label Nov 7, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

Failed to generate code suggestions for PR

@testdino-playwright-reporter
Copy link

⚠️ Test Run Unstable


Author: ktx-abhay | Branch: fix/skip-local-cache-for-print-dashboard | Commit: 8218d23

Testdino Test Results

Status Total Passed Failed Skipped Flaky Pass Rate Duration
All tests passed 371 348 0 22 1 94% 5m 1s

View Detailed Results

@ktx-abhay ktx-abhay marked this pull request as draft November 7, 2025 06:54
@ktx-abhay ktx-abhay force-pushed the fix/skip-local-cache-for-print-dashboard branch from 8218d23 to b3054e8 Compare November 11, 2025 06:23
@ktx-abhay ktx-abhay marked this pull request as ready for review November 11, 2025 06:25
@github-actions
Copy link
Contributor

Failed to generate code suggestions for PR

@testdino-playwright-reporter
Copy link

⚠️ Test Run Unstable


Author: ktx-abhay | Branch: fix/skip-local-cache-for-print-dashboard | Commit: b3054e8

Testdino Test Results

Status Total Passed Failed Skipped Flaky Pass Rate Duration
All tests passed 371 345 0 24 2 93% 5m 30s

View Detailed Results

@testdino-playwright-reporter
Copy link

⚠️ Test Run Unstable


Author: ktx-abhay | Branch: fix/skip-local-cache-for-print-dashboard | Commit: 36adb47

Testdino Test Results

Status Total Passed Failed Skipped Flaky Pass Rate Duration
All tests passed 371 344 0 24 3 93% 5m 35s

View Detailed Results

@ktx-kirtan ktx-kirtan marked this pull request as draft November 13, 2025 11:58
@ktx-kirtan ktx-kirtan marked this pull request as draft November 13, 2025 11:58
@github-actions
Copy link
Contributor

This PR has been inactive for 14 days. Please update or we will close it soon.

@github-actions github-actions bot added the stale label Nov 25, 2025
@github-actions github-actions bot removed the stale label Dec 3, 2025
@ktx-abhay ktx-abhay added this to the v0.30.0 milestone Dec 3, 2025
@ktx-abhay ktx-abhay marked this pull request as ready for review December 3, 2025 06:05
@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

Failed to generate code suggestions for PR

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 3, 2025

Greptile Overview

Greptile Summary

Modified cache restoration logic in usePanelDataLoader to skip local storage cache when forceLoad is true. This ensures that dashboard print mode always fetches fresh data rather than potentially stale cached data.

  • Added condition forceLoad?.value != true to line 800, preventing cache restoration when printing dashboards
  • Added three comprehensive test cases covering the cache skip behavior with different forceLoad and runCount combinations
  • The change integrates seamlessly with the existing print mode flow where ViewDashboard.vue:277 passes store.state.printMode as the forceLoad parameter

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is minimal, well-tested, and logically sound. The condition correctly uses loose equality checks consistent with the codebase style, and the three new test cases thoroughly validate the behavior across all relevant scenarios (forceLoad=true, forceLoad=false, and runCount>0)
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
web/src/composables/dashboard/usePanelDataLoader.ts 5/5 Added condition to skip local cache restoration when forceLoad=true, enabling fresh data loads for print mode
web/src/composables/dashboard/usePanelDataLoader.spec.ts 5/5 Added comprehensive tests covering cache skip behavior with forceLoad flag and subsequent loads with runCount>0

Sequence Diagram

sequenceDiagram
    participant ViewDashboard
    participant RenderDashboardCharts
    participant PanelSchemaRenderer
    participant usePanelDataLoader
    participant Cache
    participant SearchAPI

    ViewDashboard->>ViewDashboard: User triggers print mode
    ViewDashboard->>RenderDashboardCharts: forceLoad=store.state.printMode (true)
    RenderDashboardCharts->>PanelSchemaRenderer: forceLoad=true
    PanelSchemaRenderer->>usePanelDataLoader: Initialize with forceLoad=true
    
    Note over usePanelDataLoader: loadData() called with runCount=0
    
    alt forceLoad=true AND runCount=0
        usePanelDataLoader->>usePanelDataLoader: Skip cache check (line 800)
        Note over usePanelDataLoader,Cache: Cache restoration skipped
    else forceLoad=false AND runCount=0
        usePanelDataLoader->>Cache: restoreFromCache()
        Cache-->>usePanelDataLoader: Return cached data if available
    else runCount>0
        usePanelDataLoader->>usePanelDataLoader: Skip cache (subsequent load)
    end
    
    usePanelDataLoader->>SearchAPI: Fetch fresh data
    SearchAPI-->>usePanelDataLoader: Return data
    usePanelDataLoader->>PanelSchemaRenderer: Display fresh data
    PanelSchemaRenderer->>RenderDashboardCharts: Render panel
    RenderDashboardCharts->>ViewDashboard: Dashboard ready for print
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@ktx-abhay ktx-abhay merged commit 80a6c45 into main Dec 3, 2025
40 of 41 checks passed
@ktx-abhay ktx-abhay deleted the fix/skip-local-cache-for-print-dashboard branch December 3, 2025 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

☢️ Bug Something isn't working Testing-Completed Testing-Completed v0.30.0-rc1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants