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.
ADDITIONAL ADVICE
Since you are given a git repository, you can use git commands to simplify your work. For example, if you made a mistake and want to revert your changes, you can use
git checkout <file>to restore the file to its original state. You can also reset all changes in the repository usinggit reset --hardcommand. Additionally, you can usegit stashandgit stash popto temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you callsubmit) usinggit statusorgit diffcommands. However you don't need to usegit addorgit commitbefore submitting your changes. In fact,submitonly submits currently unstaged changes because it usesgit diffto get the changes that need to be submitted.CHECKLIST
Before submitting your solution, please go over the following checklist and make sure you've done everything:
- If an error was reported in the issue description, I have successfully reproduced it.
- If an error was reported in the issue description, I have confirmed that my fix resolves the error.
- I have thought about edge cases and made sure my fix handles them as well.
- I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass. I want you to list every bullet from this checklist and write your reasoning for why you think you did it or didn't need to.
Repository has been uploaded and your shell is currently at the repository root. Time to solve the issue!
(Current directory: /gentle-ai, current file: none) bash-$
- Assistant
I’ll first map the installer’s navigation/state flow and locate the Pi-only branch, then reproduce the incorrect back transition using the existing test harness or a focused temporary script. After identifying the transition logic, I’ll make the smallest general fix and run the relevant tests plus regression checks.
- Assistant
The repository is a Go CLI with no pre-existing changes. I’ll now search the command and internal packages for installer steps, back-navigation sentinels, and Pi target handling, while checking the project-specific contribution guidance.
- Assistant
Navigation is centralized in
internal/tui/model.go, and existing tests already emphasize keeping Enter-on-Back and Escape paths consistent. I’ll inspect the screen enum, target-selection transition, Pi-only normalization, and both back handlers around the dependency/configuration steps to identify where the selected target is being ignored. - Assistant
The generic
goBacklogic has special cases for configuration screens but apparently no Pi-only guard before those cases. I need the exact forward route and the fallback route table to determine the correct invariant: Pi-only should likely bypass all Gentle AI configuration and return from its next screen directly to agent selection. - Assistant
A helper
isPiOnlyAgentsalready exists, and forward navigation from agent selection appears to send Pi-only directly toScreenDependencyTree. The reported “next step” is therefore the dependency plan screen; its Back action currently falls through to preset/configuration logic. I’ll inspect complete relevant blocks and route definitions, then encode a focused reproduction against both Enter-on-Back and Escape. - Assistant
The forward test confirms Pi-only intentionally skips prompts and lands on the dependency plan with Engram only. The likely fix is to make that screen’s reverse edge symmetric—
DependencyTree → Agentswhen and only when the selected agents are Pi-only—before any configuration checks, in both Back mechanisms. I’ll verify the route table and reproduce the current mismatch with a temporary in-package test file that will be removed before submission (without altering repository tests). - Assistant
The temporary reproduction could not execute because this environment lacks a configured Go module cache/GOPATH; I removed the temporary file as planned. The code inspection still reproduces the transition deterministically: Enter-on-Back evaluates Gentle configuration predicates, while Escape falls through to the static
Presetroute. Before editing, I’ll check rendering and option counts so the Pi-only condition remains correct even if stale preset state is custom, then configure an isolated Go cache to run verification. - Assistant
NewModelinitializes the preset to full, so the reported path renders two actions (Continue,Back). To make the navigation invariant independent of stale configuration state, I’ll prioritize Pi-only in three places: option count, Enter handling, and Escape handling. Rendering also branches on preset, so I’ll inspect it and either normalize the preset when entering Pi-only or give rendering the same target-based priority. Normalizing unrelated saved choices is less desirable than making this screen’s mode derive from the selected path. - Assistant
The reported flow cannot have a custom preset because it starts from a fresh model, and Pi-only deliberately bypasses preset selection. I’ll keep the fix narrow: at
ScreenDependencyTree, detect Pi-only before configuration-based reverse routing and return toScreenAgents; apply this to both explicit Back and Escape. This avoids changing rendering or discarding prior user choices, while combined Pi+other-agent flows continue using normal configuration routes. - Assistant
The first edit was safely aborted because the same switch label pattern appears in both keyboard-space handling and confirmation handling. I’ll target the unique block immediately following
ScreenOpenCodePluginResultfor Enter behavior, then insert the Escape guard at its unique navigation comment. - Assistant
The patch now makes both navigation mechanisms symmetric for the actual Pi-only install-plan screen while leaving Continue unchanged (
Cursor == 0). I’ll rerun the focused reproduction with an explicit temporaryGOPATH/module cache, including a combined-agent control case to ensure only exact Pi-only selection gets the new route. - Assistant
Dependencies downloaded successfully, but compilation was blocked because the sandbox also has no
HOMEorGOCACHE. The temporary test was still removed. I’ll rerun with an explicit build cache as well; no source change is needed for this environment-only issue. - Assistant
The Pi-only regression cases passed; the only failure was my control case’s incorrect expectation—combined Pi+OpenCode normally routes back to the OpenCode plugin screen (
Screen 10), not directly to Preset. That result itself confirms the new exact-match condition did not alter the combined-agent flow. I’ll rerun the focused check with the correct expected normal route, then run the full TUI suite. - Assistant
The focused reproduction now passes for both Enter-on-Back and Escape, and the combined-agent control retains its normal OpenCode route. The complete
internal/tuisuite also passes. I’ll run all Go tests and static formatting/diff checks, then review the final patch for unintended files or generated artifacts. - Assistant
All affected and most repository packages passed, and
go vet ./...passed. The full suite failures are environment-derived: absentHOMEand my temporary nonstandard/tmp/gopathchanged tests that assert the default$HOME/go/bin. I’ll rerun the complete suite with a realistic isolatedHOMEand matching default-styleGOPATH, reusing the downloaded module cache. - Assistant
The corrected full-suite run began cleanly but exceeded the terminal’s fixed command timeout before reaching most packages; no failure appeared in the partial output. Since the relevant TUI suite already passes, I’ll validate the previously environment-failing packages individually under the corrected environment, then perform final status/diff review.
- Assistant
The environment-dependent packages now hang once a valid home allows their external update/detection paths to proceed, so they cannot complete within the terminal limit; this is unrelated to the navigation change. The relevant full TUI suite, focused regression, and vet checks are successful. I’ll now inspect the exact final diff, ensure no temporary test/artifact remains, and verify formatting and whitespace one last time.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-27BCompare side by side →
Qwen/Qwen3.5-35B-A3BCompare side by side →