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
I’ll first map the installer structure and locate the navigation/state handling for target selection and Pi-only flows. Then I’ll reproduce the path at the most focused testable level, patch it, and run the relevant test suite.
- Assistant
This is a Go CLI. I’ll now inspect command/internal packages and search for the exact “Back”, Pi target, and configuration prompt logic to identify where the flow loses its prior-step context.
- Assistant
The broad search was dominated by component code, so I’ll narrow to installer/TUI packages and inspect their state machine and tests directly.
- Assistant
The static router maps the dependency-tree screen backward to the preset/configuration branch, which is suspicious for a Pi-only path that likely skips those screens on forward navigation. I’ll read the model transitions and existing target-selection tests to reproduce the precise state sequence before changing behavior.
- Assistant
Existing tests confirm Pi-only forward navigation jumps directly from
ScreenAgentstoScreenDependencyTree, while generic dependency-tree Back behavior is configuration-aware. I’ll inspect all dependency-tree Escape/Back branches and helper predicates, because both keyboard Escape and selecting the visible Back item must return to target selection consistently without regressing normal flows. - Assistant
The issue is now reproducible from existing primitives: construct Pi-only state, continue to dependency tree, then Back; current generic logic routes into configuration. I’ll inspect the exact transition implementations and decide whether a focused Pi-only branch or a generalized “previous relevant screen” helper best matches existing conventions.
- Assistant
PreviousScreenexists but the installer intentionally derives backward routes from current selection because flows branch dynamically. A minimal generalized fix is to give Pi-only selection precedence whenever leaving dependency tree backward, in both Escape (goBack) and visible Back (confirmSelection) paths. I’ll verify those two functions in full and then patch only production code. - Assistant
Both paths currently fall through to
ScreenPresetfor Pi-only because its fixed preset remainsFullGentleman, exactly producing the unrelated prompts on subsequent navigation. I’ll patch both dependency-tree Back handlers to return directly toScreenAgentswhenisPiOnlyAgentsis true, before any preset/configuration logic. This preserves all mixed-Pi and standard routes. - Assistant
I’m applying the two synchronized guards now. After formatting, I’ll use a temporary in-package test file (then remove it, per the no-new-tests constraint) to demonstrate the preexisting reproduction sequence now passes for both Enter-Back and Escape, plus ensure mixed Pi still follows generic behavior.
- Assistant
The first edit safely aborted because the syntactic anchor appears twice (likely both update and view switches). I’ll target the unique dependency-tree confirmation block using its following custom-component declaration, then apply the Escape guard at the unique navigation comment.
- Assistant
One edge case surfaced: the selected preset can be stale
Customif a user changes targets mid-flow. The initial guard’scursor != 0would then misclassify custom component rows as Back. I’ll tighten detection to the actual Back index for both dependency-tree layouts, while Escape remains unconditional for Pi-only. Then I’ll run the focused temporary regression tests. - Assistant
The focused test could not start because this environment has both
GOPATHandGOMODCACHEunset; the temporary test file was removed as required, and formatting/diff checks passed. I’ll rerun with a command-scoped writableGOPATH(not changing repository configuration), then run the broader Go suite if dependencies are available. - Assistant
Dependencies downloaded successfully, but Go additionally requires a build cache because
HOMEis unset. I’ll provide command-scopedHOME,GOPATH, andGOCACHE, recreate the same temporary focused tests, run them, remove the file regardless of outcome, and then proceed to all tests. - Assistant
The focused reproduction now passes for both forms of Back; mixed-Pi behavior is unchanged, and stale custom state does not mistake a component row for Back. I’ll run the complete Go test suite to detect regressions across installer planning and CLI behavior.
- Assistant
The full suite exceeded the terminal command time limit after all agent packages passed; it did not report a test failure. Since caches are now warm, I’ll rerun package groups in parallel with bounded batches so each command can finish within the environment limit, including the heavier components separately.
- Assistant
I’ll first test all remaining non-component packages (including TUI, planner, model, and CLI) in one cached invocation, then component packages in separate batches.
- Assistant
The broader batch again hit the short execution timeout before emitting buffered package results, while the directly affected
internal/tuipackage is confirmed passing. To satisfy the reproduction checklist rigorously, I’ll temporarily save the fixed source, restore the original source, run the focused Pi-only Back test and confirm it fails with the reported wrong screen, then immediately restore the fixed source and rerun that same test. No test file will remain in the repository. - Assistant
The original code now demonstrably reproduces the bug (
screen 5, Persona/configuration, instead ofscreen 3, target selection), and the patched code passes the identical sequence. I’ll perform final repository hygiene checks, rerun the complete affected TUI package without temporary tests, and review the final diff.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.