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
shellNo 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. Assistant
I'll 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 further.
Assistant
Let me search for the interactive installer flow with "Back" handling.
Assistant
Now let me find the Screen constants and how the flow works, especially around Pi.
Assistant
Let me search for how "Pi" is referenced in the installer flow and the agents screen.
Assistant
Now let me look at how the navigation works, especially the part around
isPiOnlyAgentsand how the forward/back navigation skips screens. Let me look at line 1489.Assistant
Now let me look at how the Back navigation is handled. Let me find where the back key is processed.
Assistant
Let me find the
goBackfunction and how Back is dispatched generally.Assistant
Let me see the rest of
goBackto understand the fallthrough to linearRoutes.Assistant
Let me check the
confirmSelectionfunction which also has DependencyTree back logic.Assistant
Let me find the DependencyTree back logic in confirmSelection.
Assistant
Let me check the
piOnlyComponentsand theshouldShow...functions to understand the Pi-only flow.Assistant
Now I understand the issue. For Pi-only installation, the forward flow goes
ScreenAgents → ScreenDependencyTree, but the Back navigation fromScreenDependencyTreefalls through toScreenPreset(and the unrelated Gentle AI config screens). Let me look at the exact lines to fix.Assistant
Now let me look at the goBack DependencyTree block precisely.
Assistant
Now let me make the fixes. First, the
confirmSelection()ScreenDependencyTree back logic:Assistant
Now let me patch the
goBack()DependencyTree block:Assistant
Let me verify the build compiles.
Assistant
Build succeeds. Now let me write a reproduction/verification test to confirm the fix works.
Assistant
Let me look at existing tests to understand how to construct a Pi-only model for testing.
Assistant
Now let me write a temporary reproduction test to confirm the back navigation fix works.
Assistant
The module path is lowercase. Let me fix the import.
Assistant
The sed didn't replace because the file has the wrong case still? Let me check.
Assistant
The sed pattern used
Gentleman-Programmingbut the file hasGentleman-Programming. Wait, my sed usedGentleman-Programming->gentleman-programming. But it's still showingGentleman-Programming. Hmm, the sed command hads|github.com/Gentleman-Programming/gentle-ai|github.com/gentleman-programming/gentle-ai|g. But the grep shows it's still uppercase.Oh wait, maybe the sed didn't match because... actually it should have matched. Let me just rewrite the file.
Assistant
Weird, sed isn't changing. Maybe there's some non-printing character. Let me just recreate the file.
Assistant
The test passes with my fix. Let me confirm the test would have failed without the fix by temporarily reverting.
Assistant
Confirmed: without the fix, the test fails (screen = 5 = ScreenPreset, want 3 = ScreenAgents). Now let me run the broader TUI test suite to ensure I didn't break anything.
Assistant
All TUI tests pass. Now let me clean up the temporary test file and run a wider test sweep on potentially affected packages.
Assistant
The cli failure is environment-related (PATH/go-bin guidance), unrelated to my change. Let me confirm it fails on the unmodified repo too.
Assistant
Confirmed pre-existing and unrelated to my change. Let me review the final diff.
Assistant
The fix is clean and minimal, handling both the Esc (
goBack) and Enter-on-Back (confirmSelection) navigation paths. Let me run the related Pi-only test once more to be safe.Assistant
All tests pass. Let me clean up temp files.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.