Insights: fix running-now window bug, frozen elapsed label, undisclosed run cap - #272
Merged
Conversation
…, and run-cap disclosure Covers three Insights defects: a run started before the 7-day window but still running must stay in the "Running now" strip and KPI; the elapsed label next to the live status dot must tick instead of freezing at first render; and the landing view must disclose when the 100-run fetch cap truncates the runs backing its KPIs, sparkline, and outcome chart.
… label, disclose the run-fetch cap Three fixes to the landing dashboard: - "Running now" (both the KPI tile and the strip) now reads off every fetched run rather than the range-filtered subset, since being in flight is not a windowed property — a run that started before the 7-day window and is still running no longer disappears or reads 0. - The elapsed label beside the pulsing live status dot now ticks once a second while a run is running, instead of freezing at whatever instant the strip last rendered for an unrelated reason. - The landing now discloses when the feed's fixed limit=100 fetch caps the runs backing its KPIs, sparkline, and outcome chart, matching the disclosure InsightsRunsHistory already gives on its own view.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
limit=100fetch truncates the runs backing its KPIs, sparkline, and outcome chart — matching the disclosureInsightsRunsHistoryalready gives on its own view.Known, deliberate gap (not touched here): the mock's "Recommendations" rail stays unbuilt — no backing signal exists yet (credential-expiry, skill-regression, model-fit data), so nothing was fabricated.
Fixes CL-6559.
Test plan
bun teston the insights page suites (src/pages/insights-page.test.ts,src/pages/insights-page-render.test.tsx,test/insights-page.test.tsx,src/insights-stats.test.ts,src/pages/run-status-tone-parity.test.ts) — 78 passbun run typecheckinapps/web— cleanworkflow_run/inference_turndata directly — small dataset (20 runs, 4 running) so the 100-run truncation doesn't currently reproduce there, but the fix is correct at scale