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>
113 lines
3.5 KiB
Dart
113 lines
3.5 KiB
Dart
import 'package:alchemist/alchemist.dart';
|
|
import 'package:clide/widgets/widgets.dart';
|
|
import 'package:flutter/widgets.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
import '../helpers/kernel_fixture.dart';
|
|
import '../helpers/widget_harness.dart';
|
|
|
|
void main() {
|
|
late KernelFixture f;
|
|
|
|
setUp(() async => f = await KernelFixture.create());
|
|
tearDown(() async => f.dispose());
|
|
|
|
// A stand-in inner item card: content + its own per-item status mark (the
|
|
// collapser carries the aggregate; items keep their own — T-305).
|
|
Widget item(String label, ClideRunStatus status) => Padding(
|
|
padding: const EdgeInsets.only(bottom: 10),
|
|
child: DecoratedBox(
|
|
decoration: BoxDecoration(
|
|
border: Border.all(color: const Color(0xFF393E48)),
|
|
borderRadius: BorderRadius.circular(3),
|
|
),
|
|
child: Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 8),
|
|
child: Row(
|
|
children: [
|
|
Expanded(
|
|
child: Text(
|
|
label,
|
|
style: const TextStyle(fontSize: 11, color: Color(0xFF6A7280)),
|
|
textDirection: TextDirection.ltr,
|
|
),
|
|
),
|
|
ClideStatusIndicator(status: status, size: 12),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
|
|
goldenTest(
|
|
'ClideCollapserCard (T-305): collapsed color variants + expanded inner canvas',
|
|
fileName: 'collapser_card',
|
|
builder: () => GoldenTestGroup(
|
|
columns: 1,
|
|
children: [
|
|
GoldenTestScenario(
|
|
name: 'collapsed — default (muted)',
|
|
child: _wrap(
|
|
f,
|
|
const ClideCollapserCard(
|
|
label: 'Activity',
|
|
collapsedSummary: 'Read conversation_view.dart',
|
|
counter: '3 steps',
|
|
status: ClideRunStatus.success,
|
|
children: [SizedBox.shrink()],
|
|
),
|
|
),
|
|
),
|
|
GoldenTestScenario(
|
|
name: 'collapsed — edits (teal color)',
|
|
child: _wrap(
|
|
f,
|
|
const ClideCollapserCard(
|
|
label: 'Edits',
|
|
color: Color(0xFF00AB9A),
|
|
collapsedSummary: 'clide_markdown.dart',
|
|
counter: '7 edits',
|
|
status: ClideRunStatus.success,
|
|
children: [SizedBox.shrink()],
|
|
),
|
|
),
|
|
),
|
|
GoldenTestScenario(
|
|
name: 'collapsed — error (red color)',
|
|
child: _wrap(
|
|
f,
|
|
const ClideCollapserCard(
|
|
label: 'Bash',
|
|
color: Color(0xFFF06C6F),
|
|
collapsedSummary: 'npm test',
|
|
counter: '1 step',
|
|
status: ClideRunStatus.error,
|
|
children: [SizedBox.shrink()],
|
|
),
|
|
),
|
|
),
|
|
GoldenTestScenario(
|
|
name: 'expanded — inner canvas of item cards',
|
|
child: _wrap(
|
|
f,
|
|
ClideCollapserCard(
|
|
label: 'Edits',
|
|
color: const Color(0xFF00AB9A),
|
|
counter: '3 edits',
|
|
status: ClideRunStatus.success,
|
|
initiallyExpanded: true,
|
|
children: [
|
|
item('clide_markdown.dart · _urlLinkSpan', ClideRunStatus.success),
|
|
item('clide_markdown.dart · _isHttpUrl', ClideRunStatus.success),
|
|
item('clide_markdown.dart · build()', ClideRunStatus.success),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget _wrap(KernelFixture f, Widget child) => SizedBox(width: 380, child: harness(f, child));
|