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.
Assistant
Let me start by exploring the repository structure to understand the codebase and find the relevant installer files.
Assistant
Let me search for the installer flow, specifically looking for "gentle-pi" or "Pi" related installer code, and navigation/back functionality.
Assistant
Let me look at the model.go file more, specifically the section that handles navigation and the Pi-only flow. Let me search for "Pi" and "AgentPi" in the model.go and the screen flow.
Assistant
Let me look at the navigation logic. Let me look at the section handling forward navigation from ScreenAgents and the Pi-only flow, and the goBack function.
Assistant
Now let me look at the goBack function to understand the back navigation from the dependency tree.
Assistant
Now I understand the structure. Let me look at the
shouldShow*functions andpiOnlyComponents.Assistant
Assistant
So PresetID for Pi-only path is "" (empty).
PresetCustomis "custom". Som.Selection.Preset != model.PresetCustomis true (empty != "custom").So goBack() enters the
if m.Screen == ScreenDependencyTree && m.Selection.Preset != model.PresetCustomblock. None of shouldShow* match for Pi-only (only ComponentEngram, only Pi agent). So it falls through toPreviousScreen(m.Screen)= ScreenPreset.So pressing Back from dependency tree in Pi-only flow goes to ScreenPreset — wrong! It should go to ScreenAgents. Let me confirm by checking the forward path and the preset screen rendering.
Assistant
Let me look at existing tests related to Pi-only navigation to understand the test setup.
Assistant
Now let me write a reproduction test to confirm the bug. Let me check how the back navigation is triggered.
Assistant
Now let me write a reproduction test.
Assistant
The bug is reproduced. Screen after back = 5 (ScreenPreset), want 3 (ScreenAgents).
Now let me fix the goBack() function. I'll add a Pi-only check at the start of the DependencyTree back logic block.
Assistant
The fix works. Now let me also check the
confirmSelection()function which has parallel back logic for DependencyTree, to make sure it's consistent.Assistant
The confirmSelection for ScreenDependencyTree (non-custom) has a "Back" branch too, which has the same bug. Let me fix that for consistency.
Assistant
Now let me extend the repro test to test both Esc and the Back row via Enter (confirmSelection path).
Assistant
So for non-custom, Cursor 0 = Continue, Cursor 1 = Back. Let me update the repro test to test both Esc and Back row (Cursor=1, Enter).
Assistant
Both pass. Now let me run the full tui test suite to make sure I didn't break anything.
Assistant
Let me run a broader set of tests to ensure nothing else broke, especially cli and installcmd.
Assistant
All tests pass. Now let me remove the temporary repro test file before submitting.
Assistant
Let me build the whole project to make sure it compiles.
Assistant
The build succeeds. Let me do a final full test run of the tui package to confirm everything is green after removing the repro test.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.