Skip to content

fix(schedule): remove left indentation from hourly density visualization#219

Merged
narthur merged 6 commits intomainfrom
copilot/fix-hourly-density-indent
Jan 27, 2026
Merged

fix(schedule): remove left indentation from hourly density visualization#219
narthur merged 6 commits intomainfrom
copilot/fix-hourly-density-indent

Conversation

Copy link
Contributor

Copilot AI commented Jan 27, 2026

The hourly density chart was indented 4 spaces from the left margin, consuming unnecessary horizontal terminal space.

Changes

  • Removed 4-space prefix from bar chart and hour label lines
  • Reduced line buffers from 76 to 72 characters (eliminating the 4-space offset)
  • Updated position calculations from 4 + (hour * 3) to hour * charsPerHour
  • Introduced constants (hoursPerDay, charsPerHour, densityLineLen) to replace magic numbers

Output

Before:

HOURLY DENSITY
    ▁     █         █     ▃       ▅
    00  06    10        12    15      18      22
    ├───┼─────┼─────────┼─────┼───────┼───────┼────┤
        1     5         1     2       1       3

After:

HOURLY DENSITY
                  ▁▁          ██    ▁▁       ▃▃       ▁▁          ▄▄
00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23
┴──┴──┴──┴──┴──┴──┼──┴──┴──┴──┼──┴──┼──┴──┴──┼──┴──┴──┼──┴──┴──┴──┼──┴
                  1           5     1        2        1           3
Original prompt

This section details on the original issue you should resolve

<issue_title>Schedule command hourly density is indented from the left side of the term making it take more horizontal space than necessary</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)

@narthur @coderabbitai Please analyze this issue and update the description with implementation details, suggested approach, and any relevant technical considerations.

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.


Note

Streamlines the buzz schedule hourly density visualization and updates docs.

  • Removes 4-space left padding from bar, label, axis, and count lines; chart now starts at column 0
  • Replaces magic numbers with hoursPerDay, charsPerHour, and densityLineLen and updates position math to hour * charsPerHour
  • Adjusts buffer sizes and rune arrays to match new computed width; minor refactor of loops using the new constants
  • Updates README example output to reflect the new left-aligned chart

Written by Cursor Bugbot for commit d259ed6. This will update automatically on new commits. Configure here.

Copilot AI and others added 3 commits January 27, 2026 12:26
Co-authored-by: narthur <4655422+narthur@users.noreply.github.com>
Co-authored-by: narthur <4655422+narthur@users.noreply.github.com>
Co-authored-by: narthur <4655422+narthur@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix indentation issue in schedule command hourly density fix(schedule): remove left indentation from hourly density visualization Jan 27, 2026
Copilot AI requested a review from narthur January 27, 2026 12:31
@narthur narthur marked this pull request as ready for review January 27, 2026 12:51
Copilot AI review requested due to automatic review settings January 27, 2026 12:51
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review

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

@github-actions
Copy link

github-actions bot commented Jan 27, 2026

🚀 Pre-release Build Ready

Test builds are ready! Install directly using the bin command:

# Install the pre-release
bin install https://github.com/PinePeakDigital/buzz/releases/tag/pr-219-latest buzz-pr-219
# Run the pre-release
buzz-pr-219
# Uninstall the pre-release
bin remove buzz-pr-219

Direct Download Links

Or download binaries directly from the pre-release page:

💡 No GitHub login required for downloads!

🗑️ This pre-release will be automatically deleted when the PR is closed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request removes unnecessary left indentation from the hourly density visualization in the schedule command, improving terminal space utilization. The changes also improve code maintainability by replacing magic numbers with named constants.

Changes:

  • Removed 4-space left indentation from the hourly density chart output
  • Introduced constants (hoursPerDay, charsPerHour, densityLineLen) to replace magic numbers
  • Updated position calculations to eliminate hardcoded offsets

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
main.go Removed 4-space prefix from bar and label lines, updated buffer sizes from 76 to 72 characters, replaced magic numbers with constants, and updated position calculations
README.md Updated example output to reflect the new unindented format

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@narthur narthur merged commit d637aec into main Jan 27, 2026
6 checks passed
@narthur narthur deleted the copilot/fix-hourly-density-indent branch January 27, 2026 15:08
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.

Schedule command hourly density is indented from the left side of the term making it take more horizontal space than necessary

3 participants