From e8c5eb664a1a0d104186e81d3e25b9590f389ca5 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 28 Apr 2026 10:55:40 +0000 Subject: [PATCH 1/2] docs(flaky-tests): document monitor preview panel status filter Adds a Preview Panel section to both the failure count and failure rate monitor pages describing the new multi-select status filter dropdown (Healthy / Flaky / Broken), truncation handling on the failure count panel, and the collapsed-Current default on the failure rate panel. Source: trunk-io/trunk2#3732 Co-Authored-By: Claude Opus 4.6 --- .../detection/failure-count-monitor.md | 20 +++++++++++++++++++ flaky-tests/detection/failure-rate-monitor.md | 19 ++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/flaky-tests/detection/failure-count-monitor.md b/flaky-tests/detection/failure-count-monitor.md index a5dbbbe6..abecc1c2 100644 --- a/flaky-tests/detection/failure-count-monitor.md +++ b/flaky-tests/detection/failure-count-monitor.md @@ -98,6 +98,26 @@ This time-based approach means you don't need to wait for enough passing runs to You can temporarily mute a failure count monitor for a specific test case. See [Muting monitors](README.md#muting-monitors) for details. +## Preview Panel + +When creating or editing a failure count monitor, a preview panel shows which tests the current configuration would flag based on recent data. + +### Status Filter + +A **status filter dropdown** in the preview panel lets you filter the test list to any combination of statuses: **Healthy**, **Flaky**, and **Broken**. By default, all statuses are shown. + +Filtering to **Healthy** is the most useful view: it shows tests that are currently healthy but would be flagged by this monitor if created with the current settings. This lets you see the new coverage the monitor adds without noise from tests already detected by other monitors. + +Selecting multiple statuses (for example, Healthy and Flaky) shows tests matching any of the selected statuses. + +When a status filter is active, the info tooltip in the panel header shows "X of Y tests" to indicate how many tests are visible relative to the total that match the monitor configuration. + +If no tests match the active filter, the empty state includes a hint to clear the filter. + +### Large Repo Truncation + +For repositories with a large number of matching tests, preview results may be truncated. When this happens, an amber warning appears in the panel. The truncation applies to the list of tests shown, not to the underlying detection logic — the monitor evaluates all matching tests when active. + ## Choosing Between Monitors | Scenario | Recommended monitor | diff --git a/flaky-tests/detection/failure-rate-monitor.md b/flaky-tests/detection/failure-rate-monitor.md index 9042e482..5d5a7c9d 100644 --- a/flaky-tests/detection/failure-rate-monitor.md +++ b/flaky-tests/detection/failure-rate-monitor.md @@ -163,6 +163,25 @@ Show the branch pattern input with a few patterns entered (e.g., `main` and `release/*`), ideally showing the tag/chip-style UI for each pattern. --> +## Preview Panel + +When creating or editing a failure rate monitor, a preview panel shows which tests the current configuration would flag based on recent data. The panel is split into two sections: **Current** and **Proposed**. + +- **Current** shows tests flagged by the existing configuration (if editing an existing monitor). +- **Proposed** shows tests that would be flagged with the settings currently entered in the form. + +The Current section is collapsed by default so the Proposed view is immediately visible when you open the form. + +### Status Filter + +A **status filter dropdown** in the preview panel lets you filter the test list to any combination of statuses: **Healthy**, **Flaky**, and **Broken**. By default, all statuses are shown. + +Filtering to **Healthy** shows tests that are currently healthy but would be flagged by this monitor — the new coverage it adds beyond tests already detected. Filtering to other statuses, or combining them, adjusts the visible list without affecting the underlying detection counts. + +When a filter is active, the info tooltip shows "X of Y tests" to indicate how many tests are visible relative to the total matching the configuration. If no tests match the active filter, the empty state includes a hint to clear the filter. + +The status filter applies to the **Proposed** section. The not-in-window count in the Current section reflects the full unfiltered result set and is not affected by the filter. + ## Resolution Behavior A flagged test resolves in one of two ways: From 9fbb0aaa7cd111adf50a590c929a9274f60a25e2 Mon Sep 17 00:00:00 2001 From: Sam Gutentag <1404219+samgutentag@users.noreply.github.com> Date: Wed, 6 May 2026 11:13:46 -0700 Subject: [PATCH 2/2] Update flaky-tests/detection/failure-rate-monitor.md Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> --- flaky-tests/detection/failure-rate-monitor.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flaky-tests/detection/failure-rate-monitor.md b/flaky-tests/detection/failure-rate-monitor.md index 5d5a7c9d..2abac7f3 100644 --- a/flaky-tests/detection/failure-rate-monitor.md +++ b/flaky-tests/detection/failure-rate-monitor.md @@ -170,7 +170,7 @@ When creating or editing a failure rate monitor, a preview panel shows which tes - **Current** shows tests flagged by the existing configuration (if editing an existing monitor). - **Proposed** shows tests that would be flagged with the settings currently entered in the form. -The Current section is collapsed by default so the Proposed view is immediately visible when you open the form. +The Current section is collapsed by default, so the Proposed view is immediately visible when you open the form. ### Status Filter