Conversation
Update the ASCII hourly chart to use a consistent 3-character width per hour (two bar characters + one space), increasing the chart line from 24 to 72 positions plus a 4-character left prefix. This change improves horizontal spacing so each hour has a wider visual column and labels align more clearly. - Render each hour's bar as a 2-character wide block (write the same bar rune twice) followed by a space to create uniform columns. - Expand label, axis, and count buffers from 28 to 76 runes to match the new 3-char-per-hour layout; compute positions as 4 + hour*3. - Show labels for all 24 hours (00–23) instead of a sparse selection. - Draw axis markers for every hour and fill horizontal segments between the first and last marker. - Change count label formatting: use " ∞" for counts >99 and right-align counts in a 2-character field to prevent truncation and keep columns aligned. - Simplify bar selection by assigning the computed rune to a variable before writing, and ensure nonzero counts map to at least one bar level. These adjustments make the chart easier to read and keep hour-aligned elements consistent across the rendered lines.
…nicode codepoint escape for the infinity symbol to ensure consistent encoding across environments Change number formatting from right-aligned to left-aligned in the 2-character badge field so small counts render more predictably within the fixed-width slot. This improves visual consistency of count badges and avoids encodingissues with literal symbols source files.
When rendering the hour axis, use a downward-only tick (┴) for hours that have zero counts and a full cross (┼) for hours with counts. This makes the axis visually reflect whether an hour extends down (from counts) or only up, improving clarity of the chart.
Use a strings.Builder to construct the hour label line and apply ANSI gray color to hours that have zero counts. This replaces the previous fixed-width rune buffer approach and simplifies label assembly while visually de-emphasizing inactive hours. Keep spacing and output layout unchanged.
Improve timeline printing by wrapping long goal lists to fit the terminal width and indenting wrapped lines for readability. - Preserve original "HH:MM ├─ " prefix and compute its visual width. - Read COLUMNS env var (fallback to 80) to determine available width. - Split goals on commas and assemble lines so they don't exceed width, printing a new indented continuation line when needed. - Use a vertical continuation marker and consistent indentation to align wrapped content with the goals column. - Add fallbacks and minimal safety width to avoid pathological layouts. This prevents overflowing long goal lists and improves clarity on narrow terminals.
Refactor goal-wrapping logic to correctly split and wrap long comma-separated goal lists across multiple output lines. - Move goals splitting and line builder setup out of inner loop for clearer control flow. - Iterate over goals without relying on index; compute separator based on current line content. - When a goal does not fit, print current line, start a new wrapped line prefixed with a vertical continuation marker, and write the overflowing goal to the new line. - Ensure a trailing comma is added when wrapping to indicate there are more goals on the next line. These changes fix incorrect separator handling and ensure wrapped lines maintain readable indentation and punctuation.
Add ANSI color sequences to the timeline printer to improve visual clarity. Time labels now appear in cyan and the tree/continuation characters (├─ and │) appear in gray. Wrapped continuation lines also include the colored vertical separator so wrapped text keeps the same visual structure. This change updates prefix construction and the continuation-line indent so widths remain correct while inserting color escape codes.
Update hour label and timeline rendering to avoid emitting ANSI color sequences when colors are disabled. Detect the terminal color profile and only apply gray/cyan/reset escape codes if a non-ASCII color profile is in use. Key changes: - Add colorProfile detection before building hour labels and skip dimming (gray) when colors are disabled. - Guard time/tree/reset color variables for timeline output behind the same colorProfile check to prevent bare escape codes when --no-color is used. This prevents visible raw ANSI sequences from appearing in environments where colors are turned off and keeps visual dimming when colors are available.
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughdisplayHourlyDensity was rewritten to render a 24-hour, two-character-per-hour bar chart with expanded count/axis areas and computed first/last markers; displayTimeline now detects color support and wraps long goal lists to terminal width (COLUMNS) with comma-aware multi-line breaks and colored continuation prefixes; handleScheduleCommand uses these renderers. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
🚀 Pre-release Build ReadyTest builds are ready! Install directly using the # Install the pre-release
bin install https://github.com/PinePeakDigital/buzz/releases/tag/pr-215-latest buzz-pr-215# Run the pre-release
buzz-pr-215# Uninstall the pre-release
bin remove buzz-pr-215Direct Download LinksOr download binaries directly from the pre-release page:
|
There was a problem hiding this comment.
Pull request overview
This PR refines the schedule visualization output, improving the hourly density chart and the textual timeline display for goal deadlines.
Changes:
- Adjusts
displayHourlyDensityto use fixed-width bars and labels for all 24 hours, adds colored de-emphasis for empty hours, and aligns axis/count labels to the new layout. - Enhances
displayTimelinewith optional color for time and tree glyphs, and adds width-aware wrapping of goal lists based on theCOLUMNSenvironment variable.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@main.go`:
- Around line 1310-1325: The label-building loop uses raw ANSI escapes to dim
zero-count hours; replace that with lipgloss styling for consistency by creating
a dim style (e.g., via lipgloss.NewStyle().Foreground(lipgloss.Color(...)) or
.Foreground(lipgloss.AdaptiveColor(...)) and using it when hourCounts[hour]==0
and colorProfile!=termenv.Ascii; update the code around lipgloss.ColorProfile(),
termenv.Ascii, and labelLine so you call style.Render(label) instead of
concatenating "\033[90m" and "\033[0m", preserving the same spacing and
formatting.
- Around line 1413-1431: The prefix visual width is being measured with
len([]rune(prefix)) which counts ANSI color escape sequences; update the
calculation in main.go (the block that builds prefix and computes
prefixWidth/available) to strip ANSI escape sequences from prefix before
counting runes (e.g., remove patterns like ESC [ ... m) so prefixWidth reflects
visible characters only, then use len([]rune(cleanPrefix)) for width math;
ensure the logic still falls back to minimal safety width when cleaned
prefixWidth >= available.
Use a lipgloss style for dimming hour labels instead of raw ANSI escape codes. This centralizes styling through the color profile and avoids embedding raw control sequences in strings. Replace the dynamic rune-based prefix width calculation with a constant visual width for the formatted time/tree prefix. ANSI escape sequences are zero-width, so using a fixed visual width (9) simplifies wrapping math and prevents incorrect available width computation when prefixes contain color codes.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@main.go`:
- Around line 1397-1406: The timeline color variables currently use raw ANSI
codes; replace them with lipgloss styles for consistency: create lipgloss styles
(e.g., timeStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("36")) and
treeStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("90"))) in place of
timeColor/treeColor/resetColor, and update any timeline rendering to call
timeStyle.Render(timeStr) and treeStyle.Render("├─"/"│") instead of
concatenating ANSI strings; ensure any checks against termenv.Ascii remain to
disable styling when appropriate (same logic used around displayHourlyDensity).
Use lipgloss styles instead of embedding raw ANSI escape codes for timeline elements. Replace string color variables with lipgloss Style objects (timeStyle, treeStyle) and render colors via lipgloss.Render so styling integrates with lipgloss/termenv color detection and respects the --no-color/ASCII fallback. Update prefix and continuation line construction to use the new styles (timeStyle.Render and treeStyle.Render) instead of manual escape sequences, and simplify color handling logic. This makes the code clearer, safer (avoids manual ANSI), and consistent with the project's styling library.
Summary by CodeRabbit
New Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.