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
Now let me look at the TUI directory to understand the installer flow:
Assistant
Now let me look at the model.go to understand the screensstructure:
Assistant
Let me look at how the back navigation works:
Assistant
Let me look at the ScreenDependencyTree back handler and the full goBack() function:
Assistant
Let me confirm by looking at the relevant part of the model:
Assistant
Let me check the
shouldShow*Screenfunctions to understand what happens for Pi-only:Assistant
OK, so now I have a clearer picture of what's happening:
- When in Pi-only mode,
piOnlyComponents()returns only[model.ComponentEngram]. - So
shouldShowSDDModeScreen()returns false (no SDD component, no OpenCode agent). shouldShowStrictTDDScreen()returns false (no SDD component).shouldShowClaudeModelPickerScreen()returns false.shouldShowOpenCodePluginsScreen()- let me check this.
Let melook at
shouldShowOpenCodePluginsScreen:- When in Pi-only mode,
Assistant
Now let me confirm the issue by understanding the flow. Let me also check the tests:
Assistant
Let me reproduce the bug first to make sure my understanding is correct.
Assistant
Good, the existing test passes. Let me try to reproduce the bug with my custom test:
Assistant
Confirmed the bug. Screen value 5 is ScreenPreset, screen value 3 is ScreenAgents. Now let me look at the confirmSelection function as well:
Assistant
Let me look at the key handler for Esc/back on different screens:
Assistant
Let me check confirmSelection for related logic:
Assistant
Let me look at the DependencyTree screen implementation to see how "Back" works:
Assistant
Now let me understand what both Esc and Back button do for the DependencyTree screen. Let me re-read the relevant sections:
Assistant
Now let me see the agent_builder_nav_test.go to see if there are similar test patterns:
Assistant
Now I have a complete understanding. Let me implement the fix in
goBack()andconfirmSelection():Assistant
Now I'll add the fix in
goBack():Assistant
Let me verify the changes look correct:
Assistant
Both fixes look good. Let me run the test to verify the fix works:
Assistant
The Esc test passes now. Let me also add a test for the Back button (Enter on Back option) to confirm both navigation paths work correctly:
Assistant
Both tests pass. Now let me also test the edge case: what if the user deselects Pi after going back to ScreenAgents and then proceeds?
Assistant
All three tests pass. Now let me run all the tests in the tui package to make sure I didn't break anything:
Assistant
All tests pass. Now let me run all the tests in the repository to make sure I didn't break anything:
Assistant
There's a failure in
internal/app. Let me look at what test is hanging:Assistant
The failure is unrelated to my changes — it's a network/timeout issue. Let me confirm this is pre-existing:
Assistant
Confirmed the failure is pre-existing (unrelated to my fix). Let me restore my changes:
Assistant
Now let me run all the tests in
internal/tui/to make sure I didn't break anything:Assistant
All TUI tests pass. Let me also run the tests in other related packages:
Assistant
Excellent! Let me also run all the tests in the model and planner packages:
Assistant
All tests pass. Now let me also verify my fix by writing a comprehensive script to test the fix manually:
Assistant
Both verification tests pass. Let me clean up my test file (since I'm not supposed to add new tests to the repository):
Assistant
Let me run the TUI tests one more time to make sure everything is still passing:
Assistant
All TUI tests pass. Let me also verify with a more thorough reproduction script:
Assistant
All steps pass. Let me run all tests one more time to ensure nothing else is broken:
Assistant
All tests pass. Let me verify my final changes:
Assistant
Let me check that my code compiles correctly with
go vet:Assistant
Build passes. Let me also confirm the bug is reproduced by writing one final comprehensive verification:
Assistant
Let me run one final comprehensive test verification:
Assistant
All steps pass. Let me run all TUI tests one more time:
Assistant
All TUI tests pass. Let me also verify the final state of my changes:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.