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.Interface
No new interfaces are introduced.
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
I'll start by exploring the repository structure to understand the codebase and find the relevant installer code.
Assistant
Let me find where the "Pi" installation target is selected. Let me search for "Pi" in the agents screen.
Assistant
Let me look at the Pi-only flow. Let me look at line 469 and surrounding context, and the isPiOnlyAgents function.
Assistant
Now let me look at the agents screen flow, where Pi selection happens. Let me look at lines around 1489.
Assistant
Now let me look at the Back navigation logic from DependencyTree. Let me look at lines around 2431.
Assistant
Let me find the function that handles this back navigation, to understand the full structure.
Assistant
Let me see the rest of the goBack function to understand where it falls through to linearRoutes.
Assistant
Let me check the ScreenDependencyTree Enter handling for the "Back" option, and the
confirmSelectionfunction.Assistant
Let me check the shouldShow functions to confirm Pi-only skips those screens.
Assistant
For Pi-only flow:
piOnlyComponents()returns[]model.ComponentID{model.ComponentEngram}- only Engram, no SDD.- So
shouldShowStrictTDDScreen()returns false (no SDD component). shouldShowSDDModeScreen()returns false (no OpenCode agent AND no SDD).shouldShowClaudeModelPickerScreen()returns false (no ClaudeCode agent).shouldShowKiroModelPickerScreen()returns false.shouldShowOpenCodePluginsScreen()returns false probably.- The Preset is
PresetFullGentleman(not custom).
So both back paths (goBack via Esc, and handleKeyPress Enter on "Back") fall through to
ScreenPreset. But Pi-only came fromScreenAgentsdirectly toScreenDependencyTree. So back should go toScreenAgents.Let me verify the shouldShowOpenCodePluginsScreen.
Assistant
Let me check the
confirmSelectionfunction since comments mention back logic there too.Assistant
The
confirmSelectionswitch handles different screens butScreenDependencyTreeis handled at line 1758 (withinconfirmSelectionswitch). Wait, actually line 1758 was insideconfirmSelection? Let me check. Actually, line 1758 is withinconfirmSelectionbecauseconfirmSelectionstarts at 1137 and ScreenDependencyTree is at 1758. Wait butconfirmSelectionis a single switch onm.Screen. Let me re-check - actually the case at line 1758 is part of confirmSelection? No, line 1131 callsm.confirmSelection()and thenconfirmSelectionis a switch. Let me verify where confirmSelection ends.Actually wait, line 1758 "case ScreenDependencyTree:" - is this inside confirmSelection? Let me check. The confirmSelection switch starts at 1138. Let me look more carefully. Actually, the structure: confirmSelection has a
switch m.Screenstarting at 1138. Let me find where it ends.Assistant
Let me look at existing tests related to the Pi-only flow to understand the testing patterns.
Assistant
Let me check the DependencyTree screen options to understand the "Back" option.
Assistant
Now let me write a reproduction test to confirm the bug.
Assistant
Both tests fail, confirming the bug. Let me verify what screen value 5 is.
Assistant
Confirmed: screen 5 is
ScreenPreset. Now let me apply the fix. First, theconfirmSelectionDependencyTree case (Enter on "Back").Assistant
Now let me fix the
goBack()function for the Esc path. Let me view the updated line numbers.Assistant
Now let me run the reproduction tests again to confirm the fix.
Assistant
Both tests pass now. Let me also consider edge cases. Let me check the Review screen Back navigation - when Pi-only, back from Review should also go to DependencyTree (not Preset). Let me check the Review back logic for non-custom.
Assistant
Let me check the goBack for Review (Esc) non-custom path.
Assistant
For Review (non-custom), goBack falls through to
PreviousScreen(ScreenReview)=ScreenDependencyTree, which is correct for Pi-only. Now let me remove the repro test file and run the full tui test suite.Assistant
All tests pass. Let me also run the screens tests and the CLI tests that might be affected.
Assistant
Let me build the whole project to ensure no compile errors.
Assistant
Let me review the final diff.
Assistant
Wait, the diff shows indentation changed. Let me check the actual file around that area to verify correctness.
Assistant
The indentation is now wrong (1 tab instead of 2 tabs inside the case). Go accepts it syntactically, but it's bad style. Let me fix the indentation to match the original 2-tab level.
Assistant
Now the indentation is correct. Let me verify the diff, rebuild, and re-run tests.
Assistant
The diff is clean and minimal. Let me run the full test suite once more to confirm everything passes.
Assistant
Let me ensure gofmt is satisfied with the 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
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-27BCompare side by side →
Qwen/Qwen3.5-35B-A3BCompare side by side →