Visual improvements to worker lines with live test-progress suffix (2.x) - #1667
Conversation
gnodet
left a comment
There was a problem hiding this comment.
Well-structured UI improvement with solid tests. Two design points to discuss before the daemon-side follow-up lands:
-
Message priority ordering (medium):
PROJECT_TEST_PROGRESSis assigned class order 2 ingetClassOrder(), which is higher priority thanPROJECT_STARTED(3) andMOJO_STARTED(4). Since the daemon'ssendQueueis aPriorityBlockingQueueordered bygetClassOrder(), a test progress message could theoretically be dequeued before the correspondingPROJECT_STARTED, causingprojects.get(e.getProjectId())to return null and silently drop the message. Practical risk is low since the daemon emitter is not yet implemented, but consider placing it at order 5 or higher before the follow-up — the fix is a one-line change. -
Removed plugin version from display (medium): The worker line format changed from
prefix:version:mojotoprefix:mojo, removing the version that was deliberately added in commit 2a8d18d (PR #748). The groupId fallback when no goalPrefix is set also dropped the groupId. This appears to be an intentional UX tradeoff for conciseness by the same author, but it does lose debugging info for plugin version conflicts. Worth confirming this is the desired direction.
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Claude Code on behalf of gnodet
gnodet
left a comment
There was a problem hiding this comment.
Well-structured presentation improvement PR with good test coverage. The concise arrow-style worker lines, idle-slot rendering, and progress bar are all nicely implemented.
One item to consider:
Redundant writeNullableUTF / readNullableUTF (medium)
The new helper methods introduce a second wire-format convention for nullable strings (boolean prefix) when the existing writeUTF/readUTF already handle null via the -1 sentinel convention. Every other nullable string in Message.java uses writeUTF/readUTF directly.
The ProjectTestProgressEvent serialization can simply use the existing methods:
// read:
final String testClass = readUTF(input);
final String testMethod = readUTF(input);
// write:
writeUTF(output, testClass);
writeUTF(output, testMethod);This avoids maintaining two incompatible null-encoding conventions in the same class and saves 1 byte per nullable field on the wire.
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Claude Code on behalf of gnodet
d85c8af to
c716d57
Compare
gnodet
left a comment
There was a problem hiding this comment.
Re-review after rebase (d85c8af → c716d57): no functional changes detected.
The previous finding about redundant writeNullableUTF/readNullableUTF remains unaddressed — the existing writeUTF/readUTF already handle null via the -1 sentinel convention. ProjectTestProgressEvent can simply use them directly, avoiding a second incompatible wire-format convention in the same class.
Visual improvements and test coverage continue to look good.
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Claude Code on behalf of gnodet
|
Once #1670 is merged, I'll port it to the |
gnodet
left a comment
There was a problem hiding this comment.
Re-review after new commit (786ec64): the writeNullableUTF/readNullableUTF finding from the previous review has been fully addressed — the redundant helpers are removed and the existing readUTF/writeUTF null-sentinel convention is used correctly. The null round-trip test covers this path. No new issues introduced.
Minor note (not blocking): PROJECT_TEST_PROGRESS still sits at class order 2, higher priority than PROJECT_STARTED (3) and MOJO_STARTED (4). When the daemon-side emitter lands (follow-up PR), a test-progress message could be dequeued before its corresponding PROJECT_STARTED. Consider bumping it to order 5+ before that follow-up merges.
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Claude Code on behalf of @gnodet
Applies the review-driven fixes from the sibling 2.x PR (apache#1667): - PROJECT_TEST_PROGRESS now sorts after PROJECT_STARTED/MOJO_STARTED in the sendQueue, avoiding a race where the progress message could be dequeued before its project's PROJECT_STARTED event. - ProjectTestProgressEvent reuses the existing readUTF/writeUTF null-sentinel convention instead of a redundant boolean-prefixed nullable encoding. - Restores the plugin groupId/version in the worker line display, which was dropped by the visual redesign. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
gnodet
left a comment
There was a problem hiding this comment.
Re-review after commit 7bb1417: both prior findings are now resolved.
- Message priority ordering —
PROJECT_TEST_PROGRESSmoved from class order 2 to 5 (afterMOJO_STARTED=4), preventing the dequeue race. - Plugin version display —
pluginGroupIdandpluginVersionrestored in the worker line, matching master.
No new issues. Looks good! ✅
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Claude Code on behalf of @gnodet
…fix on 2.x Reshape the live terminal display: a drawn progress bar with percent on the status line, concise arrow-style worker lines (> :module goal (execution)), and dimmed > IDLE slots for free threads. At addProjectLine, append a styled live test-progress suffix (tests/failures/errors/skipped counts plus the current test class#method) driven by the new PROJECT_TEST_PROGRESS message. Co-Authored-By: Auto <cursoragent@cursor.com> Co-authored-by: Cursor <cursoragent@cursor.com>
readUTF/writeUTF already encode null via a -1 length sentinel, so the boolean-prefixed readNullableUTF/writeNullableUTF helpers duplicated an existing convention. Remove them and use readUTF/writeUTF directly.
…n version in worker line PROJECT_TEST_PROGRESS now sorts after PROJECT_STARTED/MOJO_STARTED in the sendQueue to avoid a message racing ahead of its project's PROJECT_STARTED event. Also restores the plugin groupId/version in the worker line display, which was dropped by the 2.x visual redesign. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
7bb1417 to
5ff75e7
Compare
…vnd-1.x) (#1666) * test: prevent ambient environment from leaking into daemon builds on CI - Extract buildRequestEnvironment() in DefaultClient for subclass override - Strip MAVEN_ARGS from JvmTestClient and NativeTestClient to block per-test flag overrides - Write an isolated settings.xml in MvndTestExtension so tests never fall back to the runner's user settings (fixes InteractiveTest when actions/setup-java sets interactiveMode) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat: visual improvements to worker lines with live test-progress suffix on mvnd-1.x Reshape the live terminal display: a drawn progress bar with percent on the status line, concise arrow-style worker lines (> :module goal (execution)), and dimmed > IDLE slots for free threads. At addProjectLine, append a styled live test-progress suffix (tests/failures/errors/skipped counts plus the current test class#method) driven by the new PROJECT_TEST_PROGRESS message. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix: port PR #1667 review feedback to mvnd-1.x Applies the review-driven fixes from the sibling 2.x PR (#1667): - PROJECT_TEST_PROGRESS now sorts after PROJECT_STARTED/MOJO_STARTED in the sendQueue, avoiding a race where the progress message could be dequeued before its project's PROJECT_STARTED event. - ProjectTestProgressEvent reuses the existing readUTF/writeUTF null-sentinel convention instead of a redundant boolean-prefixed nullable encoding. - Restores the plugin groupId/version in the worker line display, which was dropped by the visual redesign. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
|
@slachiewicz Please assign appropriate label to PR according to the type of change. |
What
Presentation-only reshaping of mvnd's live terminal display, plus the client-side plumbing for a live per-test progress suffix, on
master(2.x, Maven 4).Live now (driven by existing messages)
> :module goal (execution).> IDLEslots for free worker threads.Wired but dormant (client-side only)
PROJECT_TEST_PROGRESSwire message (Message.ProjectTestProgressEvent, round-trip serialization).TerminalOutput.appendTestProgress(...)renders a styled suffix[Tests: N, Failures: .., Errors: .., Skipped: ..] Class#method, with failure/error counts in red.Follow-up
The daemon-side feed that emits
PROJECT_TEST_PROGRESS(the surefireForkNodeFactorybridge) is not implemented onmasteryet, so the test-progress suffix stays dormant until a follow-up commit lands it. This is a deliberate, spike-gated separation; aTODOon thePROJECT_TEST_PROGRESSconstant records it.Verification
commonunit tests pass (message round-trip; bar geometry; suffix formatting and styles), RAT clean.MultiModuleTestintegration test passes (the reshaping did not break message-driven client assertions).🤖 Generated with Cursor