Skip to content

feat(band): support Dart and Flutter in tests and reuse columns - #1530

Open
flipcyde101 wants to merge 1 commit into
DietrichGebert:mainfrom
flipcyde101:feat/band-dart-flutter-support
Open

flipcyde101 wants to merge 1 commit into
DietrichGebert:mainfrom
flipcyde101:feat/band-dart-flutter-support

Conversation

@flipcyde101

@flipcyde101 flipcyde101 commented Nov 21, 2026 •

Copy link
Copy Markdown

Closes #1529.

Summary

Adds Dart and Flutter support to the band's Tests and Reuse columns (and mirrors .dart declarations in ponytail-map.js):

  • Test command & count parsing (hooks/band/metrics.ts):
    • Recognizes dart test, dart run test, and flutter test in TEST_CMD.
    • Parses package:test summary lines in testCounts (+N: All tests passed!, +N -M: Some tests failed., +N ~K: All tests passed!, and -M: Some tests failed.), taking the last match so streaming/compact reporter progress updates resolve cleanly.
  • Dart definition extraction & generated-file skipping (hooks/band/metrics.ts, hooks/ponytail-map.js):
    • Extracts Dart 3 classes/modifiers, mixins, enums, named extensions, extension type [const], typedefs, and top-level typed/untyped functions while excluding control-flow keywords, unnamed extensions, function-typed variable declarations, and bare function/widget calls (so .trimStart() call sites in openCallers checks are not misclassified as definitions).
    • Extends GREP_DEFS with POSIX-ERE-safe top-level Dart function matching and skips generated directories plus *.g.dart / *.freezed.dart files.
  • Tests (tests/band.test.tsx, tests/map.test.js):
    • Covers Dart/Flutter test command detection, pass/skip/fail/multi-line summary parsing, Dart definition extraction and reuse tracking, generated/test file skipping, and bare call-site negative controls alongside existing language controls.

(The side note in #1529 regarding claude-fable-5-2 pricing is left out of scope.)

Verification

Tested on Windows 11 (Node.js v24.19.0, Bun 1.4.4):

  • bun test tests/band.test.tsx (pure board and metrics unit suites; 15 Claude Code UI harness tests skipped): 17 pass, 0 fail (114 expect() calls)
  • node --test tests/map.test.js: 1/1 pass
  • npm test --prefix pi-extension: 30/30 pass
  • node scripts/check-rule-copies.js and node scripts/check-versions.js: PASS
  • Real git grep --untracked -nE + parseDefs + defsIn + buildMap verification against a synthetic Dart repository: PASS (0 false positives on bare call sites)
  • Broader node --test tests/*.test.js: 141 pass, 2 Windows POSIX-shell skips, 1 pre-existing environment failure (tests/correctness.test.js pandas one-liner; local Python lacks pandas, identical on main)

AI assistance disclosure: Prepared and verified with AI coding and automated review tools.

Recognise dart test / dart run test / flutter test commands and parse Dart/Flutter package:test summary counts (taking the last match and handling skipped ~K and 0-passed/-M failure lines). Extract Dart top-level classes, mixins, enums, extensions, extension types, typedefs, and functions in hooks/band/metrics.ts (including GREP_DEFS) and hooks/ponytail-map.js while skipping control-flow keywords, function-typed variable declarations, unnamed extensions, and generated Dart files (*.g.dart, *.freezed.dart, generated/).

Fixes DietrichGebert#1529
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.

Band: support Dart/Flutter in the tests and reuse columns

1 participant