ENG-9522: Fix CLI: Lists projects as "Unknown"#6530
Conversation
Greptile SummaryThis PR fixes the CLI listing projects as "Unknown" by avoiding a redundant
Confidence Score: 4/5Safe to merge — the core logic is correct, well-covered by new tests, and no data-path regressions were found. The refactoring is clean and all the critical paths (blank project ID, embedded project name, single API call contract) are exercised by the new test suite. The only finding is a now-dead branch in packages/reflex-hosting-cli/src/reflex_cli/v2/cli.py — the dead branch at lines 217-218 is worth removing for clarity. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[deploy called] --> B[Load config / CLI args]
B --> C[normalize_project_id on project_id]
C --> D{project_name and no project_id?}
D -- Yes --> E[search_project]
E --> F[normalize_project_id on result id]
D -- No --> G
F --> G[get_selected_project to selected_project_id]
G --> H{project_id is None?}
H -- Yes --> I[project_id = selected_project_id]
H -- No --> J
I --> J{project_id set?}
J -- Yes --> K[get_project to validated_project]
J -- No --> L[validated_project = None]
K --> M[search_app]
L --> M
M --> N{App found?}
N -- Yes, interactive --> O{app project != selected?}
O -- Yes --> P[Name from app.project.name OR app_project_id]
O -- No --> Q[Proceed to deploy]
P --> Q
N -- No, interactive --> R{needs_confirmation?}
R -- Yes, project_id set --> S[Name from validated_project or project_name or project_id]
R -- Yes, no project_id --> T[get_default_project for display name]
S --> U[Ask to create and deploy]
T --> U
U --> V[create_app and deploy]
Q --> V
Reviews (1): Last reviewed commit: "ENG-9522: Fix CLI: Lists projects as "Un..." | Re-trigger Greptile |
No description provided.