Add version catalog flag and interactive setup option for new projects#47
Add version catalog flag and interactive setup option for new projects#47StephenBrough wants to merge 1 commit intoktorio:mainfrom
Conversation
WalkthroughThis PR introduces a new VersionCatalog boolean feature across the application. It adds a command-line flag, CLI argument processing, interactive UI checkbox, state management, project generation parameter, and internationalization support for using Gradle version catalog dependency management. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@internal/app/interactive/entry.go`:
- Around line 273-278: The Enter handler currently toggles mdl.VersionCatalog
and returns early inside the case for draw.VersionCatalogCheckbox, preventing
the later switch that sets PluginsShown and advances focus; remove the early
return in the Enter branch so that after flipping mdl.VersionCatalog execution
falls through to the subsequent switch (the same Enter handler handling
draw.Tabs) which will set PluginsShown and update drawState.ActiveElement to
advance focus.
| case key == tcell.KeyEnter && mod == tcell.ModNone: | ||
| if drawState.ActiveElement == draw.Tabs { | ||
| switch drawState.ActiveElement { | ||
| case draw.VersionCatalogCheckbox: | ||
| mdl.VersionCatalog = !mdl.VersionCatalog | ||
| return | ||
| case draw.Tabs: |
There was a problem hiding this comment.
Enter on the VersionCatalog checkbox doesn’t advance.
The early return means users can’t continue with Enter and must use Tab, which breaks the otherwise “Enter-to-advance” flow. If advancing is intended, drop the return to let the subsequent switch set PluginsShown and move focus.
🛠️ Suggested tweak
case draw.VersionCatalogCheckbox:
mdl.VersionCatalog = !mdl.VersionCatalog
- return📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| case key == tcell.KeyEnter && mod == tcell.ModNone: | |
| if drawState.ActiveElement == draw.Tabs { | |
| switch drawState.ActiveElement { | |
| case draw.VersionCatalogCheckbox: | |
| mdl.VersionCatalog = !mdl.VersionCatalog | |
| return | |
| case draw.Tabs: | |
| case key == tcell.KeyEnter && mod == tcell.ModNone: | |
| switch drawState.ActiveElement { | |
| case draw.VersionCatalogCheckbox: | |
| mdl.VersionCatalog = !mdl.VersionCatalog | |
| case draw.Tabs: |
🤖 Prompt for AI Agents
In `@internal/app/interactive/entry.go` around lines 273 - 278, The Enter handler
currently toggles mdl.VersionCatalog and returns early inside the case for
draw.VersionCatalogCheckbox, preventing the later switch that sets PluginsShown
and advances focus; remove the early return in the Enter branch so that after
flipping mdl.VersionCatalog execution falls through to the subsequent switch
(the same Enter handler handling draw.Tabs) which will set PluginsShown and
update drawState.ActiveElement to advance focus.
Added a
--version-catalogflag to thenewcommand. Also added a checkbox as part of the interactive setup.Adding dependencies to an existing project with the version catalog appears to still work as well.