Skip to content

fix: open flow file on editor after generating it [MST-8633]#1805

Open
ayush578 wants to merge 1 commit into
mainfrom
fix/fileGenerate/openFile
Open

fix: open flow file on editor after generating it [MST-8633]#1805
ayush578 wants to merge 1 commit into
mainfrom
fix/fileGenerate/openFile

Conversation

@ayush578

@ayush578 ayush578 commented Jul 2, 2026

Copy link
Copy Markdown

What & why

When Claude generates a .flow via the uipath-maestro-flow skill, the resulting file is written to disk but never opened — the user has to locate and open it by hand (MST-8633).

This adds an "open the flow" step to the Completion Output section of the greenfield authoring guide, so the agent opens the generated .flow as its final action (right after validate + format).

Change

skills/uipath-maestro-flow/references/author/references/greenfield.md — one new step (17 lines):

  • Opens the generated file with the standard code -r "<ProjectName>.flow" CLI.
  • Notes that .flow is handled by the visual Flow editor automatically (it is the default editor for *.flow), so no viewType/flags are needed.
  • Editor-fork fallbacks (code-insiders, cursor) and — if none resolve — skip and just report the path; never fail the build over the open.
  • Skips entirely in non-interactive / headless (CI) runs.

Scoped to the greenfield (newly generated) path — the ticket's scenario. Brownfield edits act on an already-open flow, so that path is left unchanged.

Notes

  • Instruction-only change (no code); behavior is guidance the agent follows at build completion.
  • If UiPath has a preferred house pattern for "open in editor" (e.g. a dedicated uip command or printing a clickable path), happy to align to it.

After a greenfield flow build finishes (validate + format), open the generated .flow in the editor as the final step so users don't have to locate it manually. Adds an 'open the flow' step to the Completion Output section of the uipath-maestro-flow authoring guide, using the standard `code -r` CLI (the .flow custom editor is the default editor for *.flow), with editor-fork fallbacks and a headless/CI skip.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Claude finished @ayush578's task in 2m 11s —— View job


PR Review: fix: open flow file on editor after generating it MST-8633

  • Read review criteria and project conventions
  • Run diff and read changed files in full
  • Check PR conversation for existing feedback
  • Verify relative links resolve
  • Check for cross-skill references, secrets, paths
  • Post review findings

Summary

Adds a 17-line "open the generated .flow in the editor" step to the Completion Output section of greenfield.md, so the agent runs code -r after validate + format instead of leaving the file closed.

Change-by-Change Review

1. skills/uipath-maestro-flow/references/author/references/greenfield.md — Medium

The new section (lines 327–342) is functionally correct — the fallback chain (codecode-insiderscursor → skip) and the CI/headless guard are sound. Two issues:

a. Three-turn execution map is out of sync (Medium)
The turn map at line 40 describes T3 as:

One chained Bash (node configure && validate && format). On validate failure: one Edit turn, then re-chain validate && format

The new code -r call fires after T3's chain but is not reflected in the turn map. An agent following the turn map strictly will not emit this Bash call. Either:

  • Update line 40 to append + open file in editor to the T3 description, or
  • Add an explicit [post-T3] tag to the new section heading so the agent knows this is a post-chain step.

Fix this →

b. Prose verbosity vs. token optimization rules (Low)
The repo's token-optimization rules mandate terse, prescriptive prose. The new section has some slack that could be trimmed:

Current Tighter
Once format succeeds, open the .flow in the editor as your final action — a flow you generated otherwise sits closed and the user has to hunt for it: After formatsucceeds, open the.flow — otherwise it sits closed:
Open the **file** you just generated, not its folder. Opening is idempotent: if the file is already open, this just focuses its tab. Open the **file**, not its folder. Idempotent — if already open, just focuses the tab.
Editor-fork binaries differ: if \code` isn't on `PATH`, try `code-insiders` (VS Code Insiders) or `cursor` (Cursor). If none resolve, skip this step and just report the file path below — never fail the build over the open.` If \code` isn't on PATH, try `code-insiders` then `cursor`. If none resolve, skip — report the file path below. Never fail the build over the open.`

The code block comment # -r reuses the current editor window (line 332) restates what surrounding prose explains — per token optimization §2, strip it.

What's Missing

  • Turn-map update for the new step — see finding (a) above. Without this, agents following the three-turn map will omit the open command.

Area Ratings

Area Status Notes
Frontmatter OK No frontmatter changes
E2E Tests OK Instruction-only change to existing reference — no new CLI workflow requiring new test coverage
Skill Body OK SKILL.md not modified
References & Assets Issue Turn map inconsistency (Medium); minor verbosity (Low)
Repo Hygiene OK No secrets, no cross-skill refs, no CODEOWNERS change needed

Issues for Manual Review

  • code -r vs. a UiPath-specific mechanism: The PR description asks whether UiPath has a preferred "open in editor" pattern (e.g., a uip command or a clickable path protocol). If such a mechanism exists, it would be preferable to hardcoding VS Code CLI variants. This is a domain question the reviewer should confirm with the UiPath team.

Conclusion

Approve with minor changes requested. The functional approach is correct and well-guarded (fallbacks, CI skip). The main actionable item is updating the three-turn execution map (line 40) to include this post-chain step — without it, agents using the turn map as their execution template will skip the file open. The prose verbosity is a low-severity polish item.


@ayush578 ayush578 requested a review from ayushya July 2, 2026 05:55
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