feat(app): compact runs filter and sort toolbar

Replace the full-width runs dropdowns and status chips with web-shaped
controls: a Material filter popup with checked statuses and triggers, a
sort menu, and removable applied-filter chips; Cupertino gets a compact
Filter/Sort row plus one action sheet with live check marks. Add
RunsController.activeFilterCount and clearFilters(), and use the shared
seven-state run vocabulary. Clarify the singular active-filter tooltip.
This commit is contained in:
2026-10-22 14:20:05 +01:00
parent dc0a52380b
commit 535dee0805
6 changed files with 440 additions and 82 deletions
@@ -30,6 +30,14 @@ class RunsController extends ChangeNotifier {
num? get selectedRunId => _selectedId;
/// The number of narrowing facets, one per status set, pipeline, time range
/// and trigger choice. Mirrors the browser's `runFiltersActiveCount`.
int get activeFilterCount =>
(statuses.isNotEmpty ? 1 : 0) +
(pipelineId != null ? 1 : 0) +
(timeRange != 'any_time' && timeRange.isNotEmpty ? 1 : 0) +
(scheduled == 'scheduled' || scheduled == 'unscheduled' ? 1 : 0);
void listen(Stream<JsonMap> frames) {
_subscription?.cancel();
_subscription = frames
@@ -174,6 +182,15 @@ class RunsController extends ChangeNotifier {
notifyListeners();
}
/// Returns every filter to its default, like the browser's `Clear filters`.
void clearFilters() {
statuses.clear();
pipelineId = null;
timeRange = 'any_time';
scheduled = 'any';
notifyListeners();
}
void _event(JsonMap frame) {
final folded = foldRunEvent(runs, frame);
runs = folded.runs;