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
Let me explore the repository structure first to understand the codebase.
Assistant
This is a Go project. Let me explore more.
Assistant
Let me look at the TUI flow and navigation logic.
Assistant
Let me look at the model.go for screen definitions and the agents.go screen (which likely handles the installation target selection).
Assistant
Let me look at the agents screen (installation target selection) and Pi-related handling.
Assistant
Now let me look at the area around line 1489 where the Pi-only agents are handled in the navigation flow.
Assistant
Now I understand the Pi-only flow. Let me look at how Back navigation is handled.
Assistant
I now understand the bug. Let me check the
shouldShow*functions and how Pi-only affects them.Assistant
Let me look at the
confirmSelectionfunction which the NOTE references.Assistant
Let me look at the ScreenDependencyTree forward navigation in confirmSelection to see if there's back logic there too.
Assistant
Now I understand the bug. For Pi-only agents, the flow goes directly from
ScreenAgentstoScreenDependencyTree(line 1489-1495), skipping Persona/Preset/SDD/TDD screens. But when pressing Back onScreenDependencyTree, none of theshouldShow*conditions match for Pi-only (since Pi-only only has the Engram component, no SDD), so it falls through to the defaultPreviousScreen→ScreenPreset, which is the unrelated Gentle AI configuration.The fix needs to be applied in two places (as the NOTE says to keep them in sync):
goBack()andconfirmSelection(). Let me look at the exact back block ingoBack().Assistant
Now let me make the fix in
goBack(). I'll add Pi-only handling before the existing ScreenDependencyTree block.Assistant
Now let me update the
confirmSelection()back block for ScreenDependencyTree.Assistant
Let me also check the ScreenReview back navigation for Pi-only to ensure consistency.
Assistant
The ScreenReview back goes to ScreenDependencyTree for non-custom, which is correct for Pi-only. Now let me build the project to verify it compiles.
Assistant
Build succeeds. Now let me run the existing TUI tests to make sure nothing breaks.
Assistant
All tests pass. Now let me write a reproduction script to confirm the fix works.
Assistant
Let me look at existing tests related to Pi-only to understand the test setup.
Assistant
Let me see how the goBack tests work and find helper functions like
screensAgentOptions.Assistant
Let me look at an existing back-navigation test to understand how Esc is simulated.
Assistant
Let me check how the dependency tree back option works (cursor position) for the non-custom preset.
Assistant
Now let me write a reproduction test to confirm the fix works for both Esc and the "Back" option (Enter).
Assistant
Both reproduction tests pass. Let me confirm they would have failed before my fix by reverting temporarily and re-running.
Assistant
Confirmed: before the fix, both tests failed (screen = 5 = ScreenPreset). After the fix, they pass (ScreenAgents). Now let me remove the temporary test file and run the full test suite.
Assistant
Let me also run the broader test suite to make sure nothing else breaks.
Assistant
The full suite timed out (likely network/slow tests). Let me run the packages directly relevant to my change.
Assistant
All relevant tests pass. Let me review my final diff.
Assistant
The fix is complete and verified. Let me review the final checklist:
Checklist
-
[x] If an error was reported in the issue description, I have successfully reproduced it. I created reproduction tests simulating the Pi-only flow and pressing Back (both via Esc and the "Back" option) on
ScreenDependencyTree. Before my fix, both tests failed — navigation went toScreenPreset(value 5), the unrelated Gentle AI configuration screen. -
[x] If an error was reported in the issue description, I have confirmed my fix resolves the error. After the fix, both reproduction tests pass — Back navigation now correctly returns to
ScreenAgents(the installation target selection screen). -
[x] I have thought about edge cases and made sure my fix handles them as well.
- Pi-only via both Esc and Enter-on-"Back" paths are handled (both
goBack()andconfirmSelection()were updated, as the in-code NOTE requires them to stay in sync). - Pi combined with other agents is unaffected:
isPiOnlyAgentsreturns false, so the existing generic flow (Persona/Preset/SDD/TDD screens) is preserved. - Forward flow for Pi-only (ScreenAgents → ScreenDependencyTree) is untouched.
- Review→DependencyTree→Agents chain remains correct.
- Custom-preset guard (
m.Selection.Preset != model.PresetCustom) is preserved; Pi-only usesPresetFullGentleman, so the new check correctly applies.
- Pi-only via both Esc and Enter-on-"Back" paths are handled (both
-
[x] I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass. Ran
go teston./internal/tui/,./internal/tui/screens/, and./internal/installcmd/— all pass. The build (go build ./...) also succeeds. Temporary reproduction test files were removed before submission.
-
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 →