🐛 Fix Events Timeline summary counts and sort order#12422
Conversation
- Fix summary cards (Warnings, Normal, Peak) showing 0 by calculating from all filtered events instead of only time-bucketed events - Fix event sort order to show newest events first (descending by lastSeen/firstSeen timestamp) - Events are now sorted before grouping into time buckets to ensure recent events are prioritized Fixes #12411 Fixes #12414 Signed-off-by: Copilot <copilot@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 |
✅ Deploy Preview for kubestellarconsole ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
👋 Hey @kubestellar-hive[bot] — thanks for opening this PR!
This is an automated message. |
Count the summary stats from the same filtered event collection that powers the card data so old but still listed events no longer show zeroed summaries. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <copilot@github.com>
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
|
Post-merge build verification passed ✅ Both Go and frontend builds compiled successfully against merge commit |
* 🐛 Fix Events Timeline summary counts and sort order - Fix summary cards (Warnings, Normal, Peak) showing 0 by calculating from all filtered events instead of only time-bucketed events - Fix event sort order to show newest events first (descending by lastSeen/firstSeen timestamp) - Events are now sorted before grouping into time buckets to ensure recent events are prioritized Fixes #12411 Fixes #12414 Signed-off-by: Copilot <copilot@github.com> * 🐛 Fix Events Timeline summary counts showing 0 Count the summary stats from the same filtered event collection that powers the card data so old but still listed events no longer show zeroed summaries. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <copilot@github.com> --------- Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* 🌱 Memoize unmemoized filter/map operations in hooks and components (#12106) * 🌱 Add createCardCachedHook factory and shared fetchJson utility Reduces boilerplate in card data hooks by extracting two shared patterns: 1. createCardCachedHook — factory that combines useCache + useCardLoadingState wiring, eliminating the identical 50-line tail duplicated across 14 hooks. Accepts a hasAnyData predicate for custom empty-state logic. 2. lib/fetchJson — shared HTTP fetch utility with NOT_INSTALLED_STATUSES handling, previously copy-pasted across 7+ hooks. Converts useCachedDapr, useCachedCni, and useCachedStrimzi as proof of pattern. Remaining 11 hooks can be migrated incrementally. Net reduction: ~100 lines now; ~1400 lines when all 14 hooks are migrated. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> * 🐛 Fix fetchJson import paths Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> * 🌱 Memoize unmemoized filter/map operations in hooks and components Add useMemo/useCallback to prevent unnecessary array allocations on every render, reducing downstream re-renders in consuming components: - useClusterGroups: memoize crGroups.map(crToLocalGroup) - useLocalClusterTools: memoize tools.filter(t => t.installed) - useFeedbackDrafts: memoize drafts and recentlyDeletedDrafts filters - useFederation: memoize useFederationForCluster filter+map chain - useCardHistory: useCallback for getRemovedCards - useFeatureRequests: useCallback for getUnreadCountForRequest - Kubectl.tsx: useMemo for cluster filter and history search Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> --------- Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🌱 Decompose workloadQueries.ts into domain-specific modules (#12115) * 🌱 Decompose workloadQueries.ts into domain-specific modules Split the 1966-line monolithic workloadQueries.ts into focused modules: - workloadQueries/shared.ts: shared types, interfaces, helpers (174 lines) - workloadQueries/pods.ts: usePods, useAllPods, usePodIssues, usePodLogs (708 lines) - workloadQueries/deployments.ts: useDeployments, useDeploymentIssues (537 lines) - workloadQueries/infrastructure.ts: useJobs, useHPAs, useReplicaSets, etc (563 lines) - workloadQueries/index.ts: re-exports + mode transition registration (46 lines) Each module owns its own cache state and exports a resetCache function. The facade workloads.ts continues to re-export from ./workloadQueries unchanged. All 218 existing tests pass without modification. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> * 🐛 Fix TypeScript errors in workload decomposition - Add missing UsePodLogsResult import to infrastructure.ts - Remove unused agentFetch and UsePodLogsResult imports from pods.ts Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> --------- Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * feat: faster restart detection with friendlier snackbar messaging (#12147) Switch health poll to fast-retry (3s) on first failure instead of waiting for the next 15s cycle. Detection drops from ~60s to ~12s. Replace alarming red "Connection lost" snackbar with calming blue "Console restarting..." spinner + auto-reconnect hint. Signed-off-by: Andrew Anderson <andy@clubanderson.com> * Add screenshot 1 for issue #12162 * Add screenshot 1 for issue #12164 * feat: show watchdog startup progress in restart toast (#12161) * feat: show watchdog startup progress in restart toast When the backend restarts via startup-oauth.sh, the watchdog process stays alive on port 8080 and reports startup stages via /health. The restart toast now shows real progress ("Installing dependencies…", "Compiling backend…", etc.) instead of generic "Console restarting…". The Restart button is hidden during watchdog progress since the backend is already restarting. Signed-off-by: Andrew Anderson <andy@clubanderson.com> * fix: use defaultValue for dynamic i18n key in watchdog toast Signed-off-by: Andrew Anderson <andy@clubanderson.com> --------- Signed-off-by: Andrew Anderson <andy@clubanderson.com> * 🐛 Validate NetworkUtils ping interval (#12173) Fixes #12131 Replace the hardcoded default ping interval with a named constant and validate persisted intervals before using them. Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Use authenticated IDs in resolutions (#12174) Fixes #12132 Record resolutions with the authenticated user ID when available and fall back to a stable anonymous device ID, with regression coverage for both paths. Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Add color-coded token usage levels (#12186) Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Highlight feedback modal shortcuts (#12193) Make the Cmd/Ctrl+Enter guidance more prominent in the feedback modal footer and submit button. Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Restore Home cluster drilldown resources (#12192) Resolve cluster aliases to their canonical names in the Home drilldown and surface namespace pod counts so cluster resources match the My Clusters view. Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Sync live route context during navigation (#12191) Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Fix CrashLoopBackOff diagnosis (#12201) Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Fix token usage dropdown inaccurate data (#12195) * 🐛 Fix token usage dropdown inaccurate data Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> * 🐛 Fix TypeScript type error in mission category parameter Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: kubestellar-hive[bot] <280983584+kubestellar-hive[bot]@users.noreply.github.com> * 🐛 Fix AI Cluster Issue Predictor persistent failure state (#12210) Reset failure indicators once the card has usable data again. Transient timeouts in supporting refreshes should not leave the card stuck showing a persistent refresh failure badge. Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add screenshot 1 for issue #12226 * 🐛 Fix resources missing in Home global view (#12203) * 🐛 Fix resources missing in Home global view Surface namespace resources in the Home cluster drill-down so pods and related workloads are visible from the global overview path too. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> * fix: resolve TypeScript errors in ClusterDrillDown component Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Andy Anderson <clubanderson@users.noreply.github.com> --------- Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Signed-off-by: Andy Anderson <clubanderson@users.noreply.github.com> Co-authored-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Andy Anderson <clubanderson@users.noreply.github.com> * 🐛 Make Cmd+Enter submit instruction more visible (#12200) * 🐛 Make Cmd+Enter submit instruction more visible Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> * fix: remove unused Keyboard import and KEYBOARD_HINT_BADGE_CLASS constant Signed-off-by: Andy Anderson <clubanderson@users.noreply.github.com> --------- Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Signed-off-by: Andy Anderson <clubanderson@users.noreply.github.com> Co-authored-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Andy Anderson <clubanderson@users.noreply.github.com> * 🌱 Split themes.ts into focused modules (12209) (#12217) Splits the 1532-line themes.ts into 4 smaller, focused modules: - types.ts (72 lines): Type definitions - catalog.ts (1418 lines): Theme definitions - storage.ts (25 lines): Custom theme storage - index.ts (128 lines): Main exports and utilities All existing imports from '@/lib/themes' continue to work via index.ts re-exports. This improves IDE performance, code navigation, and maintainability. Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> * 🐛 Fix AI Cluster Issue Predictor persistent refresh failure state (#12215) Handle offline detection refresh failures more gracefully so cached or partial data does not surface a persistent card-level failure. Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * ✨ Mission Browser: open detail on card click + fix card alignment (#12232) * ✨ Mission Browser: open detail on card click + fix card alignment Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Auto-QA Bot <auto-qa@example.com> * 🐛 Fix useRef TS2554: provide initial value for revealMissionInTreeRef Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Auto-QA Bot <auto-qa@example.com> --------- Signed-off-by: Auto-QA Bot <auto-qa@example.com> Co-authored-by: Auto-QA Bot <auto-qa@example.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🌱 Split cardRegistry.ts into focused category modules (#12240) Signed-off-by: Auto-QA Bot <auto-qa@example.com> Co-authored-by: Auto-QA Bot <auto-qa@example.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Surface backend unavailability and disable pod actions when disconnected (#12241) - Layout snackbar now shows 'Connection lost' instead of misleading 'Console restarting' when backend is down without watchdog stage - Pod Diagnose/Repair/Delete buttons disabled with clear feedback when backend is unreachable - Warning banner shown in pod drilldown AI analysis section - Actions fail-fast with guard clauses checking backendConnected Signed-off-by: Auto-QA Bot <auto-qa@example.com> Co-authored-by: Auto-QA Bot <auto-qa@example.com> * 📖 Remove non-existent setup wizard from auth docs (#12247) The authentication documentation describing the setup wizard has been removed from the centralized docs repository (kubestellar/docs), as it created confusion about available features. The setup wizard flow remains implemented in the backend code for users who need manual OAuth configuration, but is no longer documented as a primary authentication method. Fixes #12245 Signed-off-by: Auto-QA Bot <auto-qa@example.com> Co-authored-by: Auto-QA Bot <auto-qa@example.com> * 🐛 Show backend-unavailable banner and disable actions when API is down (#12248) Signed-off-by: Auto-QA Bot <auto-qa@example.com> Co-authored-by: Auto-QA Bot <auto-qa@example.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Fix EventsDrillDown and GPUNamespaceDrillDown tests after back-nav changes (#12290) Add drill-down context mocks and assert the new back-navigation UI introduced by PR #12287.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> * 🐛 Fix EventsDrillDown test mock paths and assertion (#12294) - Fix vi.mock paths for StatusIndicator, ClusterBadge, and agentFetch to resolve correctly from __tests__/ subdirectory - Fix test assertion to check for skeleton (animate-pulse) which is the actual initial render state, not drilldown.goBack which only appears in the main view after data loads Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> * remove pr-verifier workflow (#12298) PR verification is handled by infra's reusable workflow which has been causing recurring startup_failure. Console is now excluded from the workflow sync via kubestellar/infra#136. Signed-off-by: Andrew Anderson <andy@clubanderson.com> * 🐛 Allow analytics proxies to accept requests without Origin header (#12326) Non-browser clients (server-side trackers, embedded integrations, curl) legitimately omit the Origin header. Previously these were rejected with 403. Now requests without Origin are permitted while present Origins are still validated against the allowlist. Updates both Go backend and Netlify analytics-collect function for parity with the existing umami-collect behavior. Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Fix BroadcastAll silently dropping client disconnection on unbuffered unregister (#12327) BroadcastAll() spawned a goroutine to unregister slow clients but used a select/default on the unbuffered unregister channel. Since the hub loop is busy during broadcast, the default fires every time, silently discarding the disconnect — leaking the WebSocket connection, goroutines, and FDs. Apply the same 1-second timeout + force-close fallback that was implemented for Broadcast() in #11877. If the unregister channel isn't consumed within 1s, closeConn() is called directly to prevent leaks. Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Revert "Allow analytics proxies to accept requests without Origin header (#12326)" (#12348) This reverts commit 50b9eb5. The change allowed all requests without an Origin header to bypass the analytics proxy allowlist. There are no server-side analytics callers in the codebase — all GA4 events are submitted from the browser, which always sends Origin. The original 403 for missing Origin was intentional security hardening. Signed-off-by: Andy Anderson <andy@clubanderson.com> Signed-off-by: Andrew Anderson <andy@clubanderson.com> * 🌱 Extract more inline style objects to module-level constants (#12352) * 🌱 Extract inline style objects to module-level constants Extract static inline style objects to module-level constants to improve: - Code maintainability by reducing duplicated style definitions - Bundle size through improved tree-shaking - Runtime efficiency by reusing const objects Changes: - CardWrapper.tsx: Extract CONTAINER_QUERY_STYLE constant - ClusterLocations.tsx: Extract PING_ANIMATION_STYLE constant Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <copilot@github.com> * fix: resolve TS errors in extracted style constants Move CHART_AREA_MIN_HEIGHT above its first use in ClusterMetrics.tsx to fix TS2448/TS2454 (block-scoped variable used before declaration). Wire PIPELINE_FLOW_GRID_STYLE to the RunRow grid div in PipelineFlow.tsx and remove the now-unused CSSProperties import. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <copilot@github.com> * 🌱 Extract more inline style objects to module-level constants Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <copilot@github.com> --------- Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add screenshot 2 for issue #12362 * Add screenshot 1 for issue #12362 * 🐛 Show exact feedback request count on nav bar instead of 99+ cap (#12367) Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Add user notifications for silent error handlers (#12373) Surface error notifications to users in catch blocks that previously only logged to console: - NamespaceOverview: show warning toast when localStorage fails to restore cluster/namespace selection - ClusterOPAModal: show error toast when policy YAML fetch fails - Add i18n key for storage restore error message Several flagged items were already handled: NamespaceManager (3 blocks already use showToast), useInsightActions (onError callback), and useMissionControl (quota banner pattern). Fixes #12368 Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Fix Events Timeline summary counts and sort order (#12422) * 🐛 Fix Events Timeline summary counts and sort order - Fix summary cards (Warnings, Normal, Peak) showing 0 by calculating from all filtered events instead of only time-bucketed events - Fix event sort order to show newest events first (descending by lastSeen/firstSeen timestamp) - Events are now sorted before grouping into time buckets to ensure recent events are prioritized Fixes #12411 Fixes #12414 Signed-off-by: Copilot <copilot@github.com> * 🐛 Fix Events Timeline summary counts showing 0 Count the summary stats from the same filtered event collection that powers the card data so old but still listed events no longer show zeroed summaries. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <copilot@github.com> --------- Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Fix 'needs attention' button to show attention items instead of missions (#12425) Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> * 🐛 Disable interactive controls on disconnected clusters (#12444) Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🧪 Fix 2 remaining test failures from Coverage Suite #2246 (#12460) Fixes #12458 Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> * 🌱 Add unit tests for restart command, namespace grouping, delete flow, and loading states (#12492) - Fix #12478: Assert kubectlProxy.exec called with correct args in restart test - Fix #12479: Add tests for namespace-grouped view (default primary view) - Fix #12480: Add tests for delete confirmation dialog (confirm + cancel) - Fix #12481: Add tests for loading skeleton and agent-offline states Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Fix vi.mock hoisting error in Workloads test (#12501) Use vi.hoisted() for spies referenced by vi.mock() factories so the test file loads correctly under Vitest hoisting. Also tighten namespace card assertions to use heading queries so the file passes once it executes. Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Prevent double submission on mission approval/execute buttons (#12528) Add isSubmitting state to disable buttons immediately on click, preventing duplicate POST requests on slow networks. Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * ✨ Feature/quantum rebased : Add Quantum Computing Demo dashboard to console (#12531) * Add screenshot 1 for issue #12569 * Add screenshot 1 for issue #12570 * fix: enable local cluster start button for detected clusters (#12578) Allow the play/start button to function for detected local clusters (kind, minikube, k3d) even when they show as unreachable. This enables users to start stopped clusters from the UI. Only disable controls for cloud clusters (EKS, GKE, AKS) where starting is not possible. Fixes: #12444 (related to cluster control accessibility) Signed-off-by: Kevin Roche <kproche@us.ibm.com> * 🐛 Check json.Encode errors in kagent_crds.go (#12592) All 21+ json.NewEncoder(w).Encode() calls were silently discarding errors. If encoding fails (writer error, unencodable field), clients received corrupted partial JSON with no server-side error logged. Now every Encode call checks the error and returns an HTTP 500 with structured slog.Error logging. Fixes #12590 Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Add /status endpoint to kc-agent (Fixes #12587) (#12595) * 🐛 Fix kc-agent auth bypass when token is startup-generated (#12587) startup-oauth.sh auto-generates KC_AGENT_TOKEN and exports it, but kc-agent treats any env-var-provided token as explicitly set, disabling the origin-based auth bypass. This breaks browser connections before OAuth login, because the frontend cannot fetch /api/agent/token until after auth. Add KC_AGENT_TOKEN_GENERATED so startup scripts can mark auto-generated tokens. kc-agent now treats that flag as non-explicit token setup, preserving the trusted-origin browser bypass while keeping strict token auth for user-provided KC_AGENT_TOKEN values. Also add coverage for the origin bypass path in pkg/agent validateToken tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <copilot@github.com> * 🐛 Add /status endpoint to kc-agent so frontend can verify auth PR #12445 added an auth probe in useLocalAgent.ts that calls /status on the kc-agent, but the endpoint did not exist. The kc-agent returned 404, which caused checkAgent() to fail on every poll, marking the agent as disconnected after 9 attempts even though it was running fine. Add a /status handler that requires token auth and returns basic agent info (version, cluster count). This gives the frontend a way to verify that its cached KC_AGENT_TOKEN is valid before marking the connection as 'connected'. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <copilot@github.com> --------- Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🌱 Fix import patterns preventing tree-shaking (#12608) Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🌱 Replace namespace import with named imports in i18n.ts (#12610) Replace `import * as ReactI18next` with named import to enable tree-shaking of unused react-i18next exports. Fixes #12600 Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Fix Coverage Suite i18n test regression (#12636) Restore the react-i18next init guard so partial test mocks can load i18n without exporting initReactI18next. This reverts the regression introduced by #12608 that caused the Coverage Suite failed-to-load suites tracked in #12627. Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Fix AI/ML Memory stat card duplicated GB unit (#12638) Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Fix contradicting status badges in top-bar and cards (#12641) * 🐛 Align page-level health pill with top-bar status The page-level health pill now considers agent status and stream failures instead of always showing 'All systems healthy' when no clusters report issues. When the local agent is degraded (e.g., MCP streams returning 500 errors) and no clusters are connected, the dashboard health indicator now shows a warning status matching the top-bar. Fixes #12622 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <copilot@github.com> * 🐛 Fix contradicting status badges in top-bar and cards - Fix top-bar showing Degraded while page shows All systems healthy - Fix cards showing Live and Refresh failed badges simultaneously Fixes #12622 Fixes #12623 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <copilot@github.com> --------- Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Add demo data for AI/ML CPU and Memory utilization cards (#12644) Fixes #12635 Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Add realistic variation to Cluster Metrics demo data (#12647) Fixes #12634 Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Fix Execution Histogram card (#12657) * 🐛 Fix Execution Histogram card rapid oscillation Remove redundant sortBy dependency from useEffect in useResultHistogram. The sortBy parameter is already captured in the fetchHistogram useCallback dependencies, so including it again in the effect dependencies caused double-triggering when sortBy changed, leading to rapid interval clearing/setting and visual oscillation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <copilot@github.com> * ✨ Add Execution Histogram card (quantum_histogram) Refactor the quantum histogram card to use the cache layer, stable loading states, and translated UI copy. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <copilot@github.com> * 🐛 Fix TS2352 type cast in useResultHistogram Cast through unknown to satisfy TypeScript's overlap check. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <copilot@github.com> * 🐛 Fix Execution Histogram card Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <copilot@github.com> --------- Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Fix Cluster Metrics CPU chart flat line in demo mode (#12648) Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Guard against uninitialized messages array in Mission UI (#12666) Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Allow AI cluster creation flow to proceed with missing tools (#12674) * 🐛 Allow AI cluster creation flow to proceed with missing tools Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <copilot@github.com> * 🐛 Fix PreflightError type narrowing in useMissions Add non-null assertions for toolResult.error inside setMissions callbacks where TypeScript cannot narrow the type through the closure boundary, even though the outer if-guard ensures it is defined. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <copilot@github.com> --------- Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Clean up 1 screenshot(s) older than 7 days * fix: resolve consistency-test regressions (#12728) * 🐛 Fix consistency-test violations Fix static analysis violations detected by nightly consistency-test suite. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <copilot@github.com> * fix: resolve consistency-test regressions (#12727) Fix violations found by nightly consistency-test run on 2026-05-08. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <copilot@github.com> * 🐛 Fix malformed array-safety guard syntax Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Fix Mission Control action crash with null safety guards (#12756) * 🐛 Fix Playwright cross-browser nightly failures Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <copilot@github.com> * 🐛 Fix Mission Control action crash with null safety guards Keep MissionControlDialog hook order stable by declaring the launch callback before the closed-state early return, preventing React error #310 when opening the dialog from the AI Missions surface. Add a regression test that rerenders the dialog from closed to open to catch this crash path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <copilot@github.com> --------- Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Differentiate AI missions button style from alerts button (#12782) Keep the floating AI missions toggle focused on mission state so it always opens the sidebar and uses a dedicated mission attention badge instead of alert-driven alert behavior. Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Restore AI missions button in Navbar (#12783) Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Add try/catch safety wrapper for localStorage access in useDashboardReset (#12787) Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Fix 4 test failures in FeatureRequestModal and useDashboardReset (#12796) Fix test failures introduced by PR #12792. Updated tests to align with current component behavior. Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Fix global filter panel overlapping dashboard stats content (#12785) * 🐛 Fix global filter panel overlapping dashboard stats content Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <copilot@github.com> * 🐛 Fix filter panel layout offset not applying in CI Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Move filter panel offset inside scroll container The previous approach applied the offset as marginTop on <main>, but since <main> has overflow-y-auto it creates its own scroll context — margin changes the container size, not the viewport position of content inside. Move the offset to a spacer div INSIDE <main> so the content actually shifts down. Also remove the screenshot assertion (position check is the real validation) and delete the stale baseline. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <copilot@github.com> * 🐛 Fix hex color ratchet false positive from issue number in comment Change (#12767) to (issue 12767) in comment to avoid the UI/UX Standards ratchet test counting the issue number as a raw hex color. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <copilot@github.com> --------- Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Fix ClusterFilterPanel tests failing on ResizeObserver redefinition (#12803) Remove vi.stubGlobal('ResizeObserver', ...) from beforeEach — the global test setup (src/test/setup.ts) already defines a ResizeObserver mock with writable:true. Calling vi.stubGlobal on every test run triggers 'Cannot redefine property' because the property is not configurable. Fixes #12802 Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Fix AI Missions toggle button visibility on desktop (#12820) Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🐛 Fix Mission Browser mobile density and import feedback (#12814) Signed-off-by: Copilot <copilot@github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * stellar Signed-off-by: xonas1101 <aarushsingh1305@gmail.com> * moving ahead Signed-off-by: xonas1101 <aarushsingh1305@gmail.com> * Finalizing Signed-off-by: xonas1101 <aarushsingh1305@gmail.com> * Progress Signed-off-by: xonas1101 <aarushsingh1305@gmail.com> * Real progress now Signed-off-by: xonas1101 <aarushsingh1305@gmail.com> * finalizing some things Signed-off-by: xonas1101 <aarushsingh1305@gmail.com> * finalizing some more things Signed-off-by: xonas1101 <aarushsingh1305@gmail.com> * Ready to pawn off to hive Signed-off-by: xonas1101 <aarushsingh1305@gmail.com> * 🐛 Fix AI provider selector overflow in missions sidebar Let the sidebar title truncate before the header controls so the AI provider selector stays fully visible instead of being clipped on the right edge. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: kubestellar-hive <hive-bot@kubestellar.io> --------- Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Signed-off-by: Andrew Anderson <andy@clubanderson.com> Signed-off-by: Andy Anderson <clubanderson@users.noreply.github.com> Signed-off-by: Auto-QA Bot <auto-qa@example.com> Signed-off-by: Copilot <copilot@github.com> Signed-off-by: Andy Anderson <andy@clubanderson.com> Signed-off-by: Kevin Roche <kproche@us.ibm.com> Signed-off-by: xonas1101 <aarushsingh1305@gmail.com> Signed-off-by: kubestellar-hive <hive-bot@kubestellar.io> Co-authored-by: kubestellar-hive[bot] <280983584+kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Andy Anderson <andy@clubanderson.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Andy Anderson <clubanderson@users.noreply.github.com> Co-authored-by: Auto-QA Bot <auto-qa@example.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Kevin Roche <kproche@us.ibm.com> Co-authored-by: xonas1101 <aarushsingh1305@gmail.com> Co-authored-by: kubestellar-hive <hive-bot@kubestellar.io>
Fixes #12411
Fixes #12414
Summary
Fixed two critical issues in the Events Timeline card that were preventing users from seeing accurate event data.
Changes
Issue #12411: Summary cards showing 0 counts
Problem: The summary cards (Warnings, Normal, Peak) were showing 0 even when events were present because the counts were calculated from time-bucketed data, which only included events within the selected time window (15m/1h/6h/24h). Events older than the window weren't counted.
Fix: Changed the calculation to aggregate from all filtered events instead of just the time-bucketed data:
totalWarningsnow counts all Warning events fromfilteredEventstotalNormalnow counts all Normal events fromfilteredEventsIssue #12414: Events showing in wrong order
Problem: Events were not consistently sorted, causing old events (from 13 days ago) to appear when recent events should be shown.
Fix: Added explicit sorting by timestamp (descending) in the
filteredEventsmemo:lastSeenorfirstSeentimestamp in descending order (newest first)Testing