Skip to content

fix(tui): report the not-found guidance when project invoke opens outside a project - #2205

Merged
notgitika merged 1 commit into
aws:refactorfrom
notgitika:fix/tui-project-invoke-no-project
Sep 3, 2026
Merged

fix(tui): report the not-found guidance when project invoke opens outside a project#2205
notgitika merged 1 commit into
aws:refactorfrom
notgitika:fix/tui-project-invoke-no-project

Conversation

@notgitika

@notgitika notgitika commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Opening the TUI outside a project and choosing project invoke spun on Resolving project… forever. the picker checked its loading branch before its error branch, so the failed project resolution never rendered.

It now goes through ProjectGate like project build and project deploy, printing the same message the commands do:

✗ No AgentCore project found at <cwd> or any parent directory (looked for agentcore/agentcore.json). Run 'agentcore project create' to scaffold one.

Regression test added; it times out on the old code.

…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.
@github-actions github-actions Bot added the size/m PR size: M label Sep 3, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added agentcore-harness-reviewing AgentCore Harness review in progress claude-security-reviewing Claude Code /security-review in progress labels Sep 3, 2026
@github-actions github-actions Bot added size/m PR size: M and removed size/m PR size: M labels Sep 3, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 3, 2026

@agentcore-devx-automation agentcore-devx-automation Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 + ProjectInvokePicker child cleanly removes the project?. guards; the child now correctly assumes a resolved Project and preserves the existing esc-when-loading/erroring logic (screen.tsx L117-119).
  • The new not-found test uses a real mkdtemp + process.chdir rather than mocking process.cwd/fs, which matches the existing pattern used in buildDeploy.screen.test.tsx and status/index.test.ts. The afterEach restores the original cwd and cleans up all pushed dirs.
  • flatFrame / waitForFlatText are already exported from src/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.resolve path is already instrumented at the handler level.

Nothing blocking from me.

@agentcore-devx-automation agentcore-devx-automation Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Sep 3, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.09%. Comparing base (831025c) to head (5be0da3).
⚠️ Report is 2 commits behind head on refactor.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@notgitika
notgitika merged commit 4d806e8 into aws:refactor Sep 3, 2026
26 of 30 checks passed
@notgitika
notgitika deleted the fix/tui-project-invoke-no-project branch September 3, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants