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 code related to the installer and navigation flow.
The issue is about the
gentle-piinstaller fromgentle-ai. When selecting onlyPias the installation target and then usingBack, the installer shows unrelated configuration screens (TDD, multi-agent, communication style, etc.) instead of going back to the installation target selection.Let me explore the repository structure first.
Assistant
This is a Go project. Let me explore the structure more, particularly looking for installer-related code.
Assistant
Let me look for the installer-related code. The issue mentions "gentle-pi" installer. Let me search for Pi-related code and installer flow.
Assistant
Let me look at the TUI screens and router to understand the navigation flow.
Assistant
Let me look at the router and model to understand the navigation flow.
Assistant
Let me look at the router and model to understand the navigation flow
Assistant
Now let me look at the agents screen and the model to understand the Pi-only flow:
Assistant
Let me look at the model to understand how Pi-only installation flow works
Assistant
Let me look at the
isPiOnlyAgentsfunction and surrounding code:Assistant
Let me search for the
isPiOnlyAgentsfunction andpiOnlyComponents:Assistant
Let me look at key areas of the model - the agent selection and back navigation:
Assistant
Let me look at how the DependencyTree back navigation works:
Assistant
Let me look at the handleBack for ScreenDependencyTree around line 1758.
Assistant
Let me continue reading:
Assistant
Let me look at the
goBackfunction:Assistant
Let me look at the
goBackfunction to understand the general back navigation.Assistant
Let me continue reading the goBack function:
Assistant
Let me check the
shouldShowStrictTDDScreen,shouldShowClaudeModelPickerScreen, andshouldShowSDDModeScreenfunctions:Assistant
Let me look at these functions to understand what flows they trigger:
Assistant
Now let me look at the other functions:
Assistant
Let me look at
piOnlyComponents()andisPiOnlyAgents:Assistant
Now I understand the issue. Let me trace through the flow:
- User selects only Pi →
isPiOnlyAgentsreturns true - Pi-only path skips: Persona, Preset, SDDMode, StrictTDD, ClaudeModelPicker — goes directly from ScreenAgents → ScreenDependencyTree
- When Back is pressed at ScreenDependencyTree,
goBack()andconfirmSelection()both default toScreenPreset(or try StrictTDD/ClaudeModelPicker), which are unrelated screens
The fix: when
isPiOnlyAgentsis true, Back from ScreenDependencyTree should go to ScreenAgents.Let me also check the
confirmSelectionhandler for ScreenDependencyTree more carefully to understand the exact cursor positions:- User selects only Pi →
Assistant
Now let me also check if there are tests for this back navigation:
Assistant
Let me look at the PiOnly tests to understand expected
Assistant
Now I have a clear understanding. Let me implement the fix in both places.
First, let me fix
goBack()- the DependencyTree back block:Assistant
The open command doesn't accept "line_number", let me use it without.
Assistant
Let me check the correct syntax for the open command. The description says: "open [OPTIONS] [FILE] [LINE_NUMBER]". Let me try with quotes.
Assistant
Now let me look at the confirmSelection handler for ScreenDependencyTree:
Assistant
Let me view the confirmSelection for DependencyTree:
Assistant
Let me find the end of the goBack function:
Assistant
The goBack function spans from line 2321 to before line 3003. Let me find the end:
Assistant
Let me find the fallback at the end of goBack:
Assistant
Let me search for the linear routes fallback at the end of goBack:
Assistant
Let me look at the end of goBack around line 2584:
Assistant
Now I have the full picture. The fix needs to be applied in two places:
goBack()function (around line 2436-2450): Add a check for Pi-only agents to go back to ScreenAgentsconfirmSelection()for ScreenDependencyTree (around lines 1804-1822): Add the same check
Let me implement both fixes:
Assistant
Let me use the replace command instead:
Assistant
Let me use the proper multi-line syntax:
Assistant
Let me try using the heredoc syntax for the edit command:
Assistant
Now let me fix the second place -
confirmSelection()for ScreenDependencyTree:Assistant
Now let me edit the confirmSelection back logic for ScreenDependencyTree:
Assistant
There seems to be an extra closing brace. Let me verify the current state:
Assistant
I see there's an extra
}at line 1826. Let me remove it:Assistant
I need to remove the extra
}at line 1826:Assistant
Let me verify the fix looks correct now:
Assistant
Good, the confirmSelection is fixed. Now let me also verify the goBack fix:
Assistant
Both fixes look correct. Let me now compile to check for syntax errors and run the tests:
Assistant
Let me set up the Go environment:
Assistant
Let me set up the full Go environment:
Assistant
The code compiles. Now let me run the tests:
Assistant
All tests pass. Now let me run the full test suite for the tui package:
Assistant
All tests pass. Let me also run all the tests across the whole project to make sure nothing is broken:
Assistant
There's a FAIL. Let me see which package failed
Assistant
The failure is in
internal/apppackage due to timeout (120s). Let me check if this is pre-existing and not related to my changes:Assistant
The app tests pass individually - the timeout was likely due to parallel execution. My changes are in
internal/tui/model.gowhich has all tests passing. Let me verify my changes one final time:Assistant
The diff looks clean and correct. Let me run the Pi-specific tests one more time
Assistant
All tests pass. Let me also write a quick script to validate the fix works for the exact scenario described in the bug
Assistant
Let me look at existing test patterns to write a quick verification:
Assistant
The fix is complete and correct. Let me clean up the temporary file
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 →