Skip to content

Fix group timeline refetch on group change - #1573

Open
nyxsky404 wants to merge 1 commit into
flatcar:mainfrom
nyxsky404:codex/fix-group-timeline-refetch
Open

Fix group timeline refetch on group change#1573
nyxsky404 wants to merge 1 commit into
flatcar:mainfrom
nyxsky404:codex/fix-group-timeline-refetch

Conversation

@nyxsky404

Copy link
Copy Markdown

Summary

  • Refetch version and status group timeline charts when the selected group changes but the duration stays the same.
  • Clear stale chart/table data while the next group timeline loads.
  • Ignore late async responses from the previously selected group so old data cannot overwrite newer group data.

Root Cause

The group timeline effects read props.group, group.application_id, group.id, duration.queryValue, and the chart store, but only depended on the duration object and disabled react-hooks/exhaustive-deps. When the selected group changed with the same duration, the effects did not run, so the components continued showing the previous group's timeline data. StatusCountTimeline also lacked cancellation handling, and VersionCountTimeline only guarded part of the async update path.

Testing

  • npx vitest run --silent=true src/components/Groups/GroupCharts/GroupTimelineRefetch.spec.tsx
  • npx eslint src/components/Groups/GroupCharts/VersionCountTimeline.tsx src/components/Groups/GroupCharts/StatusCountTimeline.tsx src/components/Groups/GroupCharts/GroupTimelineRefetch.spec.tsx
  • npx tsc -b --pretty false
  • npm test
  • npm run build

Screenshots

Not applicable. This is a data-fetch lifecycle fix with no intentional visual changes; the behavior is covered by regression tests.

Fixes #1572

Copilot AI lite review requested due to automatic review settings August 12, 2026 19:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@nyxsky404
nyxsky404 marked this pull request as ready for review August 12, 2026 19:39
@nyxsky404
nyxsky404 requested a review from a team as a code owner August 12, 2026 19:39
@nyxsky404
nyxsky404 requested a lite review from Copilot August 13, 2026 15:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Signed-off-by: Sumit Kumar <sumit76231@gmail.com>
@nyxsky404
nyxsky404 force-pushed the codex/fix-group-timeline-refetch branch from 427735c to c467b57 Compare August 14, 2026 21:03
@nyxsky404

Copy link
Copy Markdown
Author

@ervcz this pr is ready for review. Please let me know if any scope or test changes would help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

frontend: group timeline charts do not refetch when group changes with same duration

2 participants