Skip to content

feat: implement battery history#24

Merged
v81d merged 28 commits intomainfrom
feature/implement-battery-history
Dec 27, 2025
Merged

feat: implement battery history#24
v81d merged 28 commits intomainfrom
feature/implement-battery-history

Conversation

@v81d
Copy link
Owner

@v81d v81d commented Dec 26, 2025

No description provided.

v81d added 25 commits December 22, 2025 22:07
Adjust device list navigation keyboard shortcut to align with GNOME
Human Interface Guidelines.
Use Cairo to create a utility class that allows the app to draw line
graphs to display history.
Copy link

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 PR implements battery history visualization functionality for the Wattage application. The feature allows users to view historical data for power devices including charge and rate metrics over configurable time periods.

Key Changes

  • Added chart drawing functionality using Cairo to visualize battery history
  • Integrated UPower D-Bus GetHistory method to retrieve historical device data
  • Added UI controls for configuring history type, timespan, and resolution
  • Refactored code style (removed braces from single-line conditionals)

Reviewed changes

Copilot reviewed 19 out of 26 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/utils/chart-drawer.vala New file implementing line graph visualization using Cairo
src/window.vala Added history dialog UI, settings integration, and code style refactoring
src/utils/numeric-toolkit.vala Removed static keyword from functions and added utility methods
src/utils/device-manager.vala Made stringify methods public and added has_history property
src/interfaces/dbus-upower.vala Added GetHistory D-Bus method and HistoryItem struct
src/ui/window.ui Added Device History menu item and adjusted margins
src/ui/preferences-dialog.ui Added subtitles to preference options
src/meson.build Added cairo dependency
data/meson.build Added schema compilation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@v81d v81d force-pushed the feature/implement-battery-history branch from a6e745e to 0ad6c2c Compare December 27, 2025 03:35
@v81d v81d self-assigned this Dec 27, 2025
@v81d v81d merged commit 76deb3c into main Dec 27, 2025
1 check passed
@v81d v81d deleted the feature/implement-battery-history branch December 27, 2025 04:04
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