From 85a0b3424ec09df393b7d6ad8bc436b3bf9a0e2d Mon Sep 17 00:00:00 2001 From: alt-glitch Date: Mon, 25 May 2026 12:46:25 +0000 Subject: [PATCH] test(tui): regression test for /q alias resolving to queue (#31983) Adapted from @hclsys's test in PR #31985. Asserts findSlashCommand('q') resolves to the queue command, not quit. --- ui-tui/src/__tests__/slashParity.test.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ui-tui/src/__tests__/slashParity.test.ts b/ui-tui/src/__tests__/slashParity.test.ts index efd7e5f70da..0b6a6149ff4 100644 --- a/ui-tui/src/__tests__/slashParity.test.ts +++ b/ui-tui/src/__tests__/slashParity.test.ts @@ -4,7 +4,7 @@ import { fileURLToPath } from 'node:url' import { describe, expect, it } from 'vitest' -import { SLASH_COMMANDS } from '../app/slash/registry.js' +import { findSlashCommand, SLASH_COMMANDS } from '../app/slash/registry.js' type CommandRoute = 'fallback' | 'local' | 'native' @@ -110,4 +110,14 @@ describe('slash parity matrix', () => { expect(routes[name], `mutating command must not fallback: ${name}`).not.toBe('fallback') } }) + + it('/q alias resolves to queue, not quit (#31983)', () => { + // Regression for #31983: the TUI `quit` command used to carry alias `q`, + // which collided with the Python-side `/queue` alias. TUI-local commands + // dispatch before the backend, so `/q` resolved to /quit (session.die) + // instead of queueing a prompt. + const cmd = findSlashCommand('q') + expect(cmd, '/q must resolve to a command').toBeDefined() + expect(cmd!.name).toBe('queue') + }) })