-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
The time filter dropdown allows users to select pre-configured time ranges that exceed the maximum allowed duration constraint. When these pre-selected options are chosen, the application should either:
- Prevent selection and show a validation message, or
- Automatically constrain the selection to the maximum allowed duration
Current behavior:
- Pre-selected time filter options (e.g., "Last 7 days", "Last 30 days") can be selected even when they exceed the maximum duration
- No validation error is shown
- User can proceed with an invalid time range
Expected behavior:
- Time filter options that exceed maximum duration should be disabled or hidden
- If selected, show clear validation feedback
- Constrain selection to valid range automatically
Technical context
The time range validation in TracesByServiceScene.tsx (lines 108-115) clears selections that fall outside the time range:
// Clear selection if it's out of time range
if (selectionFrom && selectionFrom < timeRange.state.value.from.unix()) {
this.setState({ selection: undefined });
}However, this validation appears to run after selection, not before. The pre-selected time filter options may need validation at the point of rendering or selection.
Relevant files:
/src/components/Explore/TracesByService/TracesByServiceScene.tsx/src/utils/dates.ts(duration formatting and calculations)- Time picker component (Grafana core)
Steps to reproduce
- Open Traces Drilldown
- Access the time filter dropdown
- Note the maximum allowed duration (if displayed)
- Select a pre-configured option that exceeds this limit (e.g., "Last 30 days")
- Observe that the selection is accepted without validation
Additional context
This creates a confusing user experience where the UI allows an action that will later fail or produce unexpected results.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working