diff --git a/lib/src/cli/argv_to_request.dart b/lib/src/cli/argv_to_request.dart index 28a54f93..72d5449b 100644 --- a/lib/src/cli/argv_to_request.dart +++ b/lib/src/cli/argv_to_request.dart @@ -27,7 +27,7 @@ import 'package:clide/src/ipc/schema_v1.dart'; /// split. Match the IDs the dispatcher exposes directly. `tail` and /// `events` are handled by the IPC server itself (streaming / cursor-pull /// event reads, T-129 / T-223) rather than the dispatcher. -const Set _umbrellaCommands = {'status', 'tail', 'events', 'version', 'ping', 'capabilities', 'instance'}; +const Set _umbrellaCommands = {'status', 'tail', 'events', 'version', 'ping', 'capabilities', 'instance', 'draw'}; /// Sealed result of translating argv. Caller (the IPC server, or the /// C client wrapper in T-126) handles either branch. diff --git a/test/cli/argv_to_request_test.dart b/test/cli/argv_to_request_test.dart index d151ea2c..e653706b 100644 --- a/test/cli/argv_to_request_test.dart +++ b/test/cli/argv_to_request_test.dart @@ -101,6 +101,14 @@ void main() { expect((req.args['flags'] as Map)['since'], '5'); expect((req.args['flags'] as Map)['filter'], 'pane'); }); + + test('"draw --file card.json" reaches the draw command (T-318)', () { + // draw is single-token (no verb) — it must be an umbrella command, else + // `clide draw --file x` mis-parses as cmd "draw.--file". + final req = _expectOk(parseArgv(['draw', '--file', 'card.json'], requestId: 'd')); + expect(req.cmd, 'draw'); + expect((req.args['flags'] as Map)['file'], 'card.json'); + }); }); group('parseArgv — errors', () {