Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes an issue where chart status indicators (e.g., "Installed", "Upgradeable") did not update immediately after installing or upgrading a chart, requiring a page refresh. The fix removes caching logic that was originally added for performance but is no longer necessary due to subsequent optimizations (tooltips, lazy loading, and LazyImage component improvements).
Key Changes:
- Removed the
appCardsCacheobject and associated caching logic from the charts page component - Removed the
_cardContentcaching in the Chart model'scardContentgetter to enable reactive status updates - Simplified the code by directly computing card data on each access rather than maintaining a cache
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
shell/pages/c/_cluster/apps/charts/index.vue |
Removed appCardsCache from component data and simplified the appChartCards computed property to directly map charts without caching |
shell/models/chart.js |
Removed caching logic from the cardContent getter to compute statuses dynamically, allowing immediate updates when charts are installed or upgraded |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rak-phillip
left a comment
There was a problem hiding this comment.
LGTM - I gave this a quick test with the steps outlined above. The issue looks to be resolved and I didn't encounter any aforementioned performance issues.
Summary
Fixes #14774
Occurred changes and/or fixed issues
Removed the caching logic for chart card data. This change ensures chart statuses (e.g., "Installed") update immediately, fixing a side-effect where a page refresh was required. The caching was originally implemented for performance, but it is no longer necessary due to several subsequent optimizations made to the charts page:
Technical notes summary
Removed the caching logic in:
shell/pages/c/_cluster/apps/charts/index.vueshell/models/chart.jsAreas or cases that should be tested
Go to the charts page and install a version of a chart that's not the latest, then come back to the charts page without refreshing the page, you should be able to see the installed and upgradeable icons on the card.
Areas which could experience regressions
The primary focus of testing should be to verify that these changes do not introduce a performance regression on the charts page.
Add a repository that hosts a large number of charts. The Bitnami repo is a good candidate:
https://charts.bitnami.com/bitnamiNavigate to the charts page and assess performance while:
The page should remain responsive. Scrolling should be smooth, and filters should apply without a noticeable lag. The overall performance should be on par with the master branch.
Screenshot/Video
cache.mov
Checklist
Admin,Standard UserandUser Base