Skip to content

Conversation

@docer1990
Copy link

This PR adds clickable file path navigation to improve workflow and experience when working with large Maestro test suites. Users can now Cmd+Click (or Ctrl+Click) on file paths in YAML files to instantly open referenced flows and scripts.

Purpose

When working with large Maestro test suites containing dozens of flows, developers frequently need to navigate between files referenced in YAML configurations. For example, when a flow uses runFlow or runScript to reference another file:

- runFlow: "flows/authentication/login.yaml"
- runScript: "../../scripts/setup-test-data.js"
- runFlow: "../shared/common-steps.yml"

Previously, developers had to:

  1. Manually copy the file path
  2. Use "Go to File" or file explorer to search
  3. Navigate through nested directories

This becomes tedious and time-consuming in large test suites with complex directory structures.

This PR solves that by making file paths clickable. Now Maestro users can:

  • Cmd+Click (Mac) or Ctrl+Click (Windows/Linux) on any quoted file path to open it instantly
  • Use the "Open YAML File" command from the Command Palette as an alternative
  • Navigate quickly between related flows without leaving the editor

Example Use Case

In a test suite with this structure:

maestro/
 ├── flows/
 │   ├── onboarding/
 │   │   ├── signup.yaml
 │   │   └── login.yaml
 │   └── checkout/
 │       └── purchase.yaml
 ├── shared/
 │   └── common-steps.yaml
 └── scripts/
     └── test-helpers.js

When editing signup.yaml that references:

  - runFlow: "../shared/common-steps.yaml"
  - runScript: "../../scripts/test-helpers.js"
  - runFlow: "login.yaml"

Developers can now click directly on any path to open the file, instead of manually navigating the file tree.

Changes

  • Add registerYamlPathOpener function with DocumentLinkProvider
  • Implement automatic detection of file paths in quoted strings
  • Support .yaml, .yml, and .js file extensions
  • Handle relative paths (./, ../), nested paths, and absolute paths
  • Case-insensitive extension matching (supports .YAML, .YML, .JS)

Testing

  • Tested clicking on YAML file paths (e.g., "flows/login.yaml")
  • Tested clicking on JS script paths (e.g., "../../data/auth.js")
  • Verified parent directory navigation (../)
  • Tested case-insensitive extensions (.YAML, .YML, .JS)

Implement DocumentLinkProvider and command to make file paths in YAML files
clickable (Cmd+Click). Supports .yaml, .yml, and .js files with
relative and absolute path resolution.
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.

1 participant