Skip to main content

kollabor-tui

kollabor-tui is the terminal UI package for Kollabor.

It owns rendering primitives, terminal state, input parsing, design-system components, widgets, status layout, modals, fullscreen sessions, message display, tool display, and alternate-view support. TUI code in the app should use these components rather than writing directly to terminal renderer internals.

Current Role

  • Provide the design system used by messages, status widgets, modals, and tools.
  • Track terminal size and layout state through shared helpers.
  • Coordinate message display and alternate-buffer/fullscreen transitions.
  • Parse keyboard input and route it through modal/status/input controllers.
  • Render tool calls, thinking blocks, profile modals, command menus, and widgets.
  • Provide reusable widgets for plugin/config UI surfaces.

Architecture

Module/Directory Responsibility
design_system/ themes, colors, icons, gradients, boxes, inline widgets
terminal_state.py terminal dimensions and global state helpers
terminal_renderer.py main terminal active-area renderer
message_coordinator.py message flow and alternate-buffer coordination
message_display_service.py message display policy and suppression logic
message_renderer.py / tool_display.py message/tool formatting
render_loop.py / render_layout.py render triggers and screen regions
input/ / input_handler.py input loop, key handling, command mode, paste
status/ status layout, widgets, navigation, inline editors
modals/ modal state, overlays, actions, renderers
fullscreen/ fullscreen plugin/session manager and renderer
altview/ alternate-view stack/session/display queue
widgets/ text, dropdown, checkbox, tree, slider, file browser widgets
display_tap.py / buffer_manager.py display capture and buffering

Usage

from kollabor_tui import T, get_terminal_size, solid_fg

width, height = get_terminal_size()
line = solid_fg("hello".ljust(width), T().primary)

For application rendering, prefer MessageDisplayCoordinator, fullscreen manager/session APIs, and terminal-state helpers. Avoid direct manipulation of TerminalRenderer render-state internals.

Known Gaps

  • Rendering behavior is sensitive to terminal lifecycle, alternate buffers, and resize events; risky changes need read-only lifecycle tracing before patches.
  • Some display policy lives across message_display_service.py, message_coordinator.py, and tool_display.py; regression tests should cover classification/display paths together.
  • The package exposes many public imports from __init__.py; a smaller stable facade would make downstream usage clearer.
  • Visual behavior often needs real terminal or screenshot-style verification in addition to unit tests.

Roadmap

Phase 1: Rendering stability

  • Document the steady-state draw, modal/fullscreen transition, and resize recovery contracts.
  • Add focused regression tests for tool display classification and suppression.
  • Keep terminal size access centralized through terminal_state.py.

Phase 2: Public API cleanup

  • Split stable public APIs from compatibility exports.
  • Add examples for widgets, status widgets, fullscreen plugins, and altviews.
  • Make design-system usage patterns consistent across all TUI surfaces.

Phase 3: Verification tooling

  • Add repeatable terminal/screenshot verification for fullscreen and complex render paths.
  • Improve diagnostics for render loop hibernation, buffering, and active-area state.
  • Document plugin UI extension points with real examples.

Development

Targeted validation examples:

python -m py_compile packages/kollabor-tui/src/kollabor_tui/*.py
python -m pytest tests/unit/mcp/test_mcp_status_plugin.py -q

Dependencies

  • kollabor-events

License

MIT

Metadata

Release files for kollabor-tui 0.14.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kollabor-tui 0.14.0
File Size Uploaded
kollabor_tui-0.14.0.tar.gz 371.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kollabor-tui 0.14.0
File Interpreter ABI Platform
kollabor_tui-0.14.0-py3-none-any.whl Python 3 none any Details

Total release size: 808.9 kB

Release files / kollabor_tui-0.14.0.tar.gz

Download URL kollabor_tui-0.14.0.tar.gz
Size 371.4 kB
Tags Source
SHA-256 checksum
How to use checksums
76257332515c179353ec9d4fd07dca0646d6303b3da2a3265f9ac27b870802bd
BLAKE2b-256 checksum
How to use checksums
2f388b95e737ac2e5be44fb6e4a55ab2e47f271efdd1f3c3bce9a922da076e44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / kollabor_tui-0.14.0-py3-none-any.whl

Download URL kollabor_tui-0.14.0-py3-none-any.whl
Size 437.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bfe1f0e1c91431d2e180b556c61d7438380281324967676d30b93911c09b7d47
BLAKE2b-256 checksum
How to use checksums
d8dedb275ca32db8f75893c9e68b819528a2de1ffedd798e4e365e4ac99f3e28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release history Release notifications | RSS feed

1.0.1

2 release files

1.0.0

2 release files

0.15.6

2 release files

0.15.5

2 release files

0.15.4

2 release files

0.15.3

2 release files

0.15.2

2 release files

0.15.1

2 release files

0.15.0

2 release files

This release

0.14.0 This release

2 release files

0.10.7

2 release files

0.10.6

2 release files

0.10.5

2 release files

0.10.4

2 release files

0.10.3

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.24

2 release files

0.5.23

2 release files

0.5.22

2 release files

0.5.19

2 release files

0.5.18

2 release files

0.5.16

2 release files

0.5.15

2 release files

0.5.14

2 release files

0.5.13

2 release files

0.5.12

2 release files

0.5.11

2 release files

0.5.8

2 release files

0.5.7

2 release files

0.5.5

2 release files

0.4.22

2 release files

0.4.21

2 release files

0.4.19

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page