Skip to content

fix(issue): /gsd auto on completed registry opens interactive Next-Action menu instead of terminal stop (guided-flow.js:1888)#6174

Open
jeremymcs wants to merge 2 commits into
mainfrom
issue/5735-gsd-auto-on-completed-registry-opens-int-1778892827
Open

fix(issue): /gsd auto on completed registry opens interactive Next-Action menu instead of terminal stop (guided-flow.js:1888)#6174
jeremymcs wants to merge 2 commits into
mainfrom
issue/5735-gsd-auto-on-completed-registry-opens-int-1778892827

Conversation

@jeremymcs
Copy link
Copy Markdown
Collaborator

@jeremymcs jeremymcs commented May 16, 2026

Summary

  • Added non-interactive guards in guided-flow complete/no-active-milestone paths to stop auto-mode with terminal notifications, verified by focused headless and guided-flow tests.

Verification

  • Completed in the repository worktree before push.

Related Issue

Repo

  • gsd-build/gsd-2

Branch

  • issue/5735-gsd-auto-on-completed-registry-opens-int-1778892827

Summary by CodeRabbit

  • Bug Fixes
    • Fixed interactive menus appearing in headless and web-bridge environments
    • Improved notifications when there are no active milestones or when all milestones are complete

Review Change Stack

…tion menu instead of terminal stop (guided-flow.js:1888)
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 16, 2026

Warning

Rate limit exceeded

@jeremymcs has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f74b3b7e-9a5e-44f1-8500-2d58b1e9321b

📥 Commits

Reviewing files that changed from the base of the PR and between 363c320 and ef2e2ce.

📒 Files selected for processing (1)
  • src/resources/extensions/gsd/tests/smart-entry-complete.test.ts
📝 Walkthrough

Walkthrough

This PR adds a helper function to detect non-interactive execution contexts (headless mode and web-bridge TUI) and uses it to prevent auto-mode from presenting interactive menus when there is no active milestone or all milestones are complete. Instead, it notifies and returns early.

Changes

Non-interactive context guards

Layer / File(s) Summary
Non-interactive context detection and early exit
src/resources/extensions/gsd/guided-flow.ts
isNonInteractiveContext(ctx) helper detects headless/web-bridge runs. Two existing branches ("no active milestone" and "all milestones complete") now check this predicate and return with a terminal notification instead of showing interactive action menus.

Sequence Diagram(s)

Not applicable. The changes add conditional early-exit guards within existing flows without introducing multi-component interactions or new control paths.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • gsd-build/gsd-2#5930: Both PRs modify src/resources/extensions/gsd/guided-flow.ts smart-entry routing and auto-mode entry logic, with overlapping changes to decision points.
  • gsd-build/gsd-2#5438: Both PRs modify the "no active milestone" and "all milestones complete" paths in guided-flow.ts, addressing the same code regions.
  • gsd-build/gsd-2#5611: Both PRs modify showSmartEntry() flow in guided-flow.ts, with direct overlap on auto-mode stopping logic.

Poem

🐰 A headless task that loops and loops,
Now stops before the menu droops.
With context checks and early returns,
The auto-mode finally learns—
When milestones are done, just exit clean! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly matches the main change: adding non-interactive guards to stop auto-mode with terminal notifications instead of opening interactive menus when phase is complete or no active milestone.
Linked Issues check ✅ Passed The code changes implement the suggested fix from issue #5735: adding isNonInteractiveContext helper and using it to detect headless/web-bridge contexts, then returning terminal notifications instead of calling showNextAction for complete/no-active-milestone branches.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the issue requirements: the helper function and its application address only the specific problem of non-interactive context detection and terminal stop behavior, with no unrelated modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue/5735-gsd-auto-on-completed-registry-opens-int-1778892827

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 16, 2026

🟠 PR Risk Report — HIGH

Files changed 2
Systems affected 1
Overall risk 🟠 HIGH

Affected Systems

Risk System
🟠 high GSD Workflow
File Breakdown
Risk File Systems
🟠 src/resources/extensions/gsd/guided-flow.ts GSD Workflow
src/resources/extensions/gsd/tests/smart-entry-complete.test.ts (unclassified)

⚠️ 🟠 High risk — the following systems require verification before merge:

  • 🟠 GSD Workflow: verify GSD workflow state transitions end-to-end

⛔ This PR should not be merged without executing this follow-up prompt.

Ask your coding agent to verify before submitting:

Review this PR for risks in: GSD Workflow. Verify:

1. verify GSD workflow state transitions end-to-end

Before modifying any code, assess the scope of this fix:

- Identify the root cause, not just the reported symptom.
- Search the codebase for other call sites, similar patterns, or duplicated logic that may share the same bug.
- List affected tests, documentation, and any downstream consumers that depend on the current behavior.
- Flag any changes that extend beyond the immediate file or function.

Report findings first. Then propose a fix scoped to the actual root cause, and wait for confirmation before applying changes outside the originally reported location.

💡 Have a Codex subscription? Get an independent second opinion: codex review --adversarial

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.

/gsd auto on completed registry opens interactive Next-Action menu instead of terminal stop (guided-flow.js:1888)

1 participant