refactor(cli): update wizard step headers to use a constant for total steps#2766
Conversation
Greptile code reviewThis repo uses Greptile for automated review. Before merge, aim for Confidence Score: 5/5 with zero unresolved review threads — see CONTRIBUTING.md. Run a review — add a PR comment with: Give it ~5-10 minutes (sometimes longer) for results, then fix feedback and re-trigger until you reach Confidence Score: 5/5. Optional: automate with the greploop skill. |
Greptile SummaryThis PR completes the wizard's 4-step UX by adding the previously missing "Summary" step header and extracts the total step count into a single
Confidence Score: 5/5Safe to merge — the change is a straightforward constant extraction and a previously missing step-4 header addition with no behavioral side-effects. All four _step_header calls now correctly reference WIZARD_TOTAL_STEPS, the new Summary step header is placed at the right point in the flow, and the added test assertions cover the new output. The change is mechanical and well-scoped. No files require special attention; test_flow.py has one minor hardcoded literal that could drift if the step count changes. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[run_wizard start] --> B["_step_header(1, WIZARD_TOTAL_STEPS, 'Setup Mode')"]
B --> C[Choose wizard mode]
C --> D["_step_header(2, WIZARD_TOTAL_STEPS, 'LLM Provider')"]
D --> E[Choose provider & model]
E --> F["_step_header(3, WIZARD_TOTAL_STEPS, 'Integrations')"]
F --> G[Configure integrations]
G --> H["_step_header(4, WIZARD_TOTAL_STEPS, 'Summary') <- NEW"]
H --> I[_render_saved_summary]
I --> J[_render_next_steps]
J --> K[return 0]
style H fill:#d4edda,stroke:#28a745
Reviews (3): Last reviewed commit: "Merge origin/main into flow" | Re-trigger Greptile |
|
@greptile review |
|
@greptile-apps review again |
|
😤 @Devesh36 said "I will fix this" and then actually fixed it. Legendary behavior. 👋 Join us on Discord - OpenSRE : hang out, contribute, or hunt for features and issues. Everyone's welcome. |

This pull request refactors the way the wizard step headers are displayed in the CLI setup flow, making the total number of steps consistent and easier to maintain. The total step count is now defined in a single constant and used throughout the wizard, and the tests are updated to reflect the improved output.
Wizard step header improvements:
WIZARD_TOTAL_STEPSinflow.pyto define the total number of steps in the setup wizard, replacing hardcoded step counts._step_headerinrun_wizardto useWIZARD_TOTAL_STEPSinstead of the literal4, ensuring consistency across all steps. [1] [2] [3] [4]Test updates:
test_flow.pyto verify that the output includes the "Summary" step, the correct step count ("4/4"), and that the summary appears before "Done." in the output.before