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>
This commit is contained in:
@@ -32,54 +32,23 @@ void main() {
|
||||
),
|
||||
GoldenTestScenario(
|
||||
name: 'primary / enabled',
|
||||
child: _wrap(
|
||||
f,
|
||||
ClideButton(
|
||||
label: 'Commit',
|
||||
onPressed: () {},
|
||||
variant: ClideButtonVariant.primary,
|
||||
),
|
||||
),
|
||||
child: _wrap(f, ClideButton(label: 'Commit', onPressed: () {}, variant: ClideButtonVariant.primary)),
|
||||
),
|
||||
GoldenTestScenario(
|
||||
name: 'primary / disabled',
|
||||
child: _wrap(
|
||||
f,
|
||||
const ClideButton(
|
||||
label: 'Commit',
|
||||
onPressed: null,
|
||||
variant: ClideButtonVariant.primary,
|
||||
),
|
||||
),
|
||||
child: _wrap(f, const ClideButton(label: 'Commit', onPressed: null, variant: ClideButtonVariant.primary)),
|
||||
),
|
||||
GoldenTestScenario(
|
||||
name: 'subtle / enabled',
|
||||
child: _wrap(
|
||||
f,
|
||||
ClideButton(
|
||||
label: 'Open',
|
||||
onPressed: () {},
|
||||
variant: ClideButtonVariant.subtle,
|
||||
),
|
||||
),
|
||||
child: _wrap(f, ClideButton(label: 'Open', onPressed: () {}, variant: ClideButtonVariant.subtle)),
|
||||
),
|
||||
GoldenTestScenario(
|
||||
name: 'subtle / disabled',
|
||||
child: _wrap(
|
||||
f,
|
||||
const ClideButton(
|
||||
label: 'Open',
|
||||
onPressed: null,
|
||||
variant: ClideButtonVariant.subtle,
|
||||
),
|
||||
),
|
||||
child: _wrap(f, const ClideButton(label: 'Open', onPressed: null, variant: ClideButtonVariant.subtle)),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _wrap(KernelFixture f, Widget child) => SizedBox(
|
||||
width: 140,
|
||||
child: harness(f, child),
|
||||
);
|
||||
Widget _wrap(KernelFixture f, Widget child) => SizedBox(width: 140, child: harness(f, child));
|
||||
|
||||
@@ -29,14 +29,7 @@ void main() {
|
||||
])
|
||||
GoldenTestScenario(
|
||||
name: pair.$1,
|
||||
child: harness(
|
||||
f,
|
||||
SizedBox(
|
||||
width: 24,
|
||||
height: 24,
|
||||
child: ClideIcon(pair.$2, size: 24),
|
||||
),
|
||||
),
|
||||
child: harness(f, SizedBox(width: 24, height: 24, child: ClideIcon(pair.$2, size: 24))),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -15,23 +15,29 @@ void main() {
|
||||
// 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),
|
||||
],
|
||||
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',
|
||||
@@ -42,37 +48,43 @@ void main() {
|
||||
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()])),
|
||||
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()])),
|
||||
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()])),
|
||||
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',
|
||||
|
||||
@@ -64,7 +64,12 @@ void main() {
|
||||
collapsedByDefault: true,
|
||||
collapsedSummary: '/lib/main.dart',
|
||||
body: Text('/lib/main.dart', textDirection: TextDirection.ltr),
|
||||
extraSegments: [CardSegment(label: 'result', child: Text('void main() {}', textDirection: TextDirection.ltr))],
|
||||
extraSegments: [
|
||||
CardSegment(
|
||||
label: 'result',
|
||||
child: Text('void main() {}', textDirection: TextDirection.ltr),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -80,7 +85,12 @@ void main() {
|
||||
collapsible: true,
|
||||
collapsedByDefault: false,
|
||||
body: Text('/lib/main.dart', textDirection: TextDirection.ltr),
|
||||
extraSegments: [CardSegment(label: 'result', child: Text('void main() {}', textDirection: TextDirection.ltr))],
|
||||
extraSegments: [
|
||||
CardSegment(
|
||||
label: 'result',
|
||||
child: Text('void main() {}', textDirection: TextDirection.ltr),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -97,8 +107,14 @@ void main() {
|
||||
collapsedByDefault: false,
|
||||
body: Text('{ "description": "explore the codebase" }', textDirection: TextDirection.ltr),
|
||||
extraSegments: [
|
||||
CardSegment(label: 'prompt', child: Text('find all the widgets and summarise', textDirection: TextDirection.ltr)),
|
||||
CardSegment(label: 'result', child: Text('found 42 widgets', textDirection: TextDirection.ltr)),
|
||||
CardSegment(
|
||||
label: 'prompt',
|
||||
child: Text('find all the widgets and summarise', textDirection: TextDirection.ltr),
|
||||
),
|
||||
CardSegment(
|
||||
label: 'result',
|
||||
child: Text('found 42 widgets', textDirection: TextDirection.ltr),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -178,7 +194,4 @@ void main() {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _wrap(KernelFixture f, Widget child) => SizedBox(
|
||||
width: 360,
|
||||
child: harness(f, child),
|
||||
);
|
||||
Widget _wrap(KernelFixture f, Widget child) => SizedBox(width: 360, child: harness(f, child));
|
||||
|
||||
@@ -5,8 +5,5 @@ import 'package:alchemist/alchemist.dart';
|
||||
import '../helpers/golden_harness.dart';
|
||||
|
||||
Future<void> testExecutable(FutureOr<void> Function() testMain) async {
|
||||
return AlchemistConfig.runWithConfig(
|
||||
config: clideGoldenConfig(),
|
||||
run: testMain,
|
||||
);
|
||||
return AlchemistConfig.runWithConfig(config: clideGoldenConfig(), run: testMain);
|
||||
}
|
||||
|
||||
@@ -17,16 +17,26 @@ void main() {
|
||||
tearDown(() async => f.dispose());
|
||||
|
||||
Widget bashContent() => const ConversationCard(
|
||||
variant: ConversationCardVariant.bordered,
|
||||
accent: Color(0xFF4C9AFF),
|
||||
label: 'Bash',
|
||||
status: ConversationCardStatus.success,
|
||||
body: Text('npm test', style: TextStyle(fontSize: 12, color: Color(0xFF9DA5B4)), textDirection: TextDirection.ltr),
|
||||
extraSegments: [
|
||||
CardSegment(
|
||||
label: 'result', child: Text('All 42 tests passed', style: TextStyle(fontSize: 12, color: Color(0xFF9DA5B4)), textDirection: TextDirection.ltr)),
|
||||
],
|
||||
);
|
||||
variant: ConversationCardVariant.bordered,
|
||||
accent: Color(0xFF4C9AFF),
|
||||
label: 'Bash',
|
||||
status: ConversationCardStatus.success,
|
||||
body: Text(
|
||||
'npm test',
|
||||
style: TextStyle(fontSize: 12, color: Color(0xFF9DA5B4)),
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
extraSegments: [
|
||||
CardSegment(
|
||||
label: 'result',
|
||||
child: Text(
|
||||
'All 42 tests passed',
|
||||
style: TextStyle(fontSize: 12, color: Color(0xFF9DA5B4)),
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
goldenTest(
|
||||
'single tool collapser (T-305): collapsed ticker + expanded inner card',
|
||||
|
||||
Reference in New Issue
Block a user