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 find the installer-related files.
Assistant
This is a Go project. Let me explore the structure to find the installer code.
Assistant
Let me look at the installer command and TUI model files more closely:
Assistant
This is a large file. Let me search for "Back" navigation and "Pi" related code:
Assistant
Let me look at the screen definitions and navigation flow:
Assistant
Now I can see the screens. Let me search for the "Back" navigation handling in the Update function:
Assistant
Let me look for the actual "Back" button/key handling:
Assistant
Let me look at the
goBackfunction in detail:Assistant
Let me continue reading the
goBackfunction to see the linear routes handling:Assistant
Now let me look at the
PreviousScreenfunction andlinearRoutesto understand the back navigation:Assistant
I need to use the correct syntax for the open command. Let me fix the argument names.
Assistant
Now I understand the structure. The
linearRoutesdefines the navigation flow. Let me look at what happens when the user selects "Pi" only as the agent and then navigates. I need to find where the Pi-only installation flow is handled.Assistant
Let me look at the
isPiOnlyAgentsandpiOnlyComponentsfunctions and the context around line 1489:Assistant
Now let me look at the context around line 1489 where Pi-only agents set the components:
Assistant
Now I can see the issue. When the user selects only
Pias the agent (line 1489-1493), the flow goes directly toScreenDependencyTreeviam.setScreen(ScreenDependencyTree).But when the user presses Back from
ScreenDependencyTree, thegoBack()function at line 2425-2435 handles the back navigation fromScreenDependencyTree. Let me look at that part more closely:Assistant
Let me understand what the shouldShow functions return for Pi-only and how the flow works:
Assistant
Now I understand the problem. When the user selects only
Pi:- The flow goes:
ScreenAgents→ScreenDependencyTree(skipping Persona, Preset, etc.) - The
Selection.Presetis NOT set at this point (it would be the default/zero value) - When pressing Back from
ScreenDependencyTree, thegoBack()function checksm.Selection.Preset != model.PresetCustom(which is true since Preset is empty/zero) - Then it checks
shouldShowOpenCodePluginsScreen(),shouldShowStrictTDDScreen(),shouldShowClaudeModelPickerScreen()which all depend on SDD component being selected - Since Pi-only only selects
ComponentEngram, none of these conditions match, so it falls through to the defaultPreviousScreen()lookup - In
linearRoutes,ScreenDependencyTreehasBackward: ScreenPresetwhich leads to the Preset screen and then the rest of the Gentle AI configuration flow
The fix should ensure that when Pi-only agents are selected and the user goes back from
ScreenDependencyTree, it returns toScreenAgentsinstead of following the normal linear routes.Let me first look at what test might exist for this scenario:
- The flow goes:
Assistant
Let me look at the existing Pi-only test to understand the expected behavior:
Assistant
Good. Now I understand the test case confirms the Pi-only flow goes to
ScreenDependencyTree. But the back navigation fromScreenDependencyTreein a Pi-only flow should go back toScreenAgents, not to the regular flow.Let me look at the
goBack()function more carefully to see where the fix should go:Assistant
Now I understand the issue. When
ScreenDependencyTreeis the current screen and the preset is notPresetCustom, it checks several conditions. If none of them match (like in the Pi-only case where SDD is not selected), it falls through to the defaultPreviousScreen()lookup, which returnsScreenPreset.The fix should add a check for Pi-only agents before the generic conditions. When Pi-only is selected and the user goes back from
ScreenDependencyTree, it should return toScreenAgents.Let me add this fix:
Assistant
I need to add a check for Pi-only agents at the beginning of the
ScreenDependencyTreeblock. When Pi-only agents are selected, going back should return toScreenAgents.Assistant
I need to add a check for Pi-only agents in the
ScreenDependencyTreeback navigation. Let me apply the fix:Assistant
I made an error with the edit command syntax. Let me fix it with the correct LINE_RANGE format.
Assistant
I need to use the correct syntax for the edit command. Let me check the correct format.
Assistant
I need to use the edit command with the correct syntax. Let me first open the file, then use the edit command.
Assistant
It seems the tool calls are not being parsed correctly. Let me try the correct format without the FILE and LINE_NUMBER as separate JSON arguments.
Assistant
The fix has been applied. The
\nwas interpreted literally in the sed output. Let me check if the file is syntactically correct and properly formatted:Assistant
command> export HOME=/root && export GOPATH=/root/go && export GOMODCACHE=/root/go/pkg/mod && export GOCACHE=/root/.cache/go-build && cd /gentle-ai && go build ./... </antml:command>
Assistant
Good, the code compiles. Now let me run the existing tests to make sure the fix doesn't break anything:
Assistant
All Pi-related tests pass. Now let me also run the broader TUI tests to make sure nothing is broken:
Assistant
All tests pass. Now let me create a test script to verify that the fix works correctly for the Pi-only back navigation scenario:
Assistant
Internal packages can't be imported from outside. Let me create the test as a Go test file inside the project:
Assistant
Both tests pass. Now let me remove the test file I created (since I shouldn't modify tests) and run all existing tests to make sure nothing is broken:
Assistant
All tests pass. Let me also run a broader set of tests to ensure the fix doesn't break anything elsewhere in the codebase:
Assistant
The full test suite is taking too long. Let me just run the key related tests to make sure everything is working:
Assistant
All tests pass. Let me verify my change one more time by viewing the modified section:
Assistant
mlet me verify the change is correct by viewing the git diff:
<tool_call> <function=bash_terminal> <parameter=command> cd /gentle-ai && git diff </tool_call>
Assistant
I need to use the bash_terminal function to run the git diff command.
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 →
- 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 →