Show the active group name in the Simple status line - #238
Conversation
|
Warning Review limit reached
More reviews will be available in 39 minutes and 58 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
92dd653 to
167a4f8
Compare
The GUIDE's Group Blocks section documents the status line as "| GroupName: output..." and sells groups with "see which phase is currently executing" — but no layout ever rendered the group name alongside output; Simple showed the bare captured line. Implement the documented behavior. Layout::Base gains active_group_name(task_class): the most recently started still-open group, read from the existing @group_start_times bookkeeping. Simple's status line prefixes the primary task's captured output with it — but only output emitted UNDER the group: a baseline of the last captured line is snapshotted when a group opens (and re-snapshotted when an inner group closes back into an outer one), so a quiet group shows its name alone instead of captioning the previous phase's output as its own. Long group names are capped at 15 chars when combined with output so they cannot starve the 40-char stdout budget. Width truncation applies to the combined string as before. Also converts Task#group completion notification from duplicated success/rescue sites to a single ensure: break/return/throw and non-StandardError exceptions previously skipped the completion event, leaking the group open — which this feature would have surfaced as a stale "GroupName:" caption for the rest of the run and the clean phase. Pinned for all five exit paths in test_task_group.rb. Verified live on a PTY: "| Bundling: tar -czf pkg.tar.gz /tmp/as..." Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
167a4f8 to
1374bee
Compare
Problem
Found while recording the theme demo: the GUIDE's Group Blocks section documents the status line as
| GroupName: output...and lists "Progress visibility: see which phase is currently executing" as a key benefit — but no layout ever rendered the group name. Pre-existing docs/behavior drift.Fix
Implement the documented behavior:
Layout::Base#active_group_name(task_class)— the most recently started still-open group, from the existing@group_start_timesbookkeeping. No new state in Base.⠧ [3/4] Package | Bundling: tar -czf pkg.tar.gz ...— or shows the group name alone before the group's first output line.Two correctness points from the adversarial review folded in:
Task#groupcompletion viaensure— the duplicated success/rescuenotify sites missed non-local exits (break/return/throw) and non-StandardError exceptions (e.g.Timeout.timeoutinternals), leaking the group open — which this feature would have surfaced as a staleGroupName:caption for the rest of the run and the clean phase. All five exit paths pinned intest_task_group.rb.Tests
Eight status-line tests (under-group caption, name-alone, pre-group output not captioned, prefix dropped on completion, overlapping-group robustness with per-group baselines, per-task isolation, long-name cap) + six
Task#groupexit-path tests. Verified live on a PTY.Suite 799 runs / 0 failures,
rake standardclean. Theme-independent tests — merges cleanly in either order with #235/#236.🤖 Generated with Claude Code