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
git checkout <file>to restore the file to its original state. You can also reset all changes in the repository usinggit reset --hardcommand. Additionally, you can usegit stashandgit stash popto temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you callsubmit) usinggit statusorgit diffcommands. However you don't need to usegit addorgit commitbefore submitting your changes. In fact,submitonly submits currently unstaged changes because it usesgit diffto get the changes that need to be submitted.CHECKLIST
Before submitting your solution, please go over the following checklist and make sure you've done everything:
- If an error was reported in the issue description, I have successfully reproduced it.
- If an error was reported in the issue description, I have confirmed that my fix resolves the error.
- I have thought about edge cases and made sure my fix handles them as well.
- I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass. I want you to list every bullet from this checklist and write your reasoning for why you think you did it or didn't need to.
Repository has been uploaded and your shell is currently at the repository root. Time to solve the issue!
(Current directory: /gentle-ai, current file: none) bash-$
Assistant
Let me start by understanding the repository structure and the issue. The issue is about a back navigation bug in the installer for
gentle-ai. When selecting only "Pi" as the installation target and then going back, it shows unrelated Gentle AI configuration screens instead of going back to the installation target selection.Let me explore the repository structure first.
Assistant
This is a Go project. Let me look at the structure more closely, especially the
cmdandinternaldirectories.Assistant
Let me explore one at a time.
Assistant
Let me look at the cmd/gentle-ai and internal directory structure.
Assistant
Let me look at the internal directory.
Assistant
The issue is about the installer. Let me explore the
installcmddirectory, which likely contains the installerAssistant
Let me explore the TUI and CLI directories since the installer likely has a UI component
Assistant
Let me explore the screens directory and then look at the relevant model code
Assistant
Let me look at the CLI directory and the model.go for navigation flow.
Assistant
Let me search for references to "Pi" installation and back navigation in the codebase.
Assistant
Let me search for "Back" navigation and "Pi" references in the model.go file
Assistant
Let me find the
isPiOnlyAgentsfunction and understand the backAssistant
Let me look at the navigation flow around line 1489 and the Pi-only functions.
Assistant
Now let me look at the back navigation from ScreenDependencyTree and the overall back navigation logic.
Assistant
Let me look at the back navigation logic for ScreenDependencyTree at line 1758
Assistant
Let me look at the DependencyTree screen code to understand the options presented.
Assistant
Let me look at the
shouldShow*methods and thegoBackfunction to understand the full back navigation logic.Assistant
Let me look at the
goBackfunction and theshouldShow*methods.Assistant
Let me continue viewing the goBack function.
Assistant
Now let me look at the key functions:
isPiOnlyAgents,piOnlyComponents, and theshouldShow*methods.Assistant
Let me see the remaining shouldShow methods
Assistant
Let me check what happens after the
goBackDependencyTree block falls throughAssistant
Let me look at the general back navigation (linear routes) that would handle the fallthrough
Assistant
Let me look at the rest of the goBack function after line 2530.
Assistant
Let me look at the router.go file which likely defines
PreviousScreenAssistant
Now I understand the issue completely. Let me trace the flow:
- When Pi-only agents are selected on ScreenAgents, the code at line 1489-1493 directly jumps to ScreenDependencyTree, skipping Persona, Preset, and all other configuration screens.
- When the user presses Back from ScreenDependencyTree, both the Enter handler (
confirmSelection) at line 1804-1823 and the Esc handler (goBack) at line 2436-2450 don't account for the Pi-only path. They try to go back to StrictTDD, SDDMode, ClaudeModelPicker, or Preset — none of which were shown.
Let me look at the relevant test file for the preset flow and understand the expected behavior.
Assistant
Let me search for existing tests related to Pi-only or the DependencyTree back navigation
Assistant
Let me look at the Pi-only navigation test to understand the expected behavior
Assistant
Now I have a clear understanding of the bug. Let me look at the exact lines to fix in both the
confirmSelectionandgoBackmethods.In
confirmSelectionat lines 1798-1823, when the user presses "Back" (Cursor == 1) from DependencyTree in a Pi-only flow, the code falls through tom.setScreen(ScreenPreset)- a screen that was never shown.In
goBackat lines 2436-2450, the same issue: for Pi-only, all shouldShow conditions are false, and it falls through toPreviousScreen(ScreenDependencyTree)which returnsScreenPreset.The fix: In both locations, if
isPiOnlyAgentsis true, go back toScreenAgentsinstead.Let me also check
goBackto see what exactly happens after the DependencyTree block falls through.Assistant
Now I have a clear picture. Let me fix both locations. First, let me fix the
confirmSelectionmethod in theScreenDependencyTreecase.Assistant
Good, the first fix is in place. Now let me fix the
goBackfunction. Let me check the current line numbers after the edit.Assistant
Let me find the goBack DependencyTree block now
Assistant
Let me view the goBack block around line 2438
Assistant
Now let me fix the
goBackfunction by adding the Pi-only check to the DependencyTree back navigationAssistant
Let me also check the back navigation from ScreenReview for the Pi-only case, since that's also part of the flow
Assistant
Let me check the goBack function's ScreenReview handling
Assistant
Let me check the goBack ScreenReview handling
Assistant
Now let me compile the code to make sure everything is correct
Assistant
Let me set up the Go environment first
Assistant
Let me set all required Go environment variables
Assistant
The code compiles. Now let me run the relevant tests
Assistant
Good. Let me run all TUI tests
Assistant
All TUI tests pass! Let me also run the preset flow tests and the install tests
Assistant
Let me also run all tests to make sure nothing is broken
Assistant
The full test suite is timing out. Let me verify just the key packages. The TUI tests already passed. Let me check the diff to confirm my changes are correct.
Assistant
The diff looks clean and correct. Let me verify my changes handle all cases properly:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
Qwen/Qwen3.6-27BCompare side by side →
Qwen/Qwen3.6-27BCompare side by side →
Qwen/Qwen3.6-27BCompare side by side →
Qwen/Qwen3.6-27BCompare side by side →
- xiaomi/mimo-v2.5-proCompare side by side →
- xiaomi/mimo-v2.5-proCompare side by side →
- xiaomi/mimo-v2.5-proCompare side by side →
- xiaomi/mimo-v2.5-proCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-lunaCompare side by side →
- gpt-5.6-lunaCompare side by side →
- gpt-5.6-lunaCompare side by side →