Skip to content

feat(project): render create results as JSON and truncate task titles - #2184

Closed
AlexanderRichey wants to merge 1 commit into
refactorfrom
feat/project-deploy-progress-ui
Closed

feat(project): render create results as JSON and truncate task titles#2184
AlexanderRichey wants to merge 1 commit into
refactorfrom
feat/project-deploy-progress-ui

Conversation

@AlexanderRichey

Copy link
Copy Markdown
Contributor

Follow-ups to the live progress UI now on refactor (#2163, #2174).

  • --json output for project create: the success message is rendered as JSON on stdout ({"message": "Created project ..."}), and a create failure is rendered as {"error": ...} before the error is rethrown unchanged for exit-code handling — matching what build and deploy already do.
  • TaskList title truncation: a title longer than the terminal is truncated with instead of wrapping. Left to wrap, the flexbox layout shrinks the 1-character ✓/✕/spinner glyph column to nothing, so the step's status disappeared.
  • Line-splitter coverage at the manager level: a test that subprocess chunks splitting a line mid-word ("found 0 vulnerabilit" + "ies\n") still arrive as whole-line output events.

Test plan

  • bun test (full suite passes; the one flake, src/io/watchFile.test.ts debounce timing, passes in isolation and is untouched here)
  • bun run typecheck

🤖 Generated with Claude Code

https://claude.ai/code/session_01V2DArb473daWaE6G6B6fSq

Follow-ups to the live progress UI now on refactor (#2163, #2174):

- With --json, `project create` renders its success message or error as
  JSON on stdout, matching build and deploy
- Truncate task titles to the terminal width so a long title can't
  flex-shrink the status glyph away
- Cover the line splitter with a manager-level test: subprocess chunks
  that split a line mid-word still arrive as whole-line output events

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V2DArb473daWaE6G6B6fSq
@github-actions github-actions Bot added the size/m PR size: M label Sep 3, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added claude-security-reviewing Claude Code /security-review in progress agentcore-harness-reviewing AgentCore Harness review in progress 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 claude-security-reviewing Claude Code /security-review in progress agentcore-harness-reviewing AgentCore Harness review in progress labels 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

Focused change with clear intent and good tests:

  • TaskList.tsx: The columns - 2 truncation (with Math.max(..., 3) floor for the ellipsis) matches the "glyph + space" prefix for both the spinner and done/error rows. Preserving the || fallback for columns is correct.
  • manager.test.ts: The chunked-mid-line runner mock is a nice, precise regression test for line buffering — exactly the right level of test double.
  • handlers/project/create/index.ts: JSON success on stdout + human lines on stderr is consistent with the "same driver as build and deploy" comment; error path calls renderJsonError then re-throws so the caller's exit-code handling still fires. The failure test is clever (first create succeeds, second collides on the existing directory) and asserts both the JSON body on stdout and that the error still propagates.

Nothing to change — LGTM.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.13%. Comparing base (16db5b4) to head (af81e1f).

Additional details and impacted files
@@             Coverage Diff              @@
##           refactor    #2184      +/-   ##
============================================
+ Coverage     97.08%   97.13%   +0.04%     
============================================
  Files           536      536              
  Lines         36979    36984       +5     
============================================
+ Hits          35901    35923      +22     
+ Misses         1078     1061      -17     

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

@AlexanderRichey

Copy link
Copy Markdown
Contributor Author

Dupe

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.

2 participants