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.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 to restore the file to its original state. You can also reset all changes in the repository using command. Additionally, you can use and to temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you call ) using or commands. However you don't need to use or before submitting your changes. In fact, only submits currently unstaged changes because it uses to get the changes that need to be submitted.
- Assistant
I’ll first map the installer’s structure and locate the navigation logic for target selection and Pi-only setup. Then I’ll reproduce the state transition at the smallest practical level, patch it, and run the relevant tests.
- Assistant
The repository is a clean Go project. I’ll read its contributor guidance and search for installer step/back handling, especially any Pi-specific branches and tests that encode navigation behavior.
- Assistant
The broad search was noisy, but the directory inventory indicates a dedicated TUI package below the truncated section. I’ll isolate that package and inspect its model/update transition code and navigation-focused tests.
- Assistant
The static router maps the dependency-tree Back action to
ScreenPreset, which explains the report: a Pi-only path apparently skips preset/persona configuration on the way forward, but static backward routing does not account for that skipped path. I’ll inspect the forward branching and all dependency-tree key handling to identify the correct invariant and avoid fixing only one Back mechanism. - Assistant
The cause is confirmed conceptually, but the model has several conditional paths (Pi-only, mixed Pi, custom preset, model pickers). I’ll extract the exact handlers and helper predicates before choosing whether the fix belongs in dynamic back resolution or transition-history state.
- Assistant
There is already a focused forward-flow test for Pi-only, so I can reproduce the bug by extending that sequence manually: Continue lands on dependency tree, then Esc or the Back row invokes the static route and lands on preset. I’ll inspect both key paths and
setScreencursor behavior, then patch the narrow dynamic predecessor rule and validate both escape and explicit Back. - Assistant
Both interaction styles converge on
goBack()or direct dependency-tree Back handling. I need the untruncated implementations to ensure one shared helper can govern both and preserve custom/mixed-agent behavior. - Assistant
The code comment explicitly requires dependency-tree Back and
goBack()to stay synchronized, making a sharedgoBackFromDependencyTreehelper the safest narrow fix. I’ll review the full existing decision tree, including OpenCode plugin detours, before extracting it and adding the Pi-only predecessor as the first rule. - Assistant
The reproduced transition is:
ScreenAgents (Pi only) → ScreenDependencyTree → Back/Esc → ScreenPresetbecause Engram-only makes all intermediate predicates false and falls through to the static preset route. I’ll centralize dependency-tree backward routing, with Pi-only returning directly to
ScreenAgents; mixed-agent and custom flows retain their existing predecessors. This also removes the existing duplicated logic that the comments warn must stay synchronized. - Assistant
The patch now routes both Esc and the rendered Back option through one function. Before broader testing, I’ll run the existing TUI suite; then I’ll use a temporary, removed-after-run test file to exercise the exact Pi-only Continue→Back and Continue→Esc sequences without adding repository tests, as required by the environment constraints.
- Assistant
Testing is blocked only because this sandbox has neither
GOPATHnorGOMODCACHEconfigured. I’ll point Go at a temporary cache outside the repository and rerun; no source/config changes are needed. - Assistant
The module cache is now available, but this minimal environment also lacks
HOME/GOCACHE. I’ll configure both under/tmpand rerun the same suites. - Assistant
An existing regression test exposed an intentional distinction: explicit dependency-tree Back must prefer Strict TDD, while Esc may return through OpenCode plugins. My initial consolidation erased that distinction. I’ll revert the refactor and apply the Pi-only rule narrowly at the top of each existing path, preserving all established routing semantics.
- Assistant
The relevant existing suites pass after preserving their route distinctions. I’ll now run a temporary in-package reproduction for both reported Back mechanisms. It will select Pi-only through the real agent-screen handler, assert arrival at the install plan, then assert both the Back row and Esc return to agent selection; the file will be deleted immediately even if the test fails.
- Assistant
The exact reproduction now passes for both the visible Back row and Esc, and the temporary test has been removed. I’ll run the full Go test suite to catch cross-package effects, then review the final diff/status for accidental files or formatting issues.
- Assistant
The full suite exceeded the command time limit after many packages passed; no failure was reported. I’ll continue it asynchronously and poll the result file, which avoids the shell-call timeout while still obtaining a definitive full-suite exit status.
- Assistant
The suite is running in the background. I’ll poll its completion marker and inspect the tail of its output for any failures.
- Assistant
All packages passed except
internal/cli. Since this change does not touch CLI execution code, I’ll inspect the failure details to determine whether it is a sandbox/environment issue or a genuine regression. - Assistant
The lone failure is environment-induced: the test expects the default
$HOME/go/bin, while I explicitly setGOPATH=/tmp/gopath, producing/tmp/gopath/bin. I’ll reruninternal/cliwith the conventional$HOME/goGOPATH to verify it independently, then perform final static/status checks. - Assistant
One edge case remains: a user can choose Custom in an earlier pass, navigate back to targets, then choose Pi-only; the stale Custom preset would make the dependency screen use its custom branch before the new Back guard. I’ll inspect preset defaults/state semantics and adjust the Pi transition so skipped configuration state cannot leak into the Pi-only flow.
- Assistant
Pi-only is intentionally represented with the default non-custom preset plus an Engram-only component set. I’ll restore that invariant whenever Pi-only is selected, clearing a stale Custom preset from prior navigation. Then I’ll extend the temporary reproduction to cover this stateful edge case and rerun the TUI suite.
- Assistant
The stateful Custom→Back→Pi edge case now also passes, along with all TUI tests. The earlier full-suite run passed every package except the environment-sensitive CLI test, and that CLI package passed when rerun with conventional GOPATH layout. I’ll do one final repository cleanliness and diff review before submission.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.