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
This isn't the file. Let's look for the TUI/wizard flow code (steps, back navigation).
Assistant
Let's find the "handleBack" function around line 2400-2440 to see the logic branching before falling through to PreviousScreen.
Assistant
Let's find the function name containing this code by scrolling up further.
Assistant
Now insert the Pi-only special-case check right after these guards.
Assistant
Now insert the Pi-only special case right after line 2330.
Assistant
Let's add a blank line before the OpenCodePluginResult check for readability and build to check syntax.
Assistant
Now let's build to check for compile errors.
Assistant
Build succeeds. Now let's check existing tests related to navigation/pi-only to understand expected behavior and possibly find test file.
Assistant
Now let's write a quick reproduction test to verify Back navigation works correctly with my fix.
Assistant
Test passes. Let's remove the temp test and run full test suite for tui package and others.
Assistant
Confirmed these failures pre-exist and are unrelated to my change (environment-specific, likely HOME env var issues). My fix is isolated to
internal/tui/model.goand tui tests pass.Assistant
This is a clean, minimal, targeted fix. Let's also verify
Esckey path triggersgoBack(check key handling wiring) to be thorough.Assistant
Now let's check the Enter-based "Back" option handling on ScreenDependencyTree (around line 1758).
Assistant
I'll insert a Pi-only check right after the "Cursor == 0" block, before the "NOTE: Back logic" comment.
Assistant
Now let's write a test to verify the "Enter on Back option" path (cursor at Back item on ScreenDependencyTree) also returns to ScreenAgents for Pi-only.
Assistant
Both paths work. Now clean up the temp test file and run the full tui test suite again.
Assistant
All tui tests pass. Let's check the full diff once more and run
go vet.Assistant
Both fixes are in place, vet passes, and full test suite (except pre-existing unrelated failures) passes. Let's run the entire test suite once more to be sure.
Assistant
Confirmed: these failures pre-exist without my changes too (environment-related, likely missing HOME/binary paths in sandbox). My change is isolated and doesn't introduce any new failures.
Assistant
Now let me go through the checklist:
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.