<#1261 add remote tui> Pull request opened by <cos...
# flyte-github
a
#1261 add remote tui Pull request opened by cosmicBboy This pull request introduces significant improvements to the Flyte TUI (Textual User Interface) experience, particularly for condition prompts and remote/local mode selection. The changes enhance the display and handling of markdown/HTML prompts in the TUI, add support for remote cluster browsing, and improve input handling for various data types in condition panels. The most important changes are: TUI Mode Selection and Remote Support • Added configuration-based selection between local and remote TUI modes in the
flyte start tui
CLI command. The TUI now detects if the config targets a remote Flyte cluster (via endpoint or
FLYTE_API_KEY
) and launches the appropriate interface. New options for config file path and polling interval were introduced. (
src/flyte/cli/_start.py
,
src/flyte/cli/_tui/__init__.py
) • Implemented
launch_tui_remote
and
config_is_remote
utilities to facilitate remote browsing and configuration detection. (
src/flyte/cli/_tui/__init__.py
) Condition Prompt Rendering Improvements • Introduced
_normalize_markdown_prompt_for_tui
and related helpers to convert HTML-heavy markdown prompts into Textual-friendly markdown or compact plain text, ensuring prompts render cleanly in the TUI regardless of embedded HTML. (
src/flyte/cli/_tui/_app.py
) • Updated the
ConditionInputPanel
to use these helpers, improving the display of prompts and handling bullet lists and inline HTML elements. (
src/flyte/cli/_tui/_app.py
) Enhanced Condition Input Handling • Improved input widgets for different data types: string conditions now use a
TextArea
for multi-line input, while numeric types use a compact
Input
. Focus is managed for better usability. (
src/flyte/cli/_tui/_app.py
) • Refactored input value extraction and validation logic for robustness and clarity. (
src/flyte/cli/_tui/_app.py
) Styling and Usability • Updated CSS styling to improve the layout and appearance of condition prompts, input rows, and buttons, ensuring a more consistent and user-friendly interface. (
src/flyte/cli/_tui/_app.py
) Error Handling Enhancements • Centralized and clarified ImportError messages for missing TUI dependencies, providing a consistent installation hint. (
src/flyte/cli/_tui/__init__.py
) These changes collectively make the Flyte TUI more robust, visually consistent, and capable of handling both local and remote workflows with improved prompt rendering and input handling. flyteorg/flyte-sdk