feat(project): render create results as JSON and truncate task titles - #2184
Closed
AlexanderRichey wants to merge 1 commit into
Closed
feat(project): render create results as JSON and truncate task titles#2184AlexanderRichey wants to merge 1 commit into
AlexanderRichey wants to merge 1 commit into
Conversation
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
Contributor
|
Claude Security Review: no high-confidence findings. (run) |
Contributor
There was a problem hiding this comment.
AgentCore Harness Review
Verdict: Looks good
Focused change with clear intent and good tests:
TaskList.tsx: Thecolumns - 2truncation (withMath.max(..., 3)floor for the ellipsis) matches the "glyph + space" prefix for both the spinner and done/error rows. Preserving the||fallback forcolumnsis 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 callsrenderJsonErrorthen 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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
Contributor
Author
|
Dupe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-ups to the live progress UI now on
refactor(#2163, #2174).--jsonoutput forproject 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.…instead of wrapping. Left to wrap, the flexbox layout shrinks the 1-character ✓/✕/spinner glyph column to nothing, so the step's status disappeared."found 0 vulnerabilit"+"ies\n") still arrive as whole-lineoutputevents.Test plan
bun test(full suite passes; the one flake,src/io/watchFile.test.tsdebounce timing, passes in isolation and is untouched here)bun run typecheck🤖 Generated with Claude Code
https://claude.ai/code/session_01V2DArb473daWaE6G6B6fSq