diff --git a/docs/incident_detection/tests/2.ui_display_flows.md b/docs/incident_detection/tests/2.ui_display_flows.md index c4f45cb3..d6c82dd7 100644 --- a/docs/incident_detection/tests/2.ui_display_flows.md +++ b/docs/incident_detection/tests/2.ui_display_flows.md @@ -109,6 +109,26 @@ start,end,alertname,namespace,severity,silenced,labels - Check the "last updated date" field - Verify that the format changes without the need to reload the page +### 2.3.2 Incident Bar Trimming on Time Filter Change +**BUG**: When "Last N Days" is shorter than an incident's duration, the bar should be visually trimmed to show only the portion within the selected time window. +**Automation Status**: NOT AUTOMATED + +**Background**: +- Incorrect behavior: Changing time filter "squashes" the X-axis to the right while still showing the full incident bar +- Correct behavior: Incident bar is trimmed/clipped to only display the portion that falls within the selected time range + +- [ ] **Bar Trimming - Long Incident with Short Filter**: Create an incident spanning 15 days + - With "Last 15 days": Full incident bar visible with correct proportional width + - Set time filter to "Last 7 days" + - Verify the incident bar is trimmed to show only the 7-day portion (not the full 15-day bar) + - Verify the X-axis scale matches the 7-day window (not squashed to the right) + - Verify the bar starts at the left edge of the chart (since incident started before the 7-day window) + +- [ ] **Tooltip Accuracy After Trimming**: Hover over a trimmed incident bar + - Verify tooltip shows the actual absolute Start date (which may be before the visible window) + - Verify tooltip shows correct End date + - Verify the displayed duration reflects the full incident, not just the visible portion + ### 2.4 Silences labels (Not Automated) - Verify that information about silences is contained in the alert name as `NetworkLatencyHigh (silenced)` instead of the additional `silenced=true` diff --git a/docs/incident_detection/tests/3.api_calls_data_loading_flows.md b/docs/incident_detection/tests/3.api_calls_data_loading_flows.md index 1ae58d35..c2b862c0 100644 --- a/docs/incident_detection/tests/3.api_calls_data_loading_flows.md +++ b/docs/incident_detection/tests/3.api_calls_data_loading_flows.md @@ -84,8 +84,27 @@ start,end,alertname,namespace,severity,silenced,labels - Verify the latest query end time param is within the last 5 minutes - ### 3.4 Data Integrity - **NEW, NOT AUTOMATED, TODO COO 1.4** +### 3.4 15-Day Data Loading with "Last N Days" Filtering +**FEATURE**: UI always loads 15 days of data (one query_range call per day), then filters client-side based on "Last N Days" selection. +**Automation Status**: NOT AUTOMATED + +**Background**: +- Before: Data was downloaded only for "Last N Days", causing Start dates to be relative to N days +- After: Start displays an absolute date, even when "Last N Days" is shorter than the incident's actual start +- Limit: Start is capped at max 15 days (the maximum supported range) + +- [ ] **Absolute Start Date Display**: Create an incident that started 10 days ago + - Set time filter to "Last 7 days" + - Verify incident Start date shows the absolute date (10 days ago), NOT a date relative to 7 days + - Verify the incident bar in the chart is trimmed to show only the portion within the 7-day window + - Verify tooltip shows the actual absolute start time + +- [ ] **API Call Pattern Verification**: Monitor network requests on initial page load + - Verify 15 query_range calls are made on initial page load (one per day) + - Verify the time ranges cover the full 15-day window regardless of "Last N Days" selection + +### 3.5 Data Integrity +**NEW, NOT AUTOMATED, TODO COO 1.4** - [ ] Incident grouping by `group_id` works correctly - [ ] Values deduplicated across multiple time range queries - [ ] Component lists combined for same group_id