| High | src/chatbot/chatApp.ts:326-329 | Every streamed token forces scroll to bottom. Keyboard users trying to review prior output in the chat history can be pulled away repeatedly during long responses/tool runs. | 2.1.1 Keyboard, 2.2.2 Pause/Stop/Hide, 2.4.3 Focus Order | Only auto-scroll when the user is already at/near bottom or input is focused. Add a “new output below” status when chat history is focused/scrolled up. |
| High | src/chatbot/agent/streaming.ts:102-107, src/chatbot/chatApp.ts:269-303 | tool_error events are produced but never surfaced in the TUI. Users may not receive a perceivable error/status update for failed DB/schema work. | 4.1.3 Status Messages, 3.3.1 Error Identification | Handle event.type === 'tool_error' in chatApp.ts, display [Error] Tool <name> failed: ..., and record metrics. |
| High | src/chatbot/chatApp.ts:235-268, src/chatbot/chatApp.ts:274-279, src/chatbot/index.ts:17-21 | Dynamic “thinking”, SQL running, token streaming, cancellation, and errors are only visual redraws inside the OpenTUI screen. Terminal screen readers may not announce changes reliably, especially with full-screen rendering at 30 FPS. | 4.1.3 Status Messages, 4.1.2 Name/Role/Value | Add an accessibility/transcript mode that emits line-oriented status updates to stdout/stderr or a log pane: “Assistant thinking”, “Running SQL”, “Query finished”, “Response complete”, “Cancelled”. Consider reduced streaming / sentence-level updates. |
| Medium | src/chatbot/chatApp.ts:104-117, src/chatbot/chatApp.ts:158-165, src/chatbot/chatApp.ts:188-203 | Focus is mostly communicated by footer text; the input border is always borderFocused, and chat history has no clear visual focus boundary. Low-vision keyboard users may not know where focus is. | 2.4.7 Focus Visible, 1.3.1 Info and Relationships | Change border/color/text labels based on actual focus. Add explicit [Focused: Input] / [Focused: Chat History] status and a visible border/heading for the focused region. |
| Medium | src/chatbot/features/modelSelector.ts:199-207 | Model selector selection state is shown with ▶, active state with ✓, but the selected item is not rendered with text like “selected” or position/count. Screen reader terminal users may hear only a symbol with insufficient context. | 4.1.2 Name/Role/Value, 1.3.1 Info and Relationships | Render selected row as > selected 3 of 42: model-id ...; render active row as current model. Update footer/status with selected model and count. |
| Medium | src/chatbot/features/modelSelector.ts:61-64, src/chatbot/features/modelSelector.ts:199-208 | wrapMode: 'none' can truncate long model IDs/names in narrow terminals, making choices unreadable without a horizontal navigation affordance. | 1.4.10 Reflow, 1.4.4 Resize Text | Wrap rows or provide a selected-model details line that wraps. Consider truncating list rows but showing full selected ID/name in footer. |
| Medium | src/chatbot/utils/theme.ts:21-24, src/chatbot/chatApp.ts:235, src/chatbot/chatApp.ts:275, src/chatbot/chatApp.ts:278 | Essential statuses use ANSI dim. In many terminals dim substantially lowers contrast, affecting readability of “thinking…”, “Running query…”, and schema lookup states. | 1.4.3 Contrast Minimum, 1.4.1 Use of Color | Do not dim essential status text, or add ACCESSIBLE_COLOR=1 / reuse NO_COLOR to force normal intensity for statuses. |
| Medium | src/chatbot/index.ts:45-50, src/chatbot/chatApp.ts:40-44, src/chatbot/chatApp.ts:183-185 | Escape behavior is mode-dependent: during processing it cancels, in model selector it closes, otherwise it exits the app; footer only advertises Ctrl+C quit and Esc cancel during processing. This can surprise keyboard-only users. | 3.2.2 On Input, 2.4.6 Headings and Labels | Make Escape semantics discoverable in the footer for each mode, or require confirmation before global Esc exits. |
| Low | src/chatbot/chatApp.ts:178-180, src/chatbot/features/modelSelector.ts:73-75, src/chatbot/features/modelSelector.ts:140-165 | Shortcut discoverability is incomplete. Ctrl+P, PageUp/PageDown, Home/End, Ctrl+U/D/G/E are supported but not shown. | 2.4.6 Headings and Labels, 3.3.2 Labels or Instructions | Add a ? help overlay or expanded footer/help text listing all shortcuts. |
| Low | src/chatbot/utils/ansi.ts:33-39, src/chatbot/utils/theme.ts:44-50 | ANSI parser ignores some colors used by theme, e.g. cyan 36, red 31, white 37. Non-color labels still exist, so impact is mainly inconsistent styling and potentially misleading color expectations. | 1.4.1 Use of Color | Either parse all used ANSI codes or avoid unsupported ANSI codes. Keep textual [SQL], [Error], selected, current indicators. |
| Low | src/chatbot/__tests__/ansi.test.ts, src/chatbot/__tests__/theme.test.ts, src/chatbot/__tests__/streaming.test.ts | Existing tests cover ANSI parsing/theme/stream events but not TUI accessibility behaviors: focus state, footer accuracy, model selector selection text, autoscroll lock, or tool_error display. | Supports 2.1.1, 2.4.7, 4.1.3 | Add targeted virtual-renderer tests for keyboard/focus/status behavior. |