Repository navigation
feat: editor only in interactive mode - #7
Merged
Merged
Conversation
Subcommands such as 'gflow start feature --name x' still create the worktree but no longer launch the editor, so scripted callers (CI, agents) do not spawn editor windows.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the change restricting automatic editor launches to gflow’s interactive menu.
No open issues 🎉
What changed in this PR
This PR limits automatic worktree editor launches to gflow’s interactive menu, preventing scripted and CI callers from opening unwanted editor windows.
Changes:
- Adds an
open_editorflag, enabled only when no subcommand is supplied; worktree creation and setup commands remain unchanged. - Adds a regression test for disabled editor launches and updates existing test fixtures.
- Documents the new behavior in the README, plugin skill, and changelog.
| File | Description |
|---|---|
tests/worktree_test.rs |
Preserves editor-enabled behavior in existing fixtures. |
tests/start_test.rs |
Tests editor suppression while preserving worktree creation; updates fixtures. |
tests/lifecycle_test.rs |
Adds the editor flag to lifecycle fixtures. |
src/worktree.rs |
Gates editor launch on open_editor. |
src/main.rs |
Enables editor launch only for interactive runs. |
skills/gflow/SKILL.md |
Documents interactive-only editor launching. |
README.md |
Clarifies editor behavior for menus and subcommands. |
CHANGELOG.md |
Records the behavior change under Unreleased. |
Review effort: Balanced
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
jopmiddelkamp
enabled auto-merge (squash)
October 29, 2026 16:00
jopmiddelkamp
disabled auto-merge
October 29, 2026 16:02
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.
Why
With
worktree=true, everygflow start …opened the configured editor (for example IntelliJ IDEA). Scripted callers such as AI agents and CI then spawn editor windows nobody asked for. The editor should open only when a person uses the interactive menu.What changed
WorktreeEnvgets anopen_editorflag.open_worktreeskips the editor when it is false.main.rssets it tocommand.is_none(): onlygflowwith no subcommand (the interactive menu) opens the editor. This is the same signalinit::ensurealready uses for interactive runs.gflow start feature --name xstill create the worktree and run theworktrees.jsonsetup commands. They print the worktree path, but open no editor.skills/gflow/SKILL.mdand CHANGELOG (Unreleased → Changed) describe the new rule.Out of scope: the
editorconfig key and thenonevalue work as before.Test review
start_work_branch_worktree_without_open_editor_skips_open(tests/start_test.rs). It fails if a run withopen_editor: falsestill calls the editor. Watched it fail before adding the guard.WorktreeEnvfixture setsopen_editor: true, so their assertions (editor opens, editor failure is a warning,editor=noneskips) are unchanged.cargo test: all suites pass on this commit alone. The TDD coverage gate (.claude/hooks/tdd-gate.sh) passes.verifyskill), withworktree=trueand a logging fake editor:gflow start feature --name x→ worktree created, editor not run.