ISSUE DESCRIPTION fix(installer): back navigation from Pi-only install shows unrelated…
- User
ISSUE DESCRIPTION
fix(installer): back navigation from Pi-only install shows unrelated Gentle AI configuration
Pre-flight Checklist
- I have searched existing issues and this is not a duplicate
- I understand that PRs will be rejected if the linked issue does not have
status:approved
📝 Bug Description
When running the
gentle-piinstaller fromgentle-ai, if I select onlyPias the installation target and then useBackon the next step,
the installer returns to an unexpected configuration flow.Instead of going back to the previous installation target selection, it shows configuration options that do not correspond to the selected
Pi-only path, such as TDD configuration, multi-agent installation, communication style, and related Gentle AI setup options.🔄 Steps to Reproduce
- Start the
gentle-aiinstaller.
2. Select onlyPias the installation target.
3. Continue to the next step.
4. SelectBack.
5. Observe that the installer shows configuration screens for TDD, multi-agent setup, speaking style, etc.
✅ Expected Behavior
After selecting
Back, the installer should return to the previous relevant step in the Pi-only installation flow, likely the installation
target selection screen.❌ Actual Behavior
The installer jumps to unrelated Gentle AI configuration screens, including TDD setup, multi-agent installation, communication style, and other
options that were not expected after choosing a Pi-only installation.Gentle AI Version
v 1.30.5
Operating System
macOS
AI Agent / Client
Other
📋 Affected Area
CLI (commands, flags)
💡 Logs / Error Output
No logs available. This appears to be an installer navigation/state-flow issue.Additional Context
This happens specifically when selecting only
Piduring installation and then navigating back from the following step.ADDITIONAL ADVICE
Since you are given a git repository, you can use git commands to simplify your work. For example, if you made a mistake and want to revert your changes, you can use to restore the file to its original state. You can also reset all changes in the repository using command. Additionally, you can use and to temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you call ) using or commands. However you don't need to use or before submitting your changes. In fact, only submits currently unstaged changes because it uses to get the changes that need to be submitted.
Assistant
Let me start by understanding the repository structure and the issue. The issue is about a bug in the
gentle-piinstaller fromgentle-ai. When selecting onlyPias the installation target and then usingBack, the installer shows unrelated Gentle AI configuration screens instead of going back to the previous step.Let me explore the repository structure first.
Assistant
This is a Go project. Let me look at the structure more, especially the
cmdandinternaldirectories.Assistant
I need to make separate calls.
Assistant
Let's look at the cmd/gentle-ai directory and internal directory.
Assistant
Now let's look at the internal directory.
Assistant
The issue is about an installer ("gentle-pi"). Let me look at the installcmd directory since that seems related to installation
Assistant
Let me look at the TUI and CLI directories since they likely contain the installer logic
Assistant
Let me search for references to "Pi" installation in the codebase, and also look at the router and model files.
Assistant
Let me look at the TUI model and router to understand the installation
Assistant
Let me look at the router.go file and understand the navigation
Assistant
Let me look at the router.go file:
Assistant
Let me look at the key parts of model.go, particularly around Pi-only logic and goBack()
Assistant
Let me look at the goBack() function and also the confirmSelection where Pi-only logic is used.
Assistant
Let me look at
isPiOnlyAgents,piOnlyComponents, and theshouldShow*functions.Assistant
Let me look at the shouldShow functions and understand the flow for Pi-only.
Assistant
Let me look at the shouldShow functions and confirmSelection:
Assistant
Let me look at the confirmSelection function to understand how Pi-only affects screen navigation:
Assistant
Let me look at the goBack() function more carefully around the ScreenDependencyTree handling
Assistant
Now I understand the issue clearly. When Pi-only is selected:
- From ScreenAgents, it jumps directly to ScreenDependencyTree (skipping Persona and Preset)
- ScreenDependencyTree's back navigation (via linearRoutes) goes to ScreenPreset
- ScreenPreset shows irrelevant options for Pi-only
The fix should be in the
goBack()function: when Pi-only and on ScreenDependencyTree, go back to ScreenAgents.Let me first reproduce the issue by looking at the test files to understand expected behavior:
Assistant
Let me look at these tests:
Assistant
Now I understand the issue. Let me implement the fix. The problem is in the
goBack()function: whenisPiOnlyAgentsis true and the user is onScreenDependencyTree, pressing Back should go toScreenAgents(where they selected Pi), notScreenPreset.Assistant
I need to add a check after the
ScreenDependencyTree && m.Selection.Preset != model.PresetCustomblock. My fix should go right after line 2448 (after the closing}of that block).Let me look at what comes right after that block:
Assistant
Now I'll add the fix. After the
ScreenDependencyTree && m.Selection.Preset != model.PresetCustomblock, I'll add a Pi-only check:Assistant
I see there's a duplicate block. Let me fix this by looking at the current state and removing the duplicates
Assistant
I need to remove the duplicate lines. The edit duplicated the original content. Let me fix it by removing the duplicate comment and stray brace
Assistant
Still have duplicates. Let me remove lines 2459-2461 (the partial duplicate of the comment block):
Assistant
Good, now the code looks correct. Let me verify the full structure around the changes:
Assistant
Let me check the exact structure more carefully. I think the outer
ifclosing brace might be missingAssistant
The structure looks correct now. Let me verify the code compiles
Assistant
Let me set up Go environment and try again
Assistant
Need to set GOCACHE too.
Assistant
There's a syntax error. Let me check that area
Assistant
Let me check the full goBack function for proper brace matching
Assistant
I can see the issue! The inner
if m.shouldShowClaudeModelPickerScreen()is missing its closing brace. Let me fix thisAssistant
Now I have duplicate Pi-only blocks. Let me remove the duplicate (lines 2459-246
Assistant
Now let me verify it
Assistant
The code compiles. Let me now run the tests related to Pi-only and back
Assistant
Let me run the full test suite for the t
Assistant
All tests pass. Let me also run the full test suite to verify nothing is broken:
Assistant
The only test failure (
TestDefaultVariantsCachePath) is unrelated to my change — it's because the environment doesn't have a proper home directory. My changes ininternal/tuipass.Let me now write a quick script to verify the fix works correctly for the exact issue scenario:
Assistant
Let me verify the fix with a git diff to make sure my changes are clean
Assistant
The diff is clean and shows exactly the fix needed. Let me also verify the fix by reviewing the
confirmSelectionflow for Pi-only:Assistant
Let me run the full test suite one more time to be confident
Assistant
All tests pass. Let me now submit the changes.
Before submitting, let me go through the checklist:
-
If an error was reported in the issue description, I have successfully reproduced it. - Yes, I traced through the code and confirmed that when Pi-only is selected, going Back from ScreenDependencyTree navigates to ScreenPreset (via linearRoutes) instead of ScreenAgents, showing unrelated configuration options.
-
If an error was reported in the issue description, I have confirmed that my fix resolves the error. - Yes, my fix adds a check in
goBack()that whenisPiOnlyAgentsand the current screen isScreenDependencyTree, it navigates back toScreenAgentsinstead of falling through to the linear route. -
I have thought about edge cases and made sure my fix handles them as well. - Yes:
- Pi-only: Back from ScreenDependencyTree → ScreenAgents ✓
- Pi combined with other agents:
isPiOnlyAgentsreturns false, no change in behavior ✓ - Non-Pi agents: no change in behavior ✓
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.