run dart format over the scorpion-fix files
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -23,10 +23,15 @@ import 'package:flutter/widgets.dart';
|
||||
|
||||
/// D-6 contract (T-391): a failed command returns an ERROR envelope (non-zero
|
||||
/// CLI exit), never `ok` with an `error` field a script can't detect.
|
||||
IpcResponse _userErr(String msg, {String? hint}) =>
|
||||
IpcResponse.err(id: '', error: IpcError(code: IpcExitCode.userError, kind: IpcErrorKind.userError, message: msg, hint: hint));
|
||||
IpcResponse _userErr(String msg, {String? hint}) => IpcResponse.err(
|
||||
id: '',
|
||||
error: IpcError(code: IpcExitCode.userError, kind: IpcErrorKind.userError, message: msg, hint: hint),
|
||||
);
|
||||
|
||||
IpcResponse _notFound(String msg) => IpcResponse.err(id: '', error: IpcError(code: IpcExitCode.notFound, kind: IpcErrorKind.notFound, message: msg));
|
||||
IpcResponse _notFound(String msg) => IpcResponse.err(
|
||||
id: '',
|
||||
error: IpcError(code: IpcExitCode.notFound, kind: IpcErrorKind.notFound, message: msg),
|
||||
);
|
||||
|
||||
class ClaudeExtension extends ClideExtension {
|
||||
@override
|
||||
|
||||
@@ -321,13 +321,23 @@ void main() {
|
||||
group('lifecycle hardening (T-377)', () {
|
||||
test('a throw mid-contribution unwinds everything already mounted', () async {
|
||||
// The tab mounts first, then the duplicate command id throws.
|
||||
f.services.commands.register(CommandContribution(id: 'taken', command: 'taken.cmd', run: (_) async => IpcResponse.ok(id: '')));
|
||||
f.services.commands.register(
|
||||
CommandContribution(
|
||||
id: 'taken',
|
||||
command: 'taken.cmd',
|
||||
run: (_) async => IpcResponse.ok(id: ''),
|
||||
),
|
||||
);
|
||||
f.services.extensions.register(
|
||||
_Ext(
|
||||
id: 'half-mounts',
|
||||
contributions: [
|
||||
TabContribution(id: 'half.view', slot: Slots.workspace, title: 'T', build: (_) => const SizedBox.shrink()),
|
||||
CommandContribution(id: 'half.cmd', command: 'taken.cmd', run: (_) async => IpcResponse.ok(id: '')),
|
||||
CommandContribution(
|
||||
id: 'half.cmd',
|
||||
command: 'taken.cmd',
|
||||
run: (_) async => IpcResponse.ok(id: ''),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user