Skip to content

FlutterBench leaderboard filters - #14171

Open
ericwindmill wants to merge 1 commit into
fb/3-tablefrom
fb/4-controls
Open

ericwindmill wants to merge 1 commit into
fb/3-tablefrom
fb/4-controls

Conversation

@ericwindmill

@ericwindmill ericwindmill commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Description of what this PR is changing or adding, and why:

Adds agent and model filters above the FlutterBench leaderboard.

  • components/flutterbench/bench_controls.dart: BenchControls, with labeled Agent and Model dropdowns and a "Clear filters" button that appears while a filter is set.
  • flutterbench_interactive.dart: filter state. The model list narrows to the selected agent's models, and changing the agent resets the model.
  • _flutterbench-controls.scss,

Presubmit checklist

  • If you are unwilling, or unable, to sign the CLA, even for a tiny, one-word PR, please file an issue instead of a PR.
  • If this PR is not meant to land until a future stable release, mark it as draft with an explanation.
  • This PR follows the Google Developer Documentation Style Guidelines—for example, it doesn't use i.e. or e.g., and it avoids I and we (first-person pronouns).
  • This PR uses semantic line breaks
    of 80 characters or fewer.

@ericwindmill ericwindmill mentioned this pull request Dec 4, 2026
4 tasks done

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a filtering mechanism to the interactive Flutter benchmark leaderboard, allowing users to filter results by agent and model. It adds a new BenchControls component containing dropdown filters and a clear button, integrates it into the FlutterBenchInteractive stateful component, and applies corresponding SCSS styles. Feedback on the changes suggests optimizing the filter behavior so that changing the selected agent does not unconditionally reset the selected model, but instead only clears it if the newly selected agent does not support that model.

Comment on lines +75 to +79
onAgentChanged: (agent) => setState(() {
_selectedAgent = agent;
// The selected model might not exist for the new agent.
_selectedModel = null;
}),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Unconditionally resetting _selectedModel to null whenever the agent changes can lead to a frustrating user experience. For example, if a user selects a model first (or has a model selected that is supported by multiple agents) and then changes the agent, or if they clear the agent filter to see the model across all agents, the model filter is unnecessarily cleared.

Instead, we should only clear the selected model if the newly selected agent does not support it.

          onAgentChanged: (agent) => setState(() {
            _selectedAgent = agent;
            if (agent != null && _selectedModel != null) {
              final hasModel = _allComparisons.any(
                (c) => c.agent == agent && c.model == _selectedModel,
              );
              if (!hasModel) _selectedModel = null;
            }
          }),
References
  1. Report an issue only if the change introduces or worsens it, it's of medium severity or higher, and you can state its concrete consequence. (link)

@flutter-website-bot

flutter-website-bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

Staged preview of the updated flutter.dev site (updated for commit a97ea91):

https://flutter-dev-230821--www-pr14171-fb-4-controls-tk5095rt.web.app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants