Skip to content

feat(remove): add a TUI for removing resources from project. - #2310

Draft
Hweinstock wants to merge 3 commits into
aws:refactorfrom
Hweinstock:feat/project-remove-tui
Draft

Hweinstock wants to merge 3 commits into
aws:refactorfrom
Hweinstock:feat/project-remove-tui

Conversation

@Hweinstock

Copy link
Copy Markdown
Contributor

Problem

Remove is missing a TUI.

Solution

  • add a TUI that allows users to see the resources in their project, and remove them.
  • add a remove all option to empty the project.
  • show parent resources in the resource explorer table to disambiguate.

Verification

remove-tui-demo.mov

@github-actions github-actions Bot added the size/l PR size: L label Sep 15, 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 15, 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 15, 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 implementation. The screen composes cleanly from a table of picker configs, the tests use real temp directories and TestCoreClient (no fs/handler mocking), and the coverage is broad — every resource type, empty states, nested-resource parent columns, cwd-vs-seeded project resolution, cancel/confirm paths, and post-removal refresh via queryClient.setQueryData.

A few small things I checked and satisfied myself on, listed only so you know they were considered — no changes required:

  • gateway-connector's picker config emits resourceType: "gateway-target" in each RemovableResource (screen.tsx:81). That's intentional and correct: the storage model has connectors as a variant of gateway targets, and RemoveConfirm uses config.resourceType for display while passing the resource straight to removeResource, so backend and UI stay aligned.
  • Middleware order (withProject before withTuiWhenInteractive in handlers/project/index.ts) means running agentcore project remove outside a project surfaces the CLI's project-not-found error instead of opening the TUI. The TUI's own "No AgentCore project found" screen is reachable when navigating into remove from within the TUI (as exercised by the test at remove.screen.test.tsx where the working dir has no project). Consistent with how status is wired.
  • online-insight isn't a distinct row in the picker (it shares onlineEvalConfigs with online-eval); this mirrors the storage model, though worth confirming that's the desired UX if online-insight entries ever need to be visually distinguished from online-eval entries in the remove list.

No telemetry gap flagged since sibling screens (add, status) don't instrument either.

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

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.36306% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.04%. Comparing base (53f13f6) to head (f98d65b).
⚠️ Report is 1 commits behind head on refactor.

Files with missing lines Patch % Lines
src/handlers/project/remove/screen.tsx 99.31% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           refactor    #2310      +/-   ##
============================================
+ Coverage     97.03%   97.04%   +0.01%     
============================================
  Files           580      581       +1     
  Lines         39630    39940     +310     
============================================
+ Hits          38453    38761     +308     
- Misses         1177     1179       +2     

☔ 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.

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

Labels

size/l PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants