jpmschweitzer and Claude Opus 4.8
6d0ebab721
chore: adopt Dart 3.9 toolchain — honest floor + tall-style reformat (T-353)
...
Raise the declared minimums in pubspec.yaml to what our deps already
require: Flutter >=3.35.0 / Dart >=3.9.0 (was 3.19.0 / 3.5.0). alchemist
0.12 needs Flutter 3.32; Dart 3.9 first ships in Flutter 3.35, so 3.35 is
the binding floor. Pin the exact build toolchain in .fvmrc (Flutter
3.44.1).
Moving to the Dart 3.9 language level switches `dart format` to the new
"tall" style and enables two new lints. This commit is the resulting
mechanical churn, isolated from any behaviour change:
- whole-tree `dart format` reformat (tall style)
- `dart fix` for unnecessary_underscores + use_null_aware_elements
No runtime behaviour change; `make test` green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-11 12:11:53 +02:00
jpmschweitzer and Claude
6008b4914c
test sweep: cover utils/ + core/mouse/ (T-91)
...
Adds two test files closing the last two pure-Dart sub-areas in
`lib/src/terminal/src/`:
`test/terminal/utils/utils_test.dart` — 51 tests covering:
- Ascii.isNonPrintable (control chars + DEL).
- hashValues (every optional arg slot, 2..20 inclusive) +
hashList (including the documented zero-on-empty short-circuit).
- ByteConsumer (single-block + cross-block consume, peek's
consume-rollback path, rollback within block + across consumed
blocks, rollbackTo, unrefConsumedBlocks, reset).
- IndexAwareCircularBuffer (push/trim, pushAll, pop, [] / []=,
clear, forEach, remove with count clamp / no-op, insert in the
middle / at end / at full ring, insertAll, trimStart, replaceWith
with truncate-from-head, swap, maxLength setter incl. error +
no-op cases, debugDump, IndexedItem mixin attach/detach/index).
- UnicodeV11.wcwidth (control chars, printable ASCII, DEL+C1,
combining marks BMP+high-plane, wide chars BMP+high-plane,
unmapped high-plane default, version field).
- The push wrap branch where _startIndex resets to 0 after a full
revolution (last circular_buffer line).
`test/terminal/mouse/mouse_test.dart` — 21 tests covering:
- TerminalMouseButton ids + isWheel for the 7 enum values.
- MouseReporter for all four MouseReportMode shapes (normal with
>223 null-byte clamp, utf with the 2015-limit clamp, sgr's M/m
pair, urxvt's button+32 / 3-on-up encoding).
- TerminalMouseEvent constructor.
- CascadeMouseHandler first-non-null semantics.
- ClickMouseHandler — only fires on clickOnly + down + button id
< 3; null otherwise. UpDownMouseHandler — fires on every
upDownScroll* mode; drops wheel-up; passes wheel-down. Default
defaultMouseHandler routes through both.
Coverage delta:
- utils/ascii.dart: 0/2 → 2/2.
- utils/byte_consumer.dart: 28/42 → 42/42.
- utils/circular_buffer.dart: 71/130 → 130/130.
- utils/hash_values.dart: 16/36 → 36/36.
- utils/unicode_v11.dart: 16/27 → 27/27.
- core/mouse/handler.dart: 3/34 → 34/34.
- core/mouse/reporter.dart: 0/17 → 17/17.
- (utils/char_code.dart, utils/lookup_table.dart already at 100%
from earlier reflow + parser work; mouse/button.dart,
mouse/button_state.dart, mouse/mode.dart are pure enums with no
executable lines.)
- Total project: 54.62% → 56.40%; coverage_floor bumped 54 → 56.
Two pre-existing `// ignore_for_file: constant_identifier_names`
suppressions that lacked documented reasons get inline
justifications:
- `lib/src/terminal/src/utils/ascii.dart` — RFC 20 / ISO 646
control-character names; lowerCamelCase would diverge from every
spec/man-page reference.
- `lib/src/terminal/src/utils/unicode_v11.dart` — Unicode 11
wcwidth tables vendored as-is; future re-vendoring stays a
verbatim paste.
Both fall under the same "FFI / spec-shaped names" pattern as the
libc.dart suppression (D-66 era).
Co-Authored-By: Claude <noreply@anthropic.com >
2026-05-07 08:13:07 +02:00