Skip to content

Improve script tree display in AI Scriptless - #25

Merged
3dgiordano merged 1 commit into
developmentfrom
AI-SCRIPTLESS-DISPLAY-IMPROVEMENTS
Jun 30, 2026
Merged

Improve script tree display in AI Scriptless#25
3dgiordano merged 1 commit into
developmentfrom
AI-SCRIPTLESS-DISPLAY-IMPROVEMENTS

Conversation

@3dgiordano

Copy link
Copy Markdown
Collaborator

This pull request significantly improves the logic for generating and displaying step names in AI scriptless test flows. The main focus is on making step display names more informative by including relevant parameter values (such as arguments to commands) in a way that matches user expectations and existing UI conventions. Additionally, extensive new tests have been added to verify these behaviors.

Enhancements to Step Display Name Logic:

  • Added new helper functions in formatters/ai_scriptless.py for extracting and formatting command parameter data, determining which parameters should be included in step display names, and formatting argument values securely and readably. ([formatters/ai_scriptless.pyR131-R237](https://github.com/PerfectoCode/perfecto-mcp/pull/25/files#diff-38b470c442361696bf8277f4c7a24461ce8507915f403baf0b64b7e084dfd67aR131-R237))
  • Refactored _step_display_name to use these helpers, so that for AI and non-AI commands, the display name includes public parameters marked for reporting, following the same conventions as the Perfecto UI. ([[1]](https://github.com/PerfectoCode/perfecto-mcp/pull/25/files#diff-38b470c442361696bf8277f4c7a24461ce8507915f403baf0b64b7e084dfd67aR131-R237), [[2]](https://github.com/PerfectoCode/perfecto-mcp/pull/25/files#diff-38b470c442361696bf8277f4c7a24461ce8507915f403baf0b64b7e084dfd67aR262-R263))

Testing Improvements:

  • Added comprehensive unit tests in tests/test_ai_scriptless_formatters.py to cover various scenarios for step display name generation, including AI validation steps, user actions, public/private parameters, and fallback logic. ([[1]](https://github.com/PerfectoCode/perfecto-mcp/pull/25/files#diff-c695d0d08cd141730b87ccbe0169758da86bec40a9cfe1628f62778526e60052R39-R88), [[2]](https://github.com/PerfectoCode/perfecto-mcp/pull/25/files#diff-c695d0d08cd141730b87ccbe0169758da86bec40a9cfe1628f62778526e60052R159-R281))
  • Introduced test command definitions (e.g., _ai_validation_command_definition, _comment_command_definition) to facilitate robust and reusable test cases. ([tests/test_ai_scriptless_formatters.pyR39-R88](https://github.com/PerfectoCode/perfecto-mcp/pull/25/files#diff-c695d0d08cd141730b87ccbe0169758da86bec40a9cfe1628f62778526e60052R39-R88))
  • Updated test payloads to use the new command definition helpers, ensuring consistency and clarity in test data. ([tests/test_ai_scriptless_formatters.pyL50-R103](https://github.com/PerfectoCode/perfecto-mcp/pull/25/files#diff-c695d0d08cd141730b87ccbe0169758da86bec40a9cfe1628f62778526e60052L50-R103))

API and Internal Refactoring:

  • Exported new helper functions such as _command_step_display_name and _definitions_map for use in tests and other modules. ([tests/test_ai_scriptless_formatters.pyR19-R21](https://github.com/PerfectoCode/perfecto-mcp/pull/25/files#diff-c695d0d08cd141730b87ccbe0169758da86bec40a9cfe1628f62778526e60052R19-R21))

These changes improve the clarity, usability, and maintainability of step naming in AI scriptless flows, while ensuring correctness through detailed tests.

@3dgiordano
3dgiordano merged commit 2400a1a into development Jun 30, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants