Skip to content
TheChatArchiveThe Chat Archive
fable-5· unknownHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

fix(installer): back navigation from Pi-only install shows unrelated Gentle AI…

  1. User

    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-pi installer from gentle-ai, if I select only Pi as the installation target and then use Back on 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

    1. Start the gentle-ai installer.
      2. Select only Pi as the installation target.
      3. Continue to the next step.
      4. Select Back.
      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 Pi during installation and then navigating back from the following step.

    Interface

    No new interfaces are introduced.

  2. Assistant

    Now the "Back" option handler in confirmSelection for ScreenDependencyTree:

  3. Assistant

    Now the Esc handler in goBack():

  4. Assistant

    Now let me check how existing tests simulate Esc and the helper names:

  5. Assistant

    Full test suite passes. The fix is complete.

    Summary

    Root cause: The Pi-only install flow skips the Persona and Preset screens on the way forward (ScreenAgents → ScreenDependencyTree directly, model.go:1489), but back navigation from ScreenDependencyTree didn't know about this shortcut. Both the Esc handler (goBack()) and the "Back" menu option fell through to the generic route ScreenDependencyTree → ScreenPreset, dropping the user into the preset/persona/TDD/multi-agent configuration flow that was never shown.

    Changes in internal/tui/model.go:

    1. goBack() — added a Pi-only guard before the generic DependencyTree back logic: when the selection is Pi-only, Esc returns to ScreenAgents (the actual previous screen).
    2. confirmSelection() / ScreenDependencyTree "Back" option — same guard, so Enter on "← Back" matches Esc behavior.
    3. confirmSelection() / ScreenAgents Pi-only branch — now also resets Selection.Preset to PresetFullGentleman, so a stale PresetCustom from an earlier pass through the flow can't turn the Pi-only dependency tree into the custom component picker (which would have shown unrelated Gentle AI components and routed back navigation incorrectly).

    Tests added in internal/tui/model_test.go:

    • TestPiOnlyDependencyTreeBackReturnsToAgents — verifies both Esc and the "Back" option return to agent selection instead of the preset screen.
    • TestPiOnlyAgentContinueResetsStaleCustomPreset — verifies the stale-preset reset.

    Verified with go build ./..., go vet, and the full go test ./... suite — all green.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.