Skip to content

Conversation

@rubenmarcus
Copy link
Member

@rubenmarcus rubenmarcus commented Feb 6, 2026

Summary

Complete CLI visual overhaul for conference-ready demos:

  • Shimmer replaced with a readable subtle pulse (white/cyan alternation)
  • Box-drawing UI (┌─┐│└─┘) for startup summary, iteration headers, and completion banner
  • Progress bar with ████░░░░ displaying iteration count and live cost
  • Startup summary box showing agent, max loops, validation, skills, auto-commit
  • Status separators between iterations with progress, cost, and elapsed time
  • Compact validation feedback — one-line summary instead of verbose error dumps

New file

  • src/ui/box.tsdrawBox(), drawSeparator(), renderProgressBar() utilities

Changes

  • src/ui/shimmer.ts — Replace per-character shimmer with slow pulse
  • src/ui/progress-renderer.ts — Add progress bar, iteration tracking, live cost
  • src/loop/executor.ts — Box headers, startup summary, completion banner, status lines

Test plan

  • pnpm build passes
  • pnpm test — 143 tests pass
  • Visual verification of all box-drawing renders correctly
  • Test on narrow terminal (80 cols)

Generated by ralph-starter

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features

    • Added formatted box-based output for startup information, iteration headers, and completion summaries.
    • Integrated progress bar with iteration tracking and optional cost display.
  • Improvements

    • Enhanced validation failure reporting with consolidated error summaries.
    • Added separators between iterations with elapsed time and cost information.
    • Improved task display with dynamic name truncation based on terminal width.
    • Refined visual shimmer effect for better performance.

rubenmarcus and others added 4 commits February 6, 2026 06:02
Replace the per-character color cycling shimmer effect with a
subtle slow pulse between white and cyan. Much more readable
and accessible while still providing visual feedback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add box.ts with drawBox(), drawSeparator(), and renderProgressBar()
helpers. Update ProgressRenderer with iteration tracking, progress
bar display, and live cost indicator.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace plain separator lines with box-drawing UI throughout the
executor. Adds a startup config summary box, per-iteration header
boxes with agent/iteration info, and a clean completion banner
with stats. Wire progress bar with iteration and cost tracking.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Show a status separator between iterations with iteration count,
task progress, cost, and elapsed time. Replace verbose validation
error output with a compact one-line summary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

💡 Issue Linking Reminder

This PR doesn't appear to have a linked issue. Consider linking to:

  • This repo: Closes #123
  • ralph-ideas: Closes rubenmarcus/ralph-ideas#123

Using Closes, Fixes, or Resolves will auto-close the issue when this PR is merged.


If this PR doesn't need an issue, you can ignore this message.

@coderabbitai
Copy link

coderabbitai bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

The pull request enhances the executor's user interface by introducing styled terminal boxes, separators, and progress bars for improved visual feedback. New utilities in a dedicated ui/box.ts module support formatted output, while the progress renderer gains iteration-based progress tracking and the executor integrates these features throughout its output pipeline.

Changes

Cohort / File(s) Summary
Terminal UI Utilities
src/ui/box.ts
New module providing four exported functions: getTerminalWidth() for terminal width detection, drawBox() for Unicode-bordered boxes with optional coloring, drawSeparator() for horizontal separators with centered labels, and renderProgressBar() for visual progress display.
Progress Rendering Enhancement
src/ui/progress-renderer.ts
Added iteration-based progress tracking with updateProgress() method; tracks currentIteration, maxIterations, and currentCost; renders dual-line output with progress bar when iterations exceed zero.
Animation Logic Refactor
src/ui/shimmer.ts
Simplified shimmer animation from per-character color mapping to phase-based pulse effect toggling between white and cyan text; internal implementation change with no public signature alterations.
Executor UI Refactor
src/loop/executor.ts
Replaced console.log calls with styled box-based outputs for startup summary, per-iteration headers, validation failure reporting, and completion messages; integrated progress renderer for cost tracking; added elapsed time separators between iterations; enhanced rate-limit wait feedback with live countdown.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 Behold the boxes bright and bold,
Progress bars with stories told,
Separators drawing lines so clean,
The finest terminal UI I've seen!
With shimmer pulses soft and true,
This executor's born anew!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: visual/UI enhancements to the CLI including box-drawing, progress bars, and improved output readability, which aligns with the file changes and PR objectives.
Docstring Coverage ✅ Passed Docstring coverage is 85.71% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/beautiful-cli

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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

✔️ Bundle Size Analysis

Metric Value
Base 1523.16 KB
PR 1533.82 KB
Diff 10.66 KB (0%)
Bundle breakdown
156K	dist/auth
28K	dist/automation
4.0K	dist/cli.d.ts
4.0K	dist/cli.d.ts.map
16K	dist/cli.js
12K	dist/cli.js.map
348K	dist/commands
28K	dist/config
4.0K	dist/index.d.ts
4.0K	dist/index.d.ts.map
4.0K	dist/index.js
4.0K	dist/index.js.map
536K	dist/integrations
56K	dist/llm
588K	dist/loop
148K	dist/mcp
32K	dist/presets
92K	dist/setup
392K	dist/sources
76K	dist/ui
304K	dist/wizard

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/ui/box.ts`:
- Around line 56-68: In renderProgressBar, guard against total === 0 before
computing ratio so current/total doesn't produce NaN; for example, if total ===
0 set ratio = current > 0 ? 1 : 0 (then clamp with Math.min/Math.max as before)
so filled/empty are valid integers and the bar shows full when progress exists
or empty when none; update the ratio computation near the top of
renderProgressBar to handle this case.
🧹 Nitpick comments (1)
src/ui/box.ts (1)

24-30: Long lines may overflow the box boundaries.

If a line's content exceeds innerWidth, the padding becomes 0 but the line itself isn't truncated, causing visual misalignment with the box borders. Consider truncating long lines or wrapping them.

💡 Optional fix to truncate long lines
   for (const line of lines) {
     // Strip ANSI codes to measure real length
     // biome-ignore lint/suspicious/noControlCharactersInRegex: ANSI escape sequence detection requires control characters
     const stripped = line.replace(/\u001b\[[0-9;]*m/g, '');
-    const padding = Math.max(0, innerWidth - stripped.length);
-    output.push(color('│') + line + ' '.repeat(padding) + color('│'));
+    const padding = innerWidth - stripped.length;
+    if (padding >= 0) {
+      output.push(color('│') + line + ' '.repeat(padding) + color('│'));
+    } else {
+      // Truncate line to fit (preserving ANSI codes is complex, so truncate stripped)
+      const truncated = stripped.slice(0, innerWidth - 1) + '…';
+      output.push(color('│') + truncated + color('│'));
+    }
   }

Comment on lines +56 to +68
export function renderProgressBar(
current: number,
total: number,
options: { width?: number; label?: string } = {}
): string {
const barWidth = options.width || 20;
const ratio = Math.min(1, Math.max(0, current / total));
const filled = Math.round(ratio * barWidth);
const empty = barWidth - filled;
const bar = `${'█'.repeat(filled)}${'░'.repeat(empty)}`;
const info = options.label ? ` │ ${options.label}` : '';
return `${chalk.cyan(bar)} ${current}/${total}${chalk.dim(info)}`;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Division by zero produces an empty progress bar.

When total is 0, the ratio calculation results in NaN, causing both filled and empty to be NaN. While String.prototype.repeat handles this gracefully (returning empty strings), the progress bar will appear empty rather than showing a meaningful state.

🛡️ Proposed fix to handle zero total
 export function renderProgressBar(
   current: number,
   total: number,
   options: { width?: number; label?: string } = {}
 ): string {
   const barWidth = options.width || 20;
-  const ratio = Math.min(1, Math.max(0, current / total));
+  const ratio = total > 0 ? Math.min(1, Math.max(0, current / total)) : 0;
   const filled = Math.round(ratio * barWidth);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export function renderProgressBar(
current: number,
total: number,
options: { width?: number; label?: string } = {}
): string {
const barWidth = options.width || 20;
const ratio = Math.min(1, Math.max(0, current / total));
const filled = Math.round(ratio * barWidth);
const empty = barWidth - filled;
const bar = `${'█'.repeat(filled)}${'░'.repeat(empty)}`;
const info = options.label ? ` │ ${options.label}` : '';
return `${chalk.cyan(bar)} ${current}/${total}${chalk.dim(info)}`;
}
export function renderProgressBar(
current: number,
total: number,
options: { width?: number; label?: string } = {}
): string {
const barWidth = options.width || 20;
const ratio = total > 0 ? Math.min(1, Math.max(0, current / total)) : 0;
const filled = Math.round(ratio * barWidth);
const empty = barWidth - filled;
const bar = `${'█'.repeat(filled)}${'░'.repeat(empty)}`;
const info = options.label ? ` │ ${options.label}` : '';
return `${chalk.cyan(bar)} ${current}/${total}${chalk.dim(info)}`;
}
🤖 Prompt for AI Agents
In `@src/ui/box.ts` around lines 56 - 68, In renderProgressBar, guard against
total === 0 before computing ratio so current/total doesn't produce NaN; for
example, if total === 0 set ratio = current > 0 ? 1 : 0 (then clamp with
Math.min/Math.max as before) so filled/empty are valid integers and the bar
shows full when progress exists or empty when none; update the ratio computation
near the top of renderProgressBar to handle this case.

@rubenmarcus rubenmarcus removed the candidate-release PR is ready for release label Feb 10, 2026
rubenmarcus added a commit that referenced this pull request Feb 10, 2026
…ut (#134)

- Box-drawing characters for structured terminal output
- Animated progress bar for loop iterations
- Shimmer effect for active task display
- Improved readability of all CLI output
- Merged with source icons from #133

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rubenmarcus
Copy link
Member Author

Merged into staging/pre-conference branch for pre-conference release testing. Will be included in the stable release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant