Skip to content

refactor(cli): update wizard step headers to use a constant for total steps#2766

Merged
Devesh36 merged 6 commits into
Tracer-Cloud:mainfrom
Devesh36:flow
Jun 9, 2026
Merged

refactor(cli): update wizard step headers to use a constant for total steps#2766
Devesh36 merged 6 commits into
Tracer-Cloud:mainfrom
Devesh36:flow

Conversation

@Devesh36

@Devesh36 Devesh36 commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

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:

  • Introduced a new constant WIZARD_TOTAL_STEPS in flow.py to define the total number of steps in the setup wizard, replacing hardcoded step counts.
  • Updated all calls to _step_header in run_wizard to use WIZARD_TOTAL_STEPS instead of the literal 4, ensuring consistency across all steps. [1] [2] [3] [4]

Test updates:

  • Added assertions in test_flow.py to 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
Screenshot 2026-06-07 at 11 40 19 AM after Screenshot 2026-06-07 at 11 55 56 AM

@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Greptile code review

This 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:

@greptile review

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-apps

greptile-apps Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This 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 WIZARD_TOTAL_STEPS constant to avoid future drift.

  • flow.py: introduces WIZARD_TOTAL_STEPS = 4 and replaces all four _step_header literal arguments with it; adds the new _step_header(4, WIZARD_TOTAL_STEPS, "Summary") call that was absent before, so the progress indicator now correctly reaches 4/4.
  • test_flow.py: adds three assertions verifying the "Summary" header appears, the 4/4 counter is present, and "Summary" precedes "Done." in the captured output.

Confidence Score: 5/5

Safe 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

Filename Overview
app/cli/wizard/flow.py Introduces WIZARD_TOTAL_STEPS = 4 constant, replaces all hardcoded 4 literals in _step_header calls, and adds a new Step 4 "Summary" header before _render_saved_summary.
tests/cli/wizard/test_flow.py Adds three assertions to test_run_wizard_advanced_remote_falls_back_to_local verifying "Summary" text presence, "4/4" step counter, and ordering before "Done." — the step count is hardcoded rather than derived from the new constant.

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
Loading

Reviews (3): Last reviewed commit: "Merge origin/main into flow" | Re-trigger Greptile

@Davidson3556

Copy link
Copy Markdown
Contributor

@greptile review

@Devesh36

Devesh36 commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator Author

@greptile-apps review again

@Devesh36 Devesh36 merged commit 395ae71 into Tracer-Cloud:main Jun 9, 2026
14 checks passed
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

😤 @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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants