fix(tui): report the not-found guidance when project invoke opens outside a project - #2205
Conversation
…side a project The picker checked its loading branch before its error branch, so a failed project resolution left it spinning on "Resolving project…" forever. Route it through ProjectGate like project build and deploy, which prints the same message the commands do.
|
Claude Security Review: no high-confidence findings. (run) |
There was a problem hiding this comment.
AgentCore Harness Review
Verdict: Looks good
Nice focused refactor. ProjectInvokePickerScreen now shares the same ProjectGate/LoadingFrame behavior as the other project screens (build, deploy), which replaces the previous "spin forever / print raw error" fallback with the CLI's own projectNotFoundMessage guidance and adds a retry key on transient failures.
A few things I checked and think are fine:
- Splitting the screen into a gate wrapper +
ProjectInvokePickerchild cleanly removes theproject?.guards; the child now correctly assumes a resolvedProjectand preserves the existingesc-when-loading/erroring logic (screen.tsxL117-119). - The new not-found test uses a real
mkdtemp+process.chdirrather than mockingprocess.cwd/fs, which matches the existing pattern used inbuildDeploy.screen.test.tsxandstatus/index.test.ts. TheafterEachrestores the original cwd and cleans up all pushed dirs. flatFrame/waitForFlatTextare already exported fromsrc/testing, and the assertions on the flattened frame (message + cwd +agentcore project create) exercise exactly what the new gate path renders.- No new user-facing feature/command surface, so I don't think additional telemetry is needed here — the underlying
projectManager.resolvepath is already instrumented at the handler level.
Nothing blocking from me.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## refactor #2205 +/- ##
=========================================
Coverage 97.09% 97.09%
=========================================
Files 544 544
Lines 37834 37848 +14
=========================================
+ Hits 36736 36750 +14
Misses 1098 1098 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Opening the TUI outside a project and choosing
project invokespun onResolving project…forever. the picker checked its loading branch before its error branch, so the failed project resolution never rendered.It now goes through
ProjectGatelikeproject buildandproject deploy, printing the same message the commands do:Regression test added; it times out on the old code.