fix: add data freshness indicators and TTL validation (auto-QA stale data)#3804
fix: add data freshness indicators and TTL validation (auto-QA stale data)#3804clubanderson merged 2 commits intomainfrom
Conversation
✅ Deploy Preview for kubestellarconsole ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
👋 Hey @Copilot — thanks for opening this PR!
This is an automated message. |
Agent-Logs-Url: https://github.com/kubestellar/console/sessions/fb19041d-c073-48b3-83d4-0be9956c3a7e Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits. 📝 Please follow instructions in the contributing guide to update your commits with the DCO Full details of the Developer Certificate of Origin can be found at developercertificate.org. The list of commits missing DCO signoff:
DetailsInstructions 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. |
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
Auto-QA flagged 14 components with caching but no freshness indicators, and localStorage reads without staleness validation. This PR wires
lastRefreshinto card loading state for real cached-data cards, adds TTL expiry to mission wizard state, and improves the auto-QA check to eliminate ~296 false positives via file-level analysis.📝 Summary of Changes
Freshness indicators — cards that display cached API data now propagate
lastRefreshso CardWrapper shows "Updated Xm ago":SecurityIssues,ProactiveGPUNodeHealthMonitor:lastRefreshadded touseCardLoadingStateLatencyBreakdown,ParetoFrontier:lastUpdatedderived fromlastRefresh, passed touseReportCardDataStateNodeDrillDown,MultiClusterSummaryDrillDown:lastRefreshexposed fromuseCachedNodesFalse-positive fixes — components matching the auto-QA regex but not displaying API data (e.g.
ChunkErrorBoundaryhandles JS bundle caching,EPPRouting'skvCacheUsageis GPU/AI inference cache) get clarifying comments so the check correctly excludes them.localStorage TTL —
useMissionControl.tsnow wraps persisted wizard state with asavedAttimestamp; state older than 7 days is discarded on load:Auto-QA check improvement (
.github/workflows/auto-qa.yml) — replaced the line-levellocalStorage.getItemgrep (296 false positives, always triggered) with a file-level analysis: only flags components that both read and write localStorage (caching pattern) but lack any TTL/expiry constant — correctly ignoring games, preferences, auth tokens, and UI state.Changes Made
lastRefreshintouseCardLoadingState/useReportCardDataStatefor 6 cached-data card componentsuseMissionControlwizard state persistence (with legacy-format compat)Checklist
git commit -s)Screenshots or Logs (if applicable)
Auto-QA check simulation results after changes:
👀 Reviewer Notes
The auto-QA workflow change is the most significant: the old check used
grep -rn "localStorage.getItem" src/and flagged any line without TTL keywords on the same line — this produced 296 matches including game high scores, auth tokens, and UI preferences. The new check finds files that cache+read (bothsetItemandgetItem) but have no TTL constant, with exclusions for obvious non-expiring categories.⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.