Skip to content

Restore support for the bar view on the date and time meters. - #2130

Open
lvaschmidt wants to merge 4 commits into
htop-dev:mainfrom
lvaschmidt:main
Open

lvaschmidt wants to merge 4 commits into
htop-dev:mainfrom
lvaschmidt:main

Conversation

@lvaschmidt

Copy link
Copy Markdown

This overturns a little bit of #1387 , restoring the bar type for Time, Date, and Date & Time meters. This addresses this comment by execvpe, which @BenBE seemed open to?

This change restores those meters to the way they were, reusing the code from before the change, so I wasn't writing new code.

Screenshot 2026-10-07 at 4 36 14 PM

^Here's how they look in my testing of this PR.

One tiny additional change is to fix the oversight in the Black Night theme that failed to label the Date and DateTime meters green the way all similar meters are labeled in that theme.

Screenshot 2026-10-07 at 4 36 32 PM

^The date meters in the corrected color.

I also changed the caption of the date meter in the bar mode to "D&T", which seemed appropriate as far as I could tell.

ChatGPT helped make the PR, and I tested it by hand.

lvaschmidt and others added 4 commits October 7, 2026 15:40
Restore the historical day and year progress calculations and enable bar mode for Clock and Date.

Assisted-by: ChatGPT
Assisted-by: ChatGPT
Signed-off-by: Lysander Schmidt <me@LysanderSchmidt.com>
I verified this compiles and runs correctly, restores the bar format, and I also corrected the fact that the date meter did not have an assigned color pair in the Black Night theme (which I prefer). So I set it to match the clock color, which I think is a fair guess of the intention of the theme creator.

<img width="655" height="83" alt="Screenshot 2026-10-07 at 4 01 41 PM" src="https://github.com/user-attachments/assets/62f8ea43-b39b-4e8c-b1be-beec796ab00e" />

^The bar meters back to their former glory.

<img width="150" height="53" alt="Screenshot 2026-10-07 at 4 02 27 PM" src="https://github.com/user-attachments/assets/610b11f0-071d-498d-a0e0-c32c6c79c900" />

^The date showing in green (my update to the theme) instead of the probably unintentional blue.
Restore year-progress bar mode, match the Black Night clock color, and use D&T only for the bar caption.

Assisted-by: ChatGPT
Signed-off-by: Lysander Schmidt <me@LysanderSchmidt.com>
@coderabbitai

coderabbitai Bot commented Oct 7, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: f5500134-d066-404c-ae67-b27b172ea0b3
📥 Commits

Reviewing files that changed from the base of the PR and between 44a59cf and 8311809.

📒 Files selected for processing (2)
  • CRT.c
  • DateTimeMeter.c

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The clock, date, and date-time meters now support bar mode and expose progress values. Date and date-time totals account for Gregorian leap years. The date-time meter uses D&T as its bar-mode caption. In the BLACKNIGHT color scheme, DATE and DATETIME now use green on black.

Priority: ⬇️ Low

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 83118

Clock, date, and date-time meters now support progress bars, and the Black Night colors match the clock meter. No concrete user-impacting issue remains; the change is ready for normal checks.

  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

The clock marks minutes through the day
The date counts days along its way
Leap years add a day to count
Bar mode shows the changing amount
Green lights DATE and DATETIME
Each meter keeps its time in line

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

@BenBE BenBE added the needs-discussion 🤔 Changes need to be discussed and require consent label Oct 8, 2026
@fasterit

fasterit commented Oct 9, 2026

Copy link
Copy Markdown
Member

@BenBE and me would generally be in favor of merging this.

But: This is AI messy, so please:

  • Clean up the code (no _getCaption etc.)
  • Make two clean commits, one for the color fix and one for the restoration of the bar style functionality
  • Use proper Assisted-by: lines in the commit description
  • Review everything manually. Then force push to this PR.

@fasterit fasterit added needs-AI-cleanup 🧟 Stacks of sequential commits and/or AI noise // Incorrect Assisted-by: // Styleguide violations and removed needs-discussion 🤔 Changes need to be discussed and require consent labels Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-AI-cleanup 🧟 Stacks of sequential commits and/or AI noise // Incorrect Assisted-by: // Styleguide violations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants