Skip to content

Jobs filtering#4992

Merged
auto-submit[bot] merged 30 commits into
mainfrom
183898-filter
Mar 23, 2026
Merged

Jobs filtering#4992
auto-submit[bot] merged 30 commits into
mainfrom
183898-filter

Conversation

@ievdokdm
Copy link
Copy Markdown
Contributor

Implemented jobs filtering

Fix: flutter/flutter#183898

ievdokdm added 27 commits March 19, 2026 13:56
Task: Add filter state variables to PresubmitState
Summary: Added selectedStatuses, selectedPlatforms, and jobNameFilter to PresubmitState for job filtering.
Files: dashboard/lib/state/presubmit.dart, dashboard/test/state/presubmit_filter_test.dart
Why: Provides the foundation for job filtering in the Presubmit Dashboard.
Task: Add methods to update filter state
Summary: Added updateFilters and clearFilters methods to PresubmitState.
Files: dashboard/lib/state/presubmit.dart, dashboard/test/state/presubmit_filter_test.dart
Why: Allows updating and resetting the filter state in Presubmit Dashboard.
Task: Implement filtering logic in PresubmitState
Summary: Implemented filteredGuardResponse getter and _updateSelectedPlatforms. Added filter reset on PR change.
Files: dashboard/lib/state/presubmit.dart, dashboard/test/state/presubmit_filter_test.dart
Why: Provides the actual filtering of job data based on status, platform, and name regex.
Task: Create FilterDialog widget in dashboard/lib/widgets/filter_dialog.dart
Summary: Created FilterDialog with status, platform, and regex filters. Added clear all and filtered count buttons.
Files: dashboard/lib/widgets/filter_dialog.dart, dashboard/test/widgets/filter_dialog_test.dart
Why: Provides the UI for users to configure job filters in the Presubmit Dashboard.
Task: Phase 3: Integration and Dashboard UI
Summary: Added filter button to CocoonAppBar and integrated filteredGuardResponse into _ChecksSidebar. Added isAnyFilterApplied getter to PresubmitState.
Files: dashboard/lib/state/presubmit.dart, dashboard/lib/views/presubmit_view.dart, dashboard/test/views/presubmit_filter_view_test.dart
Why: Completes the user-facing filtering functionality in the Presubmit Dashboard.
Task: Fix regex filter update behavior
Summary: Added onChanged to regex TextField in FilterDialog to ensure job count updates immediately as user types. Updated tests.
Files: dashboard/lib/widgets/filter_dialog.dart, dashboard/test/widgets/filter_dialog_test.dart
Why: Ensures the 'Show N jobs' button accurately reflects the current filter state in real-time.
Task: Update number of jobs in button while typing
Summary: Refactored PresubmitState to allow filtering without state updates. Updated FilterDialog to use local regex for count calculation in 'Show N jobs' button.
Files: dashboard/lib/state/presubmit.dart, dashboard/lib/widgets/filter_dialog.dart
Why: Provides real-time feedback on filter impact while respecting the requirement to apply regex to the dashboard only on focus loss or confirmation.
Task: Update count and sidebar while typing
Summary: Updated FilterDialog to apply regex filters immediately on every keystroke, which updates both the 'Show N jobs' button and the dashboard sidebar in real-time.
Files: dashboard/lib/widgets/filter_dialog.dart
Why: Provides instantaneous visual feedback across the entire view as the user types.
Task: Fix Show N jobs not updating while typing
Summary: Added setState to _onRegexChanged to explicitly trigger a rebuild of the dialog when the user types, ensuring the filteredCount is recalculated and displayed in the 'Show N jobs' button.
Files: dashboard/lib/widgets/filter_dialog.dart
Why: Ensures the dialog UI stays in sync with the applied filters during text input.
Task: Show icons when selected
Summary: Updated FilterDialog to always show the status icon in the FilterChip avatar, even when the chip is selected.
Files: dashboard/lib/widgets/filter_dialog.dart
Why: Provides consistent visual identification of task statuses in the filter dialog.
Task: Handle selection logic on filter apply
Summary: Updated PresubmitState to ensure a valid job selection remains visible after filtering. If the current selection is filtered out, the top-most visible job (based on UI sorting) is auto-selected. If no jobs remain, the selection is cleared. Updated tests to verify this behavior and fixed existing test issues.
Files: dashboard/lib/state/presubmit.dart, dashboard/test/state/presubmit_test.dart, dashboard/test/state/presubmit_filter_test.dart, dashboard/test/widgets/filter_dialog_test.dart
Why: Ensures the details pane always shows relevant data from the currently visible filtered jobs.
Task: Wrap up Presubmit Dashboard job filtering
Summary: Cleaned up PresubmitState by using authService.isAuthenticated directly, ensuring correct notification of listeners on auth change and re-run actions. Fixed re-run functionality tests in presubmit_view_test.dart by correctly handling refresh timers. Archived the track.
Files: dashboard/lib/state/presubmit.dart, dashboard/test/views/presubmit_view_test.dart, conductor/tracks/presubmit_filter_20260319/ (deleted), conductor/archive/presubmit_filter_20260319/ (added)
Why: Ensures a robust, fully tested filtering and re-run experience in the Presubmit Dashboard.
@ievdokdm ievdokdm requested a review from jtmcdole March 20, 2026 00:17
@github-actions
Copy link
Copy Markdown
Contributor

🤖 Hi @ievdokdm, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

## 📋 Review Summary

This Pull Request successfully introduces a filtering mechanism for the Presubmit Dashboard, allowing users to filter jobs by status, platform, and regular expression. The implementation is comprehensive, covering state management, UI components, and test coverage across the modified functionality.

🔍 General Feedback

  • The state management effectively encapsulates the filtering logic within PresubmitState and cleanly updates downstream views.
  • The use of multi-select FilterChips in the dialog provides a great user experience for toggling specific statuses and platforms.
  • The unit tests thoroughly validate the filtering behavior, including persistence and auto-selection of the topmost visible job.
  • Good job gracefully handling invalid regex inputs in the filtering loop to prevent crashes.

Comment thread dashboard/lib/state/presubmit.dart
Comment thread dashboard/lib/state/presubmit.dart
@ievdokdm ievdokdm added the CICD Run CI/CD label Mar 20, 2026
@ievdokdm ievdokdm added autosubmit Merge PR when tree becomes green via auto submit App. CICD Run CI/CD and removed CICD Run CI/CD labels Mar 20, 2026
Comment thread dashboard/lib/views/presubmit_view.dart Outdated
Comment thread dashboard/lib/widgets/filter_dialog.dart Outdated
@auto-submit
Copy link
Copy Markdown
Contributor

auto-submit Bot commented Mar 20, 2026

autosubmit label was removed for flutter/cocoon/4992, because This PR has not met approval requirements for merging. Changes were requested by {jtmcdole}, please make the needed changes and resubmit this PR.
The PR author is a member of flutter-hackers and needs 1 more review(s) in order to merge this PR.

  • Merge guidelines: A PR needs at least one approved review if the author is already part of flutter-hackers or two member reviews if the author is not a flutter-hacker before re-applying the autosubmit label. Reviewers: If you left a comment approving, please use the "approve" review action instead.

@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App. label Mar 20, 2026
@ievdokdm ievdokdm requested a review from jtmcdole March 20, 2026 23:16
@ievdokdm ievdokdm added the autosubmit Merge PR when tree becomes green via auto submit App. label Mar 20, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App. label Mar 20, 2026
@auto-submit
Copy link
Copy Markdown
Contributor

auto-submit Bot commented Mar 20, 2026

autosubmit label was removed for flutter/cocoon/4992, because This PR has not met approval requirements for merging. Changes were requested by {jtmcdole}, please make the needed changes and resubmit this PR.
The PR author is a member of flutter-hackers and needs 1 more review(s) in order to merge this PR.

  • Merge guidelines: A PR needs at least one approved review if the author is already part of flutter-hackers or two member reviews if the author is not a flutter-hacker before re-applying the autosubmit label. Reviewers: If you left a comment approving, please use the "approve" review action instead.

@ievdokdm ievdokdm added autosubmit Merge PR when tree becomes green via auto submit App. CICD Run CI/CD and removed CICD Run CI/CD labels Mar 21, 2026
@auto-submit
Copy link
Copy Markdown
Contributor

auto-submit Bot commented Mar 21, 2026

autosubmit label was removed for flutter/cocoon/4992, because This PR has not met approval requirements for merging. Changes were requested by {jtmcdole}, please make the needed changes and resubmit this PR.
The PR author is a member of flutter-hackers and needs 1 more review(s) in order to merge this PR.

  • Merge guidelines: A PR needs at least one approved review if the author is already part of flutter-hackers or two member reviews if the author is not a flutter-hacker before re-applying the autosubmit label. Reviewers: If you left a comment approving, please use the "approve" review action instead.

@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App. label Mar 21, 2026
@ievdokdm ievdokdm added the autosubmit Merge PR when tree becomes green via auto submit App. label Mar 23, 2026
@auto-submit auto-submit Bot merged commit fd286b0 into main Mar 23, 2026
50 checks passed
@ievdokdm ievdokdm deleted the 183898-filter branch March 24, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App. CICD Run CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Job Filtering

2 participants