From 59e4191fd1a08bde570e92843913369ffab461a1 Mon Sep 17 00:00:00 2001 From: rob Date: Sat, 17 Jan 2026 14:39:17 -0400 Subject: [PATCH] Add contextual tooltips to TestStepDialog - Input Variables: explains {variable} syntax and variable sources - Assertions: lists all available assertion types with descriptions - Provider: explains override options including mock provider - Run Step: describes what happens when clicked - Output: explains status, output text, variables, and assertion results Co-Authored-By: Claude Opus 4.5 --- src/cmdforge/gui/dialogs/test_step_dialog.py | 42 +++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/src/cmdforge/gui/dialogs/test_step_dialog.py b/src/cmdforge/gui/dialogs/test_step_dialog.py index 6f604a9..3738197 100644 --- a/src/cmdforge/gui/dialogs/test_step_dialog.py +++ b/src/cmdforge/gui/dialogs/test_step_dialog.py @@ -137,6 +137,14 @@ class TestStepDialog(QDialog): # Left: Variables input vars_group = QGroupBox("Input Variables") + vars_group.setToolTip( + "

Input Variables

" + "

These are the variables referenced by this step using {variable} syntax.

" + "

Enter test values to simulate what the step would receive during actual execution.

" + "

{input} - The main input text (stdin or piped content)
" + "{argname} - Values from tool arguments
" + "{prev_output} - Output from previous steps

" + ) vars_layout = QVBoxLayout(vars_group) vars_help = QLabel("Provide test values for variables used in this step:") @@ -154,6 +162,19 @@ class TestStepDialog(QDialog): # Right: Assertions assert_group = QGroupBox("Assertions (Optional)") + assert_group.setToolTip( + "

Assertions

" + "

Define checks to automatically validate the step output.

" + "

Available assertion types:
" + "• Not Empty - Output must contain text
" + "• Contains - Output must include specific text
" + "• Does Not Contain - Output must NOT include text
" + "• Equals - Output must exactly match expected value
" + "• Valid JSON - Output must be parseable JSON
" + "• Valid Python - Output must be valid Python syntax
" + "• Matches Regex - Output must match a pattern
" + "• Min/Max Length - Output length constraints

" + ) assert_layout = QVBoxLayout(assert_group) assert_help = QLabel("Define checks to validate the step output:") @@ -174,6 +195,7 @@ class TestStepDialog(QDialog): # Add assertion button btn_add_assertion = QPushButton("+ Add Assertion") + btn_add_assertion.setToolTip("Add a new assertion to validate the step output") btn_add_assertion.clicked.connect(self._add_assertion_row) assert_layout.addWidget(btn_add_assertion) @@ -191,8 +213,17 @@ class TestStepDialog(QDialog): # Provider override (for prompt and tool steps) if isinstance(self.step, (PromptStep, ToolStep)): - controls_layout.addWidget(QLabel("Provider:")) + provider_label = QLabel("Provider:") + provider_label.setToolTip("Override the AI provider for this test run") + controls_layout.addWidget(provider_label) self.provider_combo = QComboBox() + self.provider_combo.setToolTip( + "

Provider Override

" + "

Select a different provider for testing:

" + "

(use step's default) - Use the provider configured in the step
" + "• mock - Fast testing without API calls (returns debug info)
" + "• Other providers will make real API calls

" + ) self.provider_combo.addItem("(use step's default)") providers = load_providers() for provider in sorted(providers, key=lambda p: p.name): @@ -210,6 +241,7 @@ class TestStepDialog(QDialog): # Run button self.btn_run = QPushButton("Run Step") + self.btn_run.setToolTip("Execute this step with the provided input variables and check assertions") self.btn_run.setMinimumHeight(36) self.btn_run.setMinimumWidth(120) self.btn_run.clicked.connect(self._run_test) @@ -219,6 +251,14 @@ class TestStepDialog(QDialog): # Output section output_group = QGroupBox("Output") + output_group.setToolTip( + "

Output

" + "

Shows the results after running the step:

" + "

Status - Success/failure and execution time
" + "• Output text - The actual output produced by the step
" + "• Output variables - Variables that would be available to subsequent steps
" + "• Assertion results - Pass/fail status for each assertion

" + ) output_layout = QVBoxLayout(output_group) # Status line