feat: pill for enabled tools in the composer - #15
Merged
Merged
Conversation
rahulbisht25
approved these changes
Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Roadmap row 24 (new). Adds
FlowPill, the removable pill for an enabled tool or mode in the composer's action row: an 18px host-passed icon, the tool's name, and a 14px X that reports removal throughonRemove. Presence is the state: the host renders a pill while its tool is on, and turning it off is the host's move. On iOS and Android the label drops away to the design's icon-only form;showLabelforces either.Also in this PR: a Pill playground stage with four variants (default, icon only, no remove, in composer), Research and Web Search pills wired live into the Full Chat demo's add menu, a docs page, and the usual bookkeeping (README table, CHANGELOG, roadmap rows). Purely additive, no breaking changes.
Notes for review:
surfaceContainerLow(the design's exact 4% wash). The hairline isoutlineVariantat 6% against the design's 4%: the token's doc comment names "a chip at rest" as its role, and the difference is invisible at 1px over the fill.Row, so it cannot measure its pane.labelis required even when not painted; it is always the pill's accessible name.removeTooltipdoubles as the X's tooltip and accessible name, the circle button's idiom.onRemoveis a static token in full ink, not disabled;enabled: falseis the explicit disabled state. This deliberately diverges fromFlowSuggestion, where a null tap reads disabled.Screenshots
How this was verified
Rendered the built playground (
flutter build web) through headless Chrome against the embed URLs: all four Pill stage variants in light, plus the default variant in dark. Pills match the Figma comps (210:737, 223:776, and the composer contexts): metrics, ink levels, the compact form's tighter gap, the disabled fade, and the pill sitting flush in the composer's 32px action row next to the add menu. Interactive behavior (hover washes, X removal, menu toggling in Full Chat) still deserves a hands-on pass.flutter analyzeclean in the package root,example/, andplayground/;dart format .applied; docs site builds with the new page.Checklist
flutter analyze libandflutter analyzeinexample/andplayground/are cleandart format .applieddependencies:inpubspec.yaml(Flutter SDK and flutter.dev packages only)lib/flow_ui.dartand documented indocs/and the README tableCHANGELOG.mdupdated for user-facing changes, with breaking changes called outfeat:,fix:,refactor:,docs:,chore:)Note
Low Risk
Purely additive UI widget and docs; no changes to existing APIs, auth, or data handling.
Overview
Adds
FlowPill, a host-driven token for an enabled tool or mode inFlowComposer.leadingActions. Presence is the state: the host renders a pill while the tool is on;onRemoveonly reports the X, and turning the tool off stays with the host.The labeled form shows icon + name; on iOS/Android the label auto-drops (theme platform, overridable via
showLabel). A missingonRemoveis a static token, not disabled —enabled: falseis explicit. OptionalonTapon the body, host-localized tooltips, and RTL-aware remove hit targets.Playground stage (default / icon-only / static / in composer) plus live Research and Web Search pills in Full Chat. Docs, README, changelog, and roadmap row 24.
Reviewed by Cursor Bugbot for commit c23042c. Bugbot is set up for automated code reviews on this repo. Configure here.