Skip to content

Always run generate wizard with project name - #76

Merged
Frotty merged 11 commits into
masterfrom
agent/generate-name-wizard
Aug 5, 2026
Merged

Always run generate wizard with project name#76
Frotty merged 11 commits into
masterfrom
agent/generate-name-wizard

Conversation

@Frotty

@Frotty Frotty commented Aug 5, 2026

Copy link
Copy Markdown
Member

What changed

  • Always run the grill generate wizard, even when the project name is supplied as an argument.
  • Refresh the agent instructions and template guidance, including the matching template version bump.
  • Make closure capture semantics prominent: captured locals are value snapshots/read-only shared state; use a class or reference(value) for intentional shared mutation.
  • Add regression coverage for named-project wizard flows.

Why

grill generate some-name returned before entering runWizard, so it silently used defaults while grill generate prompted interactively. The template review also restores an explicit warning for the common closure-capture footgun and keeps the detailed bug/fix/reference examples.

Validation

  • ./gradlew test --tests GenerateTests

@Frotty
Frotty marked this pull request as ready for review August 5, 2026 07:23

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

runWizard(setup, prompt, useInteractiveMenus = generatePrompt == null)

P2 Badge Preserve CLI selections when wizard input is unavailable

Now that named generate runs the wizard, scripted invocations with stdin at EOF hit terminalPrompt() returning null for each wizard question; the wizard then treats those null answers as negative choices, so grill generate myproject --with-dep table-layout --with-agents --with-ci can generate a project without the requested dependency, AGENTS file, or CI workflow. Treat null like accepting the displayed default for named/project-flag flows, or skip optional prompts when no input is available.

AGENTS.md reference: AGENTS.md:L33-L34

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Frotty
Frotty marked this pull request as draft August 5, 2026 07:29
@Frotty
Frotty marked this pull request as ready for review August 5, 2026 07:39

Frotty commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

runWizard(setup, prompt, useInteractiveMenus = generatePrompt == null)

P2 Badge Preserve CLI patch selections in the wizard

When grill generate MyMap --wc3-patch v1.32 (or an exact Reforged-* dump) is run in an interactive terminal, this new unconditional wizard path sends the existing CLI patch into selectPatchVersion, but the interactive menu only contains recommended entries and falls back to default index 0 when the current patch is not recommended. Pressing Enter therefore silently overwrites the explicit CLI wc3Patch with v2.0; include the current/default patch in the menu choices as the text prompt does so named-project generation keeps the selected wc3Patch.

AGENTS.md reference: AGENTS.md:L33-L34

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Frotty commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 52b83ccd56

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/main/kotlin/file/SetupApp.kt

Frotty commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 66311960cb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/main/kotlin/file/SetupApp.kt

Frotty commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 639e02c604

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/main/kotlin/file/SetupApp.kt

Frotty commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 74168ebade

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/main/kotlin/file/SetupApp.kt Outdated
versions = patchTargets,
prompt = prompt,
exactVersions = versions
exactVersions = emptyList()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 Badge Keep exact browsing available from patch list

When the user types more and then exact in the text patch picker, this branch passes an empty list as exactVersions, but browsePatchVersions still treats exact as a command and recurses with that empty list, so the raw jass-history dump browser can no longer be reached from the supported-patch page. Pass the lazy fetched exact list here so users do not have to back out to the top-level prompt to browse raw dumps.

Useful? React with 👍 / 👎.

Frotty commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

runWizard(setup, prompt, useInteractiveMenus = generatePrompt == null)

P2 Badge Fall back to text prompts outside a TTY

When a project name is already supplied but the wizard input is piped or otherwise has no console, this now continues into runWizard with useInteractiveMenus = true. In that environment TerminalMenu.choose returns null, and selectPatchVersion treats that as cancel/default before reading from prompt, so a flow like printf 'jass\npre1.29\nnone\n...' | grill generate MyProject consumes jass for script mode, silently leaves wc3Patch at the default, then shifts pre1.29 into the Warcraft path prompt. Gate interactive menus on TerminalMenu.canUseInteractive() or fall back to the text patch prompt when menus cannot run.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Frotty commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0e7f06dbed

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/main/kotlin/file/SetupApp.kt
versions = patchTargets,
prompt = prompt,
exactVersions = versions
exactVersions = exactVersions

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 Badge Keep supported patch browsing offline

When the user types more, this argument evaluates the lazy exactVersions before browsePatchVersions can show the bundled supported patch list, so the supported-target browser still performs the raw jass-history GitHub lookup even if the user never asks for exact. In offline or slow-network sessions this stalls/warns before a local list that should be immediately available; pass a lazy provider and fetch only if exact is selected inside the browser.

Useful? React with 👍 / 👎.

Frotty commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: f85acac713

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Frotty
Frotty merged commit 5784151 into master Aug 5, 2026
1 check passed
@Frotty
Frotty deleted the agent/generate-name-wizard branch August 5, 2026 10:45
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