Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
581e201
chore(conductor): Add new track 'Filter jobs in Presubmit Dashboard'
ievdokdm Mar 19, 2026
7354f5c
feat(presubmit): Add filter state variables to PresubmitState
ievdokdm Mar 19, 2026
b5f6128
feat(presubmit): Add filter update methods to PresubmitState
ievdokdm Mar 19, 2026
afc5f9a
feat(presubmit): Implement filtering logic in PresubmitState
ievdokdm Mar 19, 2026
48bff29
conductor(checkpoint): Phase Complete: Phase 1: State Management
ievdokdm Mar 19, 2026
e394611
conductor(plan): Mark phase 'Phase 1: State Management' as complete
ievdokdm Mar 19, 2026
4df3f35
feat(presubmit): Create FilterDialog widget
ievdokdm Mar 19, 2026
2903a30
conductor(checkpoint): Phase Complete: Phase 2: Filter Dialog UI
ievdokdm Mar 19, 2026
db7c798
conductor(plan): Mark phase 'Phase 2: Filter Dialog UI' as complete
ievdokdm Mar 19, 2026
639fb00
feat(presubmit): Integrate job filtering into PreSubmitView
ievdokdm Mar 19, 2026
5816cfe
fix(presubmit): Update filtered count immediately on regex typing
ievdokdm Mar 19, 2026
ed01edf
feat(presubmit): Update filtered count in dialog while typing
ievdokdm Mar 19, 2026
20a8dd6
feat(presubmit): Apply regex filter immediately while typing
ievdokdm Mar 19, 2026
9bdcf6b
fix(presubmit): Add setState to regex onChanged in FilterDialog
ievdokdm Mar 19, 2026
66a95f7
feat(presubmit): Show status icons in FilterChips when selected
ievdokdm Mar 19, 2026
3712ccb
small fixes
ievdokdm Mar 19, 2026
fea74df
feat(presubmit): Auto-select top-most job on filter change
ievdokdm Mar 19, 2026
afccf42
testing
ievdokdm Mar 19, 2026
c4498d6
reformat
ievdokdm Mar 19, 2026
b499002
conductor(checkpoint): Phase Complete: Phase 3: Integration and Dashb…
ievdokdm Mar 19, 2026
4d86dee
conductor(plan): Mark phase 'Phase 3: Integration and Dashboard UI' a…
ievdokdm Mar 19, 2026
e03cad0
conductor(checkpoint): Phase Complete: Phase 4: Final Polishing and C…
ievdokdm Mar 19, 2026
8cabf10
conductor(plan): Mark phase 'Phase 4: Final Polishing and Cleanup' as…
ievdokdm Mar 19, 2026
f6e6ecc
chore(conductor): Mark track 'Filter jobs in Presubmit Dashboard' as …
ievdokdm Mar 19, 2026
bde2862
docs(conductor): Synchronize docs for track 'Filter jobs in Presubmit…
ievdokdm Mar 19, 2026
2b360be
chore(conductor): Archive track 'Filter jobs in Presubmit Dashboard'
ievdokdm Mar 20, 2026
21d857c
feat(presubmit): Finalize job filtering and fix authentication logic
ievdokdm Mar 20, 2026
c714b91
format
ievdokdm Mar 20, 2026
b32f7ac
updated goldens
ievdokdm Mar 20, 2026
2e2d5ff
fix comments
ievdokdm Mar 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions conductor/archive/presubmit_filter_20260319/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Track presubmit_filter_20260319 Context

- [Specification](./spec.md)
- [Implementation Plan](./plan.md)
- [Metadata](./metadata.json)
8 changes: 8 additions & 0 deletions conductor/archive/presubmit_filter_20260319/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"track_id": "presubmit_filter_20260319",
"type": "feature",
"status": "new",
"created_at": "2026-03-19T10:00:00Z",
"updated_at": "2026-03-19T10:00:00Z",
"description": "In 'CocoonAppBar' of Presubmit Dashboard add filter button to lust of actions that will show filer dialog and filer jobs in '_ChecksSidebar'."
}
54 changes: 54 additions & 0 deletions conductor/archive/presubmit_filter_20260319/plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Implementation Plan - Presubmit Dashboard Job Filtering

This plan outlines the steps to add job filtering to the Presubmit Dashboard in the Cocoon dashboard.

## Phase 1: State Management (PresubmitState) [checkpoint: 48bff29]
In this phase, we will extend `PresubmitState` to hold and manage the filter state.

- [x] **Task: Add filter state variables to `PresubmitState`.**
- Variables: `Set<TaskStatus> selectedStatuses`, `Set<String> selectedPlatforms`, `String? jobNameFilter`.
- Initialize with all statuses and platforms selected, and `null` or empty string for regex.
- [x] **Task: Add methods to update filter state.**
- `updateFilters({Set<TaskStatus>? statuses, Set<String>? platforms, String? jobNameFilter})`
- `clearFilters()`: Resets filters to "select all" and clear regex.
- [x] **Task: Implement filtering logic in `PresubmitState`.**
- Add a getter `filteredGuardResponse` (or similar) that returns a `PresubmitGuardResponse` with filtered stages and builds based on the active filters.
- Platforms are extracted by splitting job names by space and taking the first part.
- [x] **Task: Add unit tests for `PresubmitState` filtering logic.**
- Verify filtering by status, platform, and regex.
- Verify persistence when `update` is called with same PR but different SHA.
- [x] **Task: Conductor - User Manual Verification 'Phase 1: State Management' (Protocol in workflow.md)**

## Phase 2: Filter Dialog UI [checkpoint: 2903a30]
In this phase, we will create the filter dialog and its components.

- [x] **Task: Create `FilterDialog` widget in `dashboard/lib/widgets/filter_dialog.dart`.**
- Multi-select sections for Task Status and Platform.
- `TextField` for Job Name Regex (with `onChanged` or `onEditingComplete` depending on final behavior).
- Validation: Ensure at least one status and one platform are always selected (disable uncheck if it's the last one).
- "Clear all filters" button at the bottom.
- "Show N jobs" button displaying the filtered count.
- [x] **Task: Add unit tests for `FilterDialog`.**
- Verify initial state shows all filters.
- Verify toggling selections updates the UI and buttons.
- [x] **Task: Conductor - User Manual Verification 'Phase 2: Filter Dialog UI' (Protocol in workflow.md)**

## Phase 3: Integration and Dashboard UI [checkpoint: b499002]
In this phase, we will integrate the filter functionality into the Presubmit Dashboard.

- [x] **Task: Add Filter Button to `CocoonAppBar` in `PreSubmitView`.**
- Icon: `Icons.filter_alt_outlined` (no filters applied) or `Icons.filter_alt` (some filters applied).
- Tooltip: "Filter jobs".
- Hover highlight: "Filter jobs".
- [x] **Task: Update `PreSubmitView` to use `filteredGuardResponse` for `_ChecksSidebar`.**
- [x] **Task: Ensure filter state persists when switching guard statuses.**
- Handled by `PresubmitState` during `update` calls.
- [x] **Task: Add integration tests for filtering functionality in `PreSubmitView`.**
- Verify clicking the filter button opens the dialog.
- Verify applying filters updates the `_ChecksSidebar`.
- [x] **Task: Conductor - User Manual Verification 'Phase 3: Integration and Dashboard UI' (Protocol in workflow.md)**

## Phase 4: Final Polishing and Cleanup [checkpoint: e03cad0]
- [x] **Task: Verify overall dashboard performance with active filters.**
- [x] **Task: Ensure accessibility (ARIA labels, tooltips).**
- [x] **Task: Conductor - User Manual Verification 'Phase 4: Final Polishing and Cleanup' (Protocol in workflow.md)**
47 changes: 47 additions & 0 deletions conductor/archive/presubmit_filter_20260319/spec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Specification - Presubmit Dashboard Job Filtering (v4)

## Overview
This track aims to enhance the Presubmit Dashboard in the Cocoon dashboard by adding a filtering mechanism for CI jobs displayed in the `_ChecksSidebar`. This will allow users to quickly narrow down relevant jobs based on status, platform, and name (via regex), improving the usability and actionable visibility of build health.

## Functional Requirements
* **Filter Button in CocoonAppBar:**
- Add a filter icon button to the `CocoonAppBar` actions in the Presubmit Dashboard.
- Icon: `Icons.filter_alt_outlined` (no filters applied) or `Icons.filter_alt` (some filters applied).
- Tooltip: "Filter jobs".
* **Filter Dialog:**
- Clicking the filter button opens a dialog.
- **Status Filter:** Multi-select list of all possible task statuses (e.g., Succeeded, Failed, In Progress, Queued, Skipped, etc.).
- **Platform Filter:** Multi-select list of platform names, derived by splitting all unique job names by space and taking the first part.
- **Job Name Regex Filter:** Text input for a regular expression to match against job names.
- **Validation:** At least one task status and at least one platform must remain checked at all times.
- **Clear All Filters:** A button at the bottom to reset all filters to their default state (all selected, regex empty).
- **Show N Jobs:** A button displaying the total count of filtered jobs in the `_ChecksSidebar`.
* **Filtering Logic:**
- Filters apply immediately when a status or platform is toggled.
- Regex filter applies when the input field loses focus (onBlur).
- The `_ChecksSidebar` list of jobs updates in real-time based on the active filters.
* **Persistence & State:**
- Filter state is managed in `PresubmitState`.
- Filters should remain if the user selects a different guard status.
* **Visual Elements:**
- Filter button should be `Icons.filter_alt_outlined` if no filters are applied, and `Icons.filter_alt` if some filters are applied.
- Filter button should have text highlight "Filter jobs" on mouse over.

## Non-Functional Requirements
* **Material Design:** Follow Material Design principles for the dialog and filter button.
* **Performance:** Filtering should be efficient, even with a large number of jobs.
* **Accessibility:** Use appropriate tooltips and labels for filter controls.

## Acceptance Criteria
- [ ] Filter button in `CocoonAppBar` changes icon based on active filter state.
- [ ] Filter dialog shows all active filters correctly upon opening.
- [ ] `_ChecksSidebar` correctly displays only the jobs matching the active status, platform, and regex filters.
- [ ] "Show N jobs" button reflects the correct count of filtered jobs.
- [ ] At least one status and one platform are always selected in the dialog.
- [ ] "Clear all filters" button resets the filter state.
- [ ] Filter state persists when navigating between different guard statuses.

## Out of Scope
- [ ] Permanent persistence of filters across browser sessions (e.g., in LocalStorage).
- [ ] Complex multi-regex or boolean logic filters.
- [ ] Filtering logic on the backend; all filtering is performed client-side in the Flutter dashboard.
1 change: 1 addition & 0 deletions conductor/product.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Cocoon is the CI coordination and orchestration system for the Flutter project.
* **Tree Status Dashboard:** A Flutter-based web application that provides a visual overview of build health across various commits and branches.
* **Presubmit Check Details:** Backend APIs to retrieve detailed attempt history and status for specific presubmit checks, aiding in debugging and visibility.
* **Presubmit Guard Summaries:** Backend APIs to retrieve summaries of all presubmit checks (Presubmit Guards) of the provided pull request to the dashboard.
* **Presubmit Dashboard Filtering:** Interactive filtering for the Presubmit Dashboard, allowing users to narrow down visible jobs by status, platform, and regex. Filters persist within a session and automatically manage valid job selection for the details pane.
* **Presubmit Guard Details:** Displays detailed information and CI check statuses for a specific presubmit check (Presubmit Guard), sorted by status (prioritizing failures) and name for better visibility. Authenticated users can trigger re-runs for individual jobs or all failed jobs directly from the dashboard.
* **Merge Queue Visibility:** APIs for querying and inspecting recent GitHub Merge Queue webhook events to diagnose integration issues.
* **Auto-submit Bot:** Handles automated pull request management, including label-based merges, reverts, and validation checks.
Expand Down
40 changes: 40 additions & 0 deletions dashboard/lib/service/data_seeder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ class DataSeeder {
'Mac framework_tests',
'Linux android framework_tests',
'Windows framework_tests',
'Mac_x64 framework_misc',
'Linux_android_emu android_engine_opengles_tests',
'Linux_android_emu_vulkan_stable android_engine_vulkan_tests',
'Mac_arm64 run_debug_test_macos',
'Linux_android_emu android views',
];
var engineChecks = [
_createPresubmitCheck(
Expand Down Expand Up @@ -359,6 +364,41 @@ class DataSeeder {
attemptNumber: 2,
creationTime: creationTime2,
),
_createPresubmitCheck(
checkRunId: checkRunId,
buildName: fusionBuilds[4],
status: TaskStatus.neutral,
attemptNumber: 1,
creationTime: creationTime,
),
_createPresubmitCheck(
checkRunId: checkRunId,
buildName: fusionBuilds[5],
status: TaskStatus.neutral,
attemptNumber: 1,
creationTime: creationTime,
),
_createPresubmitCheck(
checkRunId: checkRunId,
buildName: fusionBuilds[6],
status: TaskStatus.neutral,
attemptNumber: 1,
creationTime: creationTime,
),
_createPresubmitCheck(
checkRunId: checkRunId,
buildName: fusionBuilds[7],
status: TaskStatus.neutral,
attemptNumber: 1,
creationTime: creationTime,
),
_createPresubmitCheck(
checkRunId: checkRunId,
buildName: fusionBuilds[8],
status: TaskStatus.neutral,
attemptNumber: 1,
creationTime: creationTime,
),
];
guards.add(
_createPresubmitGuard(
Expand Down
Loading
Loading