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 what we're working with.
Assistant
Let me look at the
isPiOnlyAgentsfunction and the context inmodel.go:Assistant
Now I see the key logic. Let me look at the ScreenAgents back logic and the
goBackfunction:Assistant
Now let me look at the
PreviousScreenfunction and the router:Assistant
Let me look at the
ScreenDependencyTreerendering to see what the Back button does:Assistant
Now let me look at how the ScreenAgents handles back:
Assistant
Let me look at the
confirmSelectionfunction:Assistant
Now I understand. Let me look at the goBack function for the DependencyTree case:
Assistant
Now let me find the section of
goBackthat handles theScreenDependencyTree:Assistant
Now let me look at how the back from the dependency tree works in
confirmSelectionfor non-custom preset:Assistant
Now let me look at the helper functions to understand the conditions:
Assistant
Let me look at existing tests for Pi-only:
Assistant
Now let me check the rest of that test:
Assistant
Let me first reproduce the bug with a test:
Assistant
Let me create a temporary test file to reproduce the issue:
Assistant
The Go test fails because module cache is not found. Let me set up Go and try again.
Assistant
I've reproduced the bug. Let me check the screen numbers:
Assistant
Now I've confirmed the bug. Let me first delete the temporary test file:
Assistant
Now let me trace through the issue to make sure I understand it correctly:
Assistant
Now let me look at the goBack function for ScreenDependencyTree:
Assistant
Let me also check the ScreenReview back logic for the Pi-only flow:
Assistant
Let me also look at the ScreenComplete back logic:
Assistant
Now I understand the bug clearly. Let me look at the goBack and confirmSelection sections for ScreenDependencyTree in detail, and the other places that might need a fix:
Assistant
Now I'll implement the fix. I need to update both the
confirmSelection(for the "Back" option Enter key) andgoBack(for Esc key) functions:Assistant
Now let me apply the fix to the
confirmSelectionfunction:Assistant
Let me try with the proper format:
Assistant
Let me use the
replacecommand:Assistant
Let me use the
replacecommand with file argument:Assistant
Let me verify the changes:
Assistant
Now let me re-run my test to verify the fix works:
Assistant
Both tests pass now. Let me delete the temporary test file:
Assistant
Now let me think about edge cases. Let me also consider what happens if the user changes the selection on
ScreenAgents(e.g. they go back, select a different agent like OpenCode+Pi, then forward toScreenDependencyTree):Assistant
All my edge case tests pass. Now let me run the full test suite for the TUI to make sure I haven't broken anything:
Assistant
All tests pass! Let me also check the full test results for any failures:
Assistant
All TUI tests pass. Let me also check related packages:
Assistant
Build is successful. Let me also check the agent_builder_nav_test.go to see if it has related test:
Assistant
Let me also look at the
model_test.goto see if there are any tests that might be affected by my fix:Assistant
Let me also look at the model_test.go to find tests related to the dependency tree:
Assistant
Let me also look at the model_test.go for the dependency tree back tests with non-OpenCode agents:
Assistant
Let me also run the related tests to make sure my fix is compatible:
Assistant
Now let me look at the broader context to see if there are any other places that might need a similar fix. Let me also examine what happens if the user goes back to the welcome screen and then re-enters via the install flow:
Assistant
Now let me also test the Esc key flow:
Assistant
Now let me clean up and run all tests one more time:
Assistant
Now let me also think about whether the
ScreenReviewback navigation needs to be updated for Pi-only:Assistant
Let me check the goBack function for ScreenReview:
Assistant
Let me check what happens when the user reaches ScreenReview in the Pi-only flow and presses Back/Esc:
Assistant
The back navigation from ScreenReview to ScreenDependencyTree works correctly. Let me clean up the test:
Assistant
Now let me also check the previous fix to look for any test that might be specifically related to the
ScreenPresetscreen back navigation - the bug reports say it ends up showing the Persona/Preset/SDDMode screens after Back, so let me check:Assistant
Let me verify the changes I made are still in place:
Assistant
Good - my changes are in place. Let me run the complete test suite one more time to confirm nothing is broken:
Assistant
All tests pass. Let me also check other potentially affected tests:
Assistant
All tests pass! Let me also verify the final state of my changes:
Assistant
The diff looks clean. Let me run the full TUI tests one more time to make sure everything passes:
Assistant
All tests pass! Let me also do a final summary of the changes:
Assistant
Let me verify by running the entire TUI test suite one more time:
Assistant
All tests pass! Let me also confirm that the build still works:
Assistant
Let me also look at the final state of my changes:
Assistant
Assistant
Good - no leftover test files. The only change is to
internal/tui/model.go.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.