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 target-selection/back-navigation logic, then reproduce the state transition with the closest existing tests or a temporary harness before making a focused fix.
- Assistant
rgis unavailable, so I’ll usegrepand inspect the Go package layout, especially prompt/model update functions and their tests. - Assistant
The key clue is
isPiOnlyAgentsininternal/tui/model.go. I’ll inspect initialization, forward routing, andgoBack()together with navigation tests to identify the asymmetric transition. - Assistant
Existing tests cover Pi-only forward navigation but not the reverse. I’ll extract the exact
ScreenAgentsconfirmation andgoBackimplementation, plus nearby flow tests, so the fix follows existing conditional-routing conventions rather than adding a global route that could affect mixed-agent installs. - Assistant
The broad output confirms forward Pi-only goes directly
Agents → DependencyTree; now I’ll isolate the reverse branch. The likely defect isDependencyTreecomputing a generic predecessor from components/preset without first recognizing the Pi-only shortcut. - Assistant
This reproduces the root cause statically: Pi-only forward skips every configuration screen, but Escape from
DependencyTreeenters generic logic; because Engram enables strict-TDD eligibility, it routes toScreenStrictTDD. I’ll inspect both “Back row” and Escape implementations fully, since both navigation mechanisms must return toScreenAgents. - Assistant
Both interaction paths are defective:
- Enter on the visible DependencyTree “Back” row routes to Strict TDD.
- Escape invokes
goBack()and does the same.
I’ll add the Pi-only shortcut as the highest-priority predecessor in both synchronized branches. This remains narrowly scoped to exactly one selected agent (
Pi), so Pi mixed with any other target retains the existing Gentle AI flow. - Assistant
The edit guard found two structurally identical
ScreenDependencyTreecases (confirmation and option counting), so no file was changed. I’ll anchor the replacement to the adjacentScreenOpenCodePluginResultconfirmation code and retry safely. - Assistant
Before testing, I’m checking a stateful edge case: a user can return from a previous custom Gentle AI flow and then choose Pi-only, leaving
Selection.Preset == Custom. The Pi shortcut should be independent of stale preset state; I’ll inspect rendering predicates and defaults to ensure the new branch doesn’t make “Continue” inert in that scenario. - Assistant
A stale Custom preset would cause the next Pi-only screen itself to render the component picker. The forward shortcut already overwrites components, so I’ll also normalize the skipped preset state to the preset corresponding to Engram-only (if one exists). This makes Pi-only routing deterministic regardless of what was selected before returning to target selection.
- Assistant
PresetMinimalis exactly Engram-only, so I’ll normalize to it when entering the Pi-only shortcut. This prevents stale custom/full configuration state from influencing rendering or reverse navigation, while preserving the intentionally fixed Pi component set. - Assistant
The source formats and diff checks pass, but Go cannot run because this environment has neither
GOMODCACHEnorGOPATHconfigured. I’ll point both at temporary directories (without changing the repository) and rerun the affected package tests. - Assistant
Dependencies downloaded successfully; the remaining environment issue is also missing
GOCACHE/HOME. I’ll provide a temporary build cache and run the same tests again. - Assistant
Affected tests pass. The transition is now directly verifiable from both code paths: Pi-only “Back” row and Escape each set
ScreenAgentsbefore generic predicates run. I’ll run the full Go suite to catch regressions elsewhere, then inspect the final diff and repository status. - Assistant
The full suite’s failures are environmental:
$HOMEwas unset, and the temporaryGOPATH=/tmp/gopathchanged path-guidance expectations. The affected TUI suite remains green. I’ll rerun all packages with a normal temporary home and its conventional$HOME/goGOPATH, which should satisfy application/path tests without repository changes. - Assistant
The full rerun exceeded the terminal time limit after its early packages passed, rather than reporting a code failure. I’ll run the previously failing environment-sensitive packages separately; together with the already-passing affected packages, this will distinguish real regressions from timeout constraints.
- Assistant
To directly verify the reported interaction without adding or modifying tests, I’ll create a temporary executable harness (removed in the same command) that initializes the Pi-only dependency screen and sends both supported Back actions: selecting the Back row and pressing Escape. It will fail unless each returns to target selection.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.