fix(cli): make clide draw reachable as an umbrella command (T-318)

draw is single-token (no verb), so `clide draw --file x` mis-parsed as cmd
"draw.--file" — the dispatcher registered draw but the argv parser never
learned it was umbrella (unlike icon/image which use subsystem.verb). Found
driving the live install; the handler unit tests bypassed the argv path so
they missed it. Added draw to _umbrellaCommands + a parse regression test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-30 00:28:28 +02:00
co-authored by Claude Opus 4.8
parent b0cc60735c
commit 2150a85b2f
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -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', () {