Improve script tree display in AI Scriptless - #25
Merged
Conversation
Baraujo25
approved these changes
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
formatters/ai_scriptless.pyfor 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))_step_display_nameto 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:
tests/test_ai_scriptless_formatters.pyto 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))_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))[tests/test_ai_scriptless_formatters.pyL50-R103](https://github.com/PerfectoCode/perfecto-mcp/pull/25/files#diff-c695d0d08cd141730b87ccbe0169758da86bec40a9cfe1628f62778526e60052L50-R103))API and Internal Refactoring:
_command_step_display_nameand_definitions_mapfor 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.