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 exploring the repository structure to understand the codebase and then find the relevant installer code that handles the Pi-only installation back navigation issue.
Assistant
The find command seems to not have produced output. Let me try a different approach.
Assistant
This is a Go project. Let me explore the structure further, especially the
cmdandinternaldirectoriesAssistant
Let me look at the key files related to the installer flow and navigation.
Assistant
The issue is with my tool call format. Let me fix it.
Assistant
Let me look at the model and the agents screen to understand the flow.
Assistant
Let me look at the agents screen and the preset screen to understand the flow logic:
Assistant
Let me run these one at a time.
Assistant
Now let me look at the preset.go screen and persona.go to understand the flow.
Assistant
Let me look at the model.go file more carefully, focusing on the Update function and screen
Assistant
Let me look at the specific sections of model.go around those lines
Assistant
Let me find the
isPiOnlyAgentsandpiOnlyComponentsfunctionsAssistant
Let me look at the screen transition logic and the Pi-only functions
Assistant
Let me look at the
goBackfunction in model.goAssistant
Let me look at the
goBackfunctionAssistant
Let me continue reading the goBack function.
Assistant
Let me continue reading the goBack function to see the remaining logic.
Assistant
Let me look at the
piOnlyComponentsandshouldShowfunctionsAssistant
Let me look at the
shouldShowfunctionsAssistant
Let me look at these shouldShow functions.
Assistant
Let me look at how the back/escape key is handled for ScreenDependencyTree
Assistant
Let me look at the key handling for back navigation more broadly
Assistant
Let me look at the
confirmSelectionfunction as well to see all the navigation logic.Assistant
Let me confirm the full goBack function doesn't have Pi-only handling
Assistant
Now I have a clear understanding of the issue. Let me look at the exact area in
goBackwhere the DependencyTree back navigation is handled and createAssistant
Let me also check the "enter" key handling for the dependency tree screen, specifically how the "Back" button works:
Assistant
Let me find where ScreenDependencyTree is handled in the confirmSelection or enter key logic:
Assistant
Let me look at line 1758 for the DependencyTree "enter" handler.
Assistant
Let me continue reading the back logic in confirmSelection
Assistant
Now I have a clear understanding of the bug. Let me create a temporary test script to confirm the behavior and then fix it.
The issue is in two places:
goBack()- when pressing Escape on ScreenDependencyTreeconfirmSelection()- when pressing Enter on "Back" button on ScreenDependencyTree
Both should navigate back to
ScreenAgentswhen Pi is the only selected agent, instead ofScreenPreset.Let me first look at the existing tests to understand the patterns:
Assistant
Let me look at the model_test.go for any existing Pi-only tests:
Assistant
Let me look at the existing Pi-only tests:
Assistant
Now I understand the issue completely. Let me implement the fix. The bug is in two places:
goBack()function - pressing Escape on ScreenDependencyTree navigates to ScreenPreset instead of ScreenAgents for Pi-onlyconfirmSelection()function - pressing Enter on "Back" button on ScreenDependencyTree navigates to ScreenPreset instead of ScreenAgents for Pi-only
Let me fix both:
Fix 1:
goBack()- add Pi-only check after the DependencyTree back handling blockAssistant
Let me fix that:
Assistant
Now let me apply the first fix in
goBack(). I'll add Pi-only check after the ClaudeModelPicker checkAssistant
The file was opened automatically. Let me use goto to go to line 2446 and then apply the edit.
Assistant
Now let me apply the first fix in
goBack()Assistant
Now let me fix the second place in
confirmSelection(). Let me find the exact lines.Assistant
Now let me apply the second fix in
confirmSelection()Assistant
Both fixes are applied. Now let me run the existing tests to make sure the changes work correctly.
Assistant
Let me check the Go environment
Assistant
Let me set up the Go module cache
Assistant
Good. Now let me run the Pi-only tests:
Assistant
Let me set up the remaining Go environment variables
Assistant
All Pi-related tests pass. Let me now run the full test suite to make sure nothing is broken.
Assistant
Let me check the full test output summary:
Assistant
All tests pass. Let me also run the broader test suite to be safe
Assistant
Let me run just the most relevant tests - the TUI package which we already confirmed passes. Let me also run the CLI tests:
Assistant
All tests pass. Let me verify the changes I made by checking the diff:
Assistant
The changes look correct and minimal. Let me verify the logic once more:
For
goBack()(Escape key):- Pi-only on DependencyTree → falls through
shouldShowOpenCodePluginsScreen,shouldShowStrictTDDScreen,shouldShowClaudeModelPickerScreen(all false for Pi-only) → hits newisPiOnlyAgentscheck → returns toScreenAgents✓
For
confirmSelection()(Enter on Back button):- Same chain → hits new
isPiOnlyAgentscheck → returns toScreenAgents✓
Edge cases:
- Pi + other agents:
isPiOnlyAgentsreturns false, normal flow preserved ✓ - Normal multi-agent flow:
isPiOnlyAgentsreturns false, normal flow preserved ✓
Let me also verify there are no compilation errors by building the package
- Pi-only on DependencyTree → falls through
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 →