From 435200fad016f09c4b32cdadb5ade23ec95adc28 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 26 Jun 2026 13:09:33 +0000 Subject: [PATCH] docs(flaky-tests): changelog for flagged badge appearing immediately after manual flag Adds changelog entry for the bug fix shipped in trunk2 v208 (trunk-io/trunk2#4355). Co-Authored-By: Claude --- ...ts-flagged-badge-now-appears-immediately.mdx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 changelog/2026-06-25-flaky-tests-flagged-badge-now-appears-immediately.mdx diff --git a/changelog/2026-06-25-flaky-tests-flagged-badge-now-appears-immediately.mdx b/changelog/2026-06-25-flaky-tests-flagged-badge-now-appears-immediately.mdx new file mode 100644 index 0000000..bd8b704 --- /dev/null +++ b/changelog/2026-06-25-flaky-tests-flagged-badge-now-appears-immediately.mdx @@ -0,0 +1,17 @@ +--- +title: "Flaky Tests: Flagged Badge Now Appears Immediately After Manual Flag" +description: "The 'Flagged flaky' badge now shows up right away when you manually flag a test, without needing a page refresh." +date: 2026-06-25 +category: Flaky Tests +type: fix +--- + +**The "Flagged flaky" badge now appears immediately after you flag a test manually.** + +Previously, clicking **Flag as Flaky** would update the test's status in the backend, but the amber "Flagged flaky" badge on the test detail page could fail to render until you refreshed the page. This happened because the mutation only updated one Apollo cache entry, leaving the badge and metadata card reading stale data. A post-mutation refetch could also overwrite the optimistic update if it resolved before ClickHouse had caught up. + +The fix updates every relevant query cache (button state, badge, and metadata card) atomically on mutation success, and removes the post-mutation refetch that could race against the optimistic update. + +If you were working around this bug by refreshing after flagging, you no longer need to. The badge appears as soon as the flag mutation completes. + +Co-Authored-By: Claude