TUI freeze and Hermes parity¶
Keprix TUI is core runtime. It is not a product surface for feature-specific imports, and it is not a place to copy Hermes visual identity. Hermes is a reference for runtime quality, interaction reliability, keyboard ergonomics, and gateway behavior only.
Keprix keeps its own UI/UX, brand expression, visual system, navigation, colors, typography, and product feel.
Freeze rule¶
src/keprix/tui/ is frozen for generic TUI improvements and bug fixes only.
Allowed changes:
- Fix TUI bugs.
- Improve keyboard behavior.
- Improve streaming, queue, steer, approval, clarify, setup, slash, and transcript behavior.
- Improve performance or resilience.
- Add generic display support for data returned by an API.
Not allowed:
- Import product modules into
keprix.tui. - Hardcode Agent OS, Channel Shield, billing, Scout, or app-specific behavior into TUI runtime.
- Copy Hermes visual identity, branding, colors, spacing, typography, or layout.
- Add product-specific panels directly into core TUI.
Product features may expose TUI data through backend APIs, slash commands, and generic registries.
References¶
Hermes reference files:
1st-plan/competitor-research/00-agents-to-adopt/hermes-agent/ui-tui/src/app.tsx1st-plan/competitor-research/00-agents-to-adopt/hermes-agent/ui-tui/src/app/useSubmission.ts1st-plan/competitor-research/00-agents-to-adopt/hermes-agent/ui-tui/src/app/useConfigSync.ts1st-plan/competitor-research/00-agents-to-adopt/hermes-agent/ui-tui/src/app/createGatewayEventHandler.ts1st-plan/competitor-research/00-agents-to-adopt/hermes-agent/ui-tui/src/app/gatewayRecovery.ts1st-plan/competitor-research/00-agents-to-adopt/hermes-agent/ui-tui/src/app/spawnHistoryStore.ts1st-plan/competitor-research/00-agents-to-adopt/hermes-agent/ui-tui/src/components/activeSessionSwitcher.tsx1st-plan/competitor-research/00-agents-to-adopt/hermes-agent/ui-tui/src/components/streamingMarkdown.tsx1st-plan/competitor-research/00-agents-to-adopt/hermes-agent/ui-tui/src/components/textInput.tsx1st-plan/competitor-research/00-agents-to-adopt/hermes-agent/tui_gateway/server.py1st-plan/competitor-research/00-agents-to-adopt/hermes-agent/tui_gateway/ws.py1st-plan/competitor-research/00-agents-to-adopt/hermes-agent/tui_gateway/slash_worker.py
Keprix files:
src/keprix/tui/app.pysrc/keprix/tui/client.pysrc/keprix/tui/slash_handler.pysrc/keprix/tui/slash_commands.pysrc/keprix/tui/slash_registry.pysrc/keprix/tui/composer.pysrc/keprix/tui/transcript_store.pysrc/keprix/tui/widgets/virtual_transcript.pysrc/keprix/tui/widgets/approval_overlay.pysrc/keprix/tui/widgets/clarify_overlay.pysrc/keprix/tui/widgets/setup_required.pysrc/keprix/tui/streaming_markdown.pysrc/keprix/tui/external_editor.pysrc/keprix/tui/voice.pytests/tui/tests/architecture/test_core_product_boundaries.py
Parity matrix¶
| Area | Hermes reference | Keprix reference | Status | Action |
|---|---|---|---|---|
| Session list and resume | activeSessionSwitcher.tsx, useSessionLifecycle.ts | app.py, client.py, tests/tui/test_client_sessions.py | same | Keep Keprix Textual UI; preserve behavior. |
| Streaming chat | streamingAssistant.tsx, streamingMarkdown.tsx, gatewayClient.ts | app.py, client.py, streaming_markdown.py, tests/tui/test_streaming.py | same | Keep tests around chunk handling and markdown stability. |
| Busy input: interrupt, queue, steer | useSubmission.ts, useConfigSync.ts, uiStore.ts | app.py, client.py, slash_commands.py, tests/tui/test_busy_input.py | same | Keep behavior. Do not change visual surface. |
| Slash local commands | createSlashHandler.ts, domain/slash.ts | slash_handler.py, slash_commands.py, slash_registry.py, tests/tui/test_slash_registry.py | same | Keep backend fallthrough and local completion. |
| Slash backend fallthrough | tui_gateway/slash_worker.py, gatewayClient.ts | slash_handler.py, client.py, tests/tui/test_slash_fallthrough.py | same | Keep command dispatch behind API, not product imports. |
| Clarify overlay | overlayStore.ts, components/appOverlays.tsx | widgets/clarify_overlay.py, tests/tui/test_clarify_overlay.py | same | Keep generic overlay. |
| Approval overlay | approvalAction.test.ts, components/appOverlays.tsx | widgets/approval_overlay.py, tests/tui/test_approval_overlay.py | same | Keep generic approval behavior. |
| Virtual scrollback | hooks/useVirtualHistory.ts, virtualHistory*.test.ts | widgets/virtual_transcript.py, transcript_store.py, tests/tui/test_virtual_transcript.py | same | Keep transcript virtualization tests. |
| Selection and clipboard | clipboard.test.ts, osc52.test.ts | clipboard.py, selection.py, tests/tui/test_clipboard_osc52.py, tests/tui/test_selection.py | same | Preserve OSC52 and local clipboard fallback. |
| External editor compose | lib/editor.ts, lib/editor.test.ts | external_editor.py, tests/tui/test_external_editor.py | same | Keep $EDITOR handoff generic. |
| Voice push-to-talk | not primary in listed Hermes files | voice.py, tests/tui/test_voice.py | Keprix better | Preserve as Keprix extension. |
| Setup overlay and handoff | setupHandoff.ts, content/setup.ts | widgets/setup_required.py, setup_handoff.py, tests/tui/test_setup_handoff.py | same | Keep one-screen unblock plus full setup handoff. |
| Gateway recovery | gatewayRecovery.ts, createGatewayEventHandler.ts, gatewayRecovery.test.ts | client.py, app.py | Hermes better | Add a future generic recovery prompt. |
| Active session switcher ergonomics | activeSessionSwitcher.tsx, activeSessionSwitcher.test.ts | app.py, tests/tui/test_client_sessions.py | Hermes better | Add a future prompt for faster keyboard session switching. |
| Spawn history and replay archive | spawnHistoryStore.ts, spawnHistoryStore.test.ts | no direct equivalent | Hermes better | Add future prompt if agent spawn replay remains a product goal. |
| Skin and theme sync | theme.test.ts, components/themed.tsx | styles/theme.tcss, no gateway theme sync | Hermes better | Add future prompt for Keprix-branded theme sync only. |
| Terminal platform edge tests | terminalParity.test.ts, termux.test.ts, terminalSetup.test.ts | terminal_modes.py, tests/tui/test_client.py | Hermes better | Add future prompt for platform matrix coverage. |
| Visual identity | Hermes components and branding | Keprix Textual theme and product UI | different by design | Do not copy Hermes visual identity. |
High-value follow-up prompts¶
These are behavior prompts only. They must keep Keprix UI/UX and branding.
TUI gateway recovery parity¶
Implement Hermes-grade gateway recovery behavior in Keprix TUI:
- reconnect notices
- recoverable event handling
- clear stale stream state
- preserve composer text during reconnect
- tests for disconnect during stream and reconnect after idle
References:
ui-tui/src/app/gatewayRecovery.tsui-tui/src/app/createGatewayEventHandler.tsui-tui/src/__tests__/gatewayRecovery.test.tssrc/keprix/tui/client.pysrc/keprix/tui/app.py
TUI session switching ergonomics¶
Improve Keprix session switching behavior without copying Hermes layout:
- faster keyboard switcher
- fuzzy session matching
- recent session priority
- no product-specific imports
References:
ui-tui/src/components/activeSessionSwitcher.tsxui-tui/src/__tests__/activeSessionSwitcher.test.tssrc/keprix/tui/app.pytests/tui/test_client_sessions.py
TUI platform parity coverage¶
Add Keprix tests for terminal platform behavior:
- truecolor handling
- Termux behavior
- mouse mode toggles
- narrow terminal layout
- paste bursts
References:
ui-tui/src/__tests__/terminalParity.test.tsui-tui/src/__tests__/terminalSetup.test.tsui-tui/src/__tests__/termux.test.tssrc/keprix/tui/terminal_modes.pytests/tui/
Keprix-branded theme sync¶
Add generic theme sync while preserving Keprix design:
- backend theme config
- TUI theme refresh
- no Hermes colors or branding
- tests for loading and fallback
References:
ui-tui/src/components/themed.tsxui-tui/src/__tests__/theme.test.tssrc/keprix/tui/styles/theme.tcss
Current gate¶
The architecture boundary test enforces that TUI does not import product modules:
python -m pytest tests/architecture/test_core_product_boundaries.py -q
The current TUI regression suite is:
python -m pytest tests/tui -q