feat: variant-aware code pane in the code block's own style - #20
Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f5d3f0e. Configure here.
rahulbisht25
approved these changes
Aug 23, 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
Reworks the playground's code panel so it reads like the package instead of like VS Code, and keeps its snippet in step with the stage:
FlowSyntaxHighlighterover the theme'sFlowSyntaxColorsand Geist Monocoderole, directly on the panel's ground with no card chrome. Thesyntax_highlightdependency, its bundled grammars, and the startup init are gone.snippetFortakes the stage's active variant and every demo now ships per-variant code: composer streaming, message roles, each code block language, all four markdown variants, error card/minimal/failed turn, pill forms, attachments, thread default/streaming/short, and the on/off pairs for the streaming, shimmer, thinking, suggestions and greeting demos.The highlighter is not part of the public barrel, so the panel reaches into
package:flow_ui/src/for it with a commented, lint-acknowledged import. The playground absorbs that coupling instead of the package growing panel-only API.Screenshots
How this was verified
flutter analyzeclean inplayground/and the package root,dart formatapplied, and a fullflutter build webcompile. Exercised the panel in the running playground: variant pills swap the snippet, drag resize with clamping and double-tap reset, copy confirmation, and both themes.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
Playground-only UI and demo snippet changes; no package public API or runtime product paths.
Overview
Reworks the playground code panel so snippets look like
FlowCodeBlockand stay in step with the stage.Drops
syntax_highlight(and its async grammar init) in favor of the package’s built-inFlowSyntaxHighlighterover theme syntax colors and the code typeface. The panel reaches intoflow_ui/srcfor that highlighter rather than expanding public API.snippetFornow takes the active variant; demos ship per-pill snippets (composer streaming, message roles, code languages, markdown/error/pill/thread forms, and on/off pairs). The pane is drag-resizable (400–720px, double-tap reset), with copy/close as matching header chips.Reviewed by Cursor Bugbot for commit d856db3. Bugbot is set up for automated code reviews on this repo. Configure here.