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
shellNo 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. Assistant
Let me start by understanding the repository structure and the issue. The issue is about a
gentle-piinstaller withingentle-ai. When selecting only "Pi" as the installation target and then pressing "Back", the installer shows unrelated Gentle AI configuration screens instead of going back to the previous installation target selection.Let me first explore the repository structure to understand the codebase.
Assistant
This is a Go project. Let me explore the
cmddirectory andinternaldirectory to understand the structure better.Assistant
Let me make separate calls.
Assistant
Let me explore the cmd directory and search for "pi" related installer code
Assistant
Let me look for the installer code. The issue mentions "gentle-pi" installer. Let me search for relevant files.
Assistant
Let me look at the app and installcmd directories, along with searching for "pi" related code.
Assistant
Let me search for "pi" related code and the installer flow
Assistant
Let me look at the TUI screens and the main app.go to understand the installation
Assistant
Let me look at the router and key installer screens
Assistant
Let me look at the agents screen and understand the installer
Assistant
Let me look at app.go to understand the flow logic
Assistant
Let me look at the TUI model
Assistant
Let me search for Pi-specific logic in the code
Assistant
Let me look at the key parts of model.go around the Pi-only flow
Assistant
Let me look at the Pi-only continue and back navigation logic
Assistant
Let me look at how the back navigation works for ScreenDependencyTree
Assistant
Let me look at the back navigation from ScreenDependencyTree (around line 1758)
Assistant
Let me look at the
goBack()functionAssistant
Let me look at the goBack function
Assistant
Let me look at piOnlyComponents and the shouldShow functions
Assistant
Let me look at the piOnlyComponents and shouldShow* functions.
Assistant
Let me look at all the shouldShow* functions
Assistant
Let me look at the shouldShow functions
Assistant
Now I understand the issue. Let me look at the rest of goBack to see where it falls through to
Assistant
Now I clearly understand the issue. Let me also look at how
confirmSelectionhandles ScreenDependencyTree for non-custom preset to see if there's the same issue with the Enter key going back from Review to ScreenDependencyTree.Assistant
Now I have a clear understanding of the issue. When Pi is the only selected agent:
- ScreenAgents → ScreenDependencyTree (skipping Persona/Preset)
- Pressing Back on ScreenDependencyTree should return to ScreenAgents
- But the router says
ScreenDependencyTree.Backward = ScreenPreset, so it goes to ScreenPreset instead
The fix needs to be applied in two places:
goBack()- for Esc keyconfirmSelection()- for the Enter key on "Back" option
Let me first look at the exact lines I need to edit.
Assistant
Now let me look at the confirmSelection for ScreenDependencyTree more carefully
Assistant
Now I'll implement the fix. I need to modify two places:
goBack()- for Esc key on ScreenDependencyTreeconfirmSelection()- for Enter key on "Back" option on ScreenDependencyTree
In both cases, when Pi is the only agent, go back to ScreenAgents instead of ScreenPreset.
Assistant
Let me use the correct edit syntax with heredoc
Assistant
Let me open the file first
Assistant
Good, now let me edit the
goBack()function to add the Pi-only check:Assistant
Good. Now let me fix the
confirmSelection()function for ScreenDependencyTree. Let me find it:Assistant
Let me look at both locations:
Assistant
Let me get more context around line 1620
Assistant
Now let me look at line 1804 area which is the ScreenDependencyTree confirmSelection
Assistant
Let me see the full ScreenDependencyTree block in confirmSelection
Assistant
Now let me edit the confirmSelection for ScreenDependencyTree to add Pi-only handling
Assistant
Now let me verify the changes look correct by checking the surrounding context of both edits
Assistant
Let me also check if there are any other places where Pi-only back navigation might need fixing. Let me check the Review screen back and other screens
Assistant
Now let me run the tests to make sure my changes work
Assistant
Let me set up the Go environment
Assistant
Let me set up the Go environment
Assistant
All Pi-related tests pass. Let me run all tests in the tui package to make sure nothing is broken
Assistant
All TUI tests pass. Let me also run the app tests
Assistant
The app tests timed out. Let me run a quick build check and verify the code
Assistant
The code compiles successfully. Let me verify the changes with git diff
Assistant
Let me verify how the dependency tree screen renders for Pi-only to make sure the Back option makes
Assistant
Let me check the DependencyTreeOptions
Assistant
Let me look at DependencyTreeOptions
Assistant
Let me check the option count for ScreenDependencyTree in model.go
Assistant
The fix looks correct. Let me run the TUI tests one more time to confirm everything
Assistant
All tests pass. Let me do a final build check and verify my changes one more time
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.