Skip to content

Show the active group name in the Simple status line - #238

Merged
ahogappa merged 1 commit into
masterfrom
feat/group-name-in-status-line
Jun 13, 2026
Merged

Show the active group name in the Simple status line#238
ahogappa merged 1 commit into
masterfrom
feat/group-name-in-status-line

Conversation

@ahogappa

@ahogappa ahogappa commented Jun 11, 2026

Copy link
Copy Markdown
Owner

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_times bookkeeping. No new state in Base.
  • Simple's status line prefixes the primary task's captured output: ⠧ [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:

  1. Temporal attribution — the caption only applies to output emitted under the group: a baseline of the last captured line is snapshotted when a group opens (re-snapshotted when an inner group closes back to an outer one). A quiet group shows its name alone instead of claiming the previous phase's output as its own. This also neutralizes a pre-existing staleness during clean (the run-phase capture's dead last line can never be captioned by a clean-phase group).
  2. Task#group completion via ensure — the duplicated success/rescue notify sites missed non-local exits (break/return/throw) and non-StandardError exceptions (e.g. Timeout.timeout internals), 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. All five exit paths pinned in test_task_group.rb.
  3. Long group names are capped at 15 chars when combined with output, so they can't starve the 40-char stdout budget.

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#group exit-path tests. Verified live on a PTY.

Suite 799 runs / 0 failures, rake standard clean. Theme-independent tests — merges cleanly in either order with #235/#236.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@ahogappa, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3185ab68-713a-4f42-885f-de8713ef9a25

📥 Commits

Reviewing files that changed from the base of the PR and between eb7099b and 1374bee.

📒 Files selected for processing (5)
  • lib/taski/progress/layout/base.rb
  • lib/taski/progress/layout/simple.rb
  • lib/taski/task.rb
  • test/test_layout_simple.rb
  • test/test_task_group.rb
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/group-name-in-status-line

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ahogappa
ahogappa force-pushed the feat/group-name-in-status-line branch 2 times, most recently from 92dd653 to 167a4f8 Compare June 13, 2026 22:37
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>
@ahogappa
ahogappa force-pushed the feat/group-name-in-status-line branch from 167a4f8 to 1374bee Compare June 13, 2026 22:48
@ahogappa
ahogappa merged commit ba27037 into master Jun 13, 2026
8 checks passed
@ahogappa
ahogappa deleted the feat/group-name-in-status-line branch June 13, 2026 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant