Skip to content
TheChatArchiveThe Chat Archive
GLMz-ai/glm-5.2· unknownHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

ISSUE DESCRIPTION fix(installer): back navigation from Pi-only install shows unrelated…

  1. 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-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.

    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 using git reset --hard command. Additionally, you can use git stash and git stash pop 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 submit) using git status or git diff commands. However you don't need to use git add or git commit before submitting your changes. In fact, submit only submits currently unstaged changes because it uses git diff to 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-$

  2. GLM Assistant

    I'll start by exploring the repository structure to understand the codebase and find the relevant installer code.

  3. GLM Assistant

    Let me find where the "Pi" installation target is selected. Let me search for "Pi" in the agents screen.

  4. GLM Assistant

    Let me look at the Pi-only flow. Let me look at line 469 and surrounding context, and the isPiOnlyAgents function.

  5. GLM Assistant

    Now let me look at the agents screen flow, where Pi selection happens. Let me look at lines around 1489.

  6. GLM Assistant

    Now let me look at the Back navigation logic from DependencyTree. Let me look at lines around 2431.

  7. GLM Assistant

    Let me find the function that handles this back navigation, to understand the full structure.

  8. GLM Assistant

    Let me see the rest of the goBack function to understand where it falls through to linearRoutes.

  9. GLM Assistant

    Let me check the ScreenDependencyTree Enter handling for the "Back" option, and the confirmSelection function.

  10. GLM Assistant

    Let me check the shouldShow functions to confirm Pi-only skips those screens.

  11. GLM Assistant

    For Pi-only flow:

    • piOnlyComponents() returns []model.ComponentID{model.ComponentEngram} - only Engram, no SDD.
    • So shouldShowStrictTDDScreen() returns false (no SDD component).
    • shouldShowSDDModeScreen() returns false (no OpenCode agent AND no SDD).
    • shouldShowClaudeModelPickerScreen() returns false (no ClaudeCode agent).
    • shouldShowKiroModelPickerScreen() returns false.
    • shouldShowOpenCodePluginsScreen() returns false probably.
    • The Preset is PresetFullGentleman (not custom).

    So both back paths (goBack via Esc, and handleKeyPress Enter on "Back") fall through to ScreenPreset. But Pi-only came from ScreenAgents directly to ScreenDependencyTree. So back should go to ScreenAgents.

    Let me verify the shouldShowOpenCodePluginsScreen.

  12. GLM Assistant

    Let me check the confirmSelection function since comments mention back logic there too.

  13. GLM Assistant

    The confirmSelection switch handles different screens but ScreenDependencyTree is handled at line 1758 (within confirmSelection switch). Wait, actually line 1758 was inside confirmSelection? Let me check. Actually, line 1758 is within confirmSelection because confirmSelection starts at 1137 and ScreenDependencyTree is at 1758. Wait but confirmSelection is a single switch on m.Screen. Let me re-check - actually the case at line 1758 is part of confirmSelection? No, line 1131 calls m.confirmSelection() and then confirmSelection is a switch. Let me verify where confirmSelection ends.

    Actually wait, line 1758 "case ScreenDependencyTree:" - is this inside confirmSelection? Let me check. The confirmSelection switch starts at 1138. Let me look more carefully. Actually, the structure: confirmSelection has a switch m.Screen starting at 1138. Let me find where it ends.

  14. GLM Assistant

    Let me look at existing tests related to the Pi-only flow to understand the testing patterns.

  15. GLM Assistant

    Let me check the DependencyTree screen options to understand the "Back" option.

  16. GLM Assistant

    Now let me write a reproduction test to confirm the bug.

  17. GLM Assistant

    Both tests fail, confirming the bug. Let me verify what screen value 5 is.

  18. GLM Assistant

    Confirmed: screen 5 is ScreenPreset. Now let me apply the fix. First, the confirmSelection DependencyTree case (Enter on "Back").

  19. GLM Assistant

    Now let me fix the goBack() function for the Esc path. Let me view the updated line numbers.

  20. GLM Assistant

    Now let me run the reproduction tests again to confirm the fix.

  21. GLM Assistant

    Both tests pass now. Let me also consider edge cases. Let me check the Review screen Back navigation - when Pi-only, back from Review should also go to DependencyTree (not Preset). Let me check the Review back logic for non-custom.

  22. GLM Assistant

    Let me check the goBack for Review (Esc) non-custom path.

  23. GLM Assistant

    For Review (non-custom), goBack falls through to PreviousScreen(ScreenReview) = ScreenDependencyTree, which is correct for Pi-only. Now let me remove the repro test file and run the full tui test suite.

  24. GLM Assistant

    All tests pass. Let me also run the screens tests and the CLI tests that might be affected.

  25. GLM Assistant

    Let me build the whole project to ensure no compile errors.

  26. GLM Assistant

    Let me review the final diff.

  27. GLM Assistant

    Wait, the diff shows indentation changed. Let me check the actual file around that area to verify correctness.

  28. GLM Assistant

    The indentation is now wrong (1 tab instead of 2 tabs inside the case). Go accepts it syntactically, but it's bad style. Let me fix the indentation to match the original 2-tab level.

  29. GLM Assistant

    Now the indentation is correct. Let me verify the diff, rebuild, and re-run tests.

  30. GLM Assistant

    The diff is clean and minimal. Let me run the full test suite once more to confirm everything passes.

  31. GLM Assistant

    Let me ensure gofmt is satisfied with the file.

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