Skip to content

Commit dfe496a

Browse files
author
Tjaz Erzen
committed
Make widget ID dynamic
1 parent 80d13da commit dfe496a

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

plain2code_logger.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,6 @@ def __init__(self, event_bus: EventBus):
5050
def emit(self, record):
5151
try:
5252
# Extract structured data from the log record
53-
54-
# Original timestamp format (absolute time):
55-
# timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(record.created))
56-
57-
# Calculate offset time from start of generation
5853
offset_seconds = record.created - self.start_time
5954
minutes = int(offset_seconds // 60)
6055
seconds = int(offset_seconds % 60)

tui/components.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ class TUIComponents(str, Enum):
7070
FRID_PROGRESS_REFACTORING = "frid-progress-refactoring"
7171
FRID_PROGRESS_CONFORMANCE_TEST = "frid-progress-conformance-test"
7272

73+
# Test scripts container widgets
74+
TEST_SCRIPTS_CONTAINER = "test-scripts-container"
75+
7376
CONTENT_SWITCHER = "content-switcher"
7477
DASHBOARD_VIEW = "dashboard-view"
7578
LOG_VIEW = "log-view"

tui/plain2code_tui.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def compose(self) -> ComposeResult:
159159

160160
# Test scripts container with border
161161
yield TestScriptsContainer(
162-
id="test-scripts-container",
162+
id=TUIComponents.TEST_SCRIPTS_CONTAINER.value,
163163
show_unit_test=self.unittests_script is not None,
164164
show_conformance_test=self.conformance_tests_script is not None,
165165
show_testing_env=self.prepare_environment_script is not None,

0 commit comments

Comments
 (0)