mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-08 16:39:42 +02:00
chore: version packages
Release 1.16.6: phone overview started/idle stamps, plus fixes for the selection-dialog keyboard lockout, the accessory bar arrows bypassing the local-echo overlay, and recovered sessions being restamped as newly created on every server restart. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -166,6 +166,37 @@ describe('terminal touch tap mouse guard', () => {
|
||||
expect(app._classifyMobileTerminalTap(9, 49)).toBe('content');
|
||||
});
|
||||
|
||||
it('keeps the keyboard reachable while a selection dialog is on screen', () => {
|
||||
// The lock this pins: a visible dialog used to make EVERY row of the
|
||||
// terminal "actionable" (both menu tests scanned the whole viewport), so
|
||||
// every tap blurred and the on-screen keyboard could not be opened until
|
||||
// the dialog was answered, leaving tapping an option (the one gesture that
|
||||
// commits an answer) as the only thing a phone could do.
|
||||
const { app, setActiveElement } = loadTerminalUiHarness();
|
||||
app.activeSessionId = 'sess-1';
|
||||
app.sessions = new Map([['sess-1', { mode: 'claude' }]]);
|
||||
app.terminal = createTerminalGrid(
|
||||
['Do you want to proceed?', '', '❯ 1. Yes', ' 2. No, tell Claude what to do', '', ''],
|
||||
2
|
||||
);
|
||||
app._sendInputAsync = vi.fn();
|
||||
setActiveElement(null);
|
||||
|
||||
// The dialog's own rows stay TUI-owned: report the tap, keep the keyboard down.
|
||||
expect(app._isActionableMobileTerminalTap(9, 33)).toBe(true); // ❯ 1. Yes
|
||||
expect(app._isActionableMobileTerminalTap(9, 49)).toBe(true); // 2. No, …
|
||||
// Everything else is inert, and must still be able to summon the keyboard.
|
||||
expect(app._isActionableMobileTerminalTap(9, 1)).toBe(false); // question title
|
||||
expect(app._isActionableMobileTerminalTap(9, 65)).toBe(false); // blank row
|
||||
|
||||
app._handleMobileTerminalTap({ clientX: 9, clientY: 1 }, false);
|
||||
expect(app.terminal.focus).toHaveBeenCalledOnce();
|
||||
|
||||
app.terminal.focus.mockClear();
|
||||
app._handleMobileTerminalTap({ clientX: 9, clientY: 33 }, false);
|
||||
expect(app.terminal.focus).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('collapses TUI readback content without opening or retaining the keyboard', () => {
|
||||
const { app, setActiveElement } = loadTerminalUiHarness();
|
||||
app.activeSessionId = 'sess-1';
|
||||
|
||||
Reference in New Issue
Block a user