Skip to content

feat(dart): add dart and flutter command filtering support - #2456

Open
vivekkartha wants to merge 4 commits into
rtk-ai:developfrom
vivekkartha:feat/flutter-dart-command-support
Open

vivekkartha wants to merge 4 commits into
rtk-ai:developfrom
vivekkartha:feat/flutter-dart-command-support

Conversation

@vivekkartha

@vivekkartha vivekkartha commented Jun 15, 2026 •

Copy link
Copy Markdown

Summary

Add TOML command filters and rewrite rules for Dart and Flutter CLI tools.

What's included

8 new TOML filters:

  • dart analyze — strip headers and info-level issues, keep error/warning and summary
  • dart test — strip loading lines, short-circuit on all-passing
  • dart pub get — strip package download lines, keep summary and warnings
  • flutter analyze — strip headers and info-level issues, keep error/warning and summary
  • flutter test — strip pub download preamble and loading lines, keep all test results
  • flutter pub get — strip package download lines, keep summary and warnings
  • dart run build_runner — strip AOT progress, keep summaries/warnings
  • flutter build — strip pub noise, tree-shaking, keep build result + Wasm notes

8 new rewrite patterns in discover/rules.rs

README — new Dart & Flutter section in command listing

Design

TOML-only approach (zero Rust code). Each filter follows existing patterns — strip_lines_matching for noise removal, match_output for success short-circuit. No changes to main.rs.

Validation

  • cargo fmt --all --check
  • cargo clippy --all-targets
  • cargo test 2237 passed, 0 failed
  • rtk verify 173/173 TOML tests pass

Conflicts fixed

Rebased onto latest develop to resolve merge conflicts (was "dirty"). Updated filter counts in src/core/toml_filter.rs (now 71 built-in) and ensured rules/README merged cleanly. Verified locally.

Related

vivekkartha and others added 4 commits June 29, 2026 02:46
Add TOML filters and rewrite rules for dart and flutter CLI tools.
Covers command outputs from dart analyze, dart test, dart pub,
flutter analyze, flutter test, and flutter pub.

Each filter strips boilerplate (downloads, loading lines, blank lines)
and short-circuits on success (no issues, all tests passed).

Validation: cargo fmt, cargo clippy, cargo test (2195 pass, 0 fail),
rtk verify (159/159 TOML tests pass).
Match dart pub get/add/upgrade/downgrade/outdated consistently across
rules.rs and dart-pub-get.toml filter.

Co-authored-by: CommandCodeBot <[email protected]>
Strip pub preamble, plugin compatibility warnings, and build-time
notices from flutter test output so only test results remain.

Co-authored-by: CommandCodeBot <[email protected]>
dart run build_runner: strip AOT compile progress and per-file
intermediate lines (~70% savings), keep builder summaries,
warnings, and Build line.

flutter build: strip pub preamble, plugin compatibility warnings,
compilation spinners, tree-shaking noise (~75% savings), keep
Wasm dry run findings, build errors, and Build line.

Both cross-platform: patterns work on macOS/Linux/Windows.

Co-authored-by: CommandCodeBot <[email protected]>
@Olyno

Olyno commented Jul 11, 2026

Copy link
Copy Markdown

@vivekkartha @felipematheus Both of your implementations look great! I'd love to suggest my own approach as well, and hopefully we can align on the best direction together.

Unfortunately, I can't open PRs directly on your repositories, so I'm sharing my take here. My main difference is that I prefer rewriting command output over purely filtering it: instead of stripping lines, I summarize them into a compact form that keeps the specific information an LLM actually needs (exit status, failure blocks, warnings, tail context, etc.). In my experience, this is more token-efficient and has been working well internally for weeks.

I've integrated your contributions and reference filters into my branch directly, keeping the best parts of each approach. Let me know if you have any feedback, I would be happy to iterate!

Have a look there: https://github.com/Olyno/rtk/tree/feat/flutter-dart-integration

felipematheus added a commit to felipematheus/rtk that referenced this pull request Jul 21, 2026
feat(dart): Dart & Flutter TOML filters (hardened from upstream PR rtk-ai#2456)
@rtk-release-bot

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale due to 90 days of inactivity. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. Your contribution is very much appreciated — we're sorry we haven't been able to review it yet.

@futamiy

futamiy commented Oct 12, 2026

Copy link
Copy Markdown

ok

@jamezilla

Copy link
Copy Markdown

Bump

@rtk-release-bot rtk-release-bot Bot removed the stale label Oct 19, 2026
@Schrolli91

Copy link
Copy Markdown

These filters are extremely useful, when will this getting merged?

@Olyno

Olyno commented Nov 17, 2026

Copy link
Copy Markdown

By the way, i didn't get any feedback about my idea/comment. What do you guys think about it?

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.

Support for Flutter & Dart commands (flutter pub, flutter analyze, dart analyze)

5 participants