This commit is contained in:
2026-02-13 13:45:35 -08:00
parent 6416aeceec
commit ce2f28cc50
5 changed files with 99 additions and 24 deletions

19
TUI.py
View File

@@ -8,6 +8,7 @@ import sys
import subprocess
from pathlib import Path
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple
from rich.text import Text
from textual import on, work
from textual.app import App, ComposeResult
@@ -41,7 +42,7 @@ for path in (REPO_ROOT, TUI_DIR):
sys.path.insert(0, str_path)
from TUI.pipeline_runner import PipelineRunResult # type: ignore # noqa: E402
from SYS.result_table import Table, extract_hash_value, extract_store_value # type: ignore # noqa: E402
from SYS.result_table import Table, extract_hash_value, extract_store_value, get_result_table_row_style # type: ignore # noqa: E402
from SYS.config import load_config # type: ignore # noqa: E402
from SYS.database import db
@@ -920,7 +921,12 @@ class PipelineHubApp(App):
if self.current_result_table.rows:
rows = self.current_result_table.to_datatable_rows()
for idx, row_values in enumerate(rows, 1):
self.results_table.add_row(str(idx), *row_values, key=str(idx - 1))
row_style = get_result_table_row_style(idx - 1)
self.results_table.add_row(
Text(str(idx), style=row_style),
*[Text(str(value), style=row_style) for value in row_values],
key=str(idx - 1),
)
else:
# Fallback or empty state
self.results_table.add_columns("Row", "Title", "Source", "File")
@@ -930,11 +936,12 @@ class PipelineHubApp(App):
# Fallback for items without a table
for idx, item in enumerate(self.result_items, start=1):
row_style = get_result_table_row_style(idx - 1)
self.results_table.add_row(
str(idx),
str(item),
"",
"",
Text(str(idx), style=row_style),
Text(str(item), style=row_style),
Text("", style=row_style),
Text("", style=row_style),
key=str(idx - 1)
)