Software projects

SwiftUI / macOS

Current

I defined Current’s features and behavior to better understand power use on my Mac, then tested it through everyday use.

View on GitHub
Current app icon

Why I started it

I wanted clearer information about what was consuming power on my own Mac. Current became a menu-bar app for battery drain, charging history, temperatures, and process activity.

My role and requirements

I defined seven-day history, charging events, runtime estimates, Celsius and Fahrenheit options, menu-bar operation, and automatic startup. Through everyday use, I reported inaccurate estimates, layout problems, and misleading battery breakdowns. I also chose how background CPU limiting should behave.

A dashboard that showed 691% used

One major bug showed “691.0% used” and “691.0% system & unassigned,” with no individual apps listed. I caught the mismatch by comparing the dashboard with my actual Mac usage. Inspecting the saved database showed that app energy was still being recorded: a missing battery-capacity field caused the percentage calculation to return zero and hide the app rows.

Separating measurements from estimates

The fix ranked apps using recorded CPU energy directly and added a fallback for capacity fields nested inside BatteryData. The display also changed from misleading per-app battery percentages to separate views of total discharge and recorded process CPU energy. That distinction keeps a measured process value from being presented as a complete share of battery drain.

CPU caps that respect active use

I chose CPU caps that apply only while an app is in the background. I then requested a 30-second or one-minute grace period because leaving an app should not cap it immediately. Returning to the app lifts the cap; leaving it again starts the delay before the cap reapplies.

Testing everyday use and recovery

My hands-on testing exposed battery-drain mismatches, inaccurate runtime and health readings, and menu-bar and layout problems. Version 1.3 passed 28 automated unit tests. Disposable CPU-load processes also exercised cap enforcement and recovery after worker crashes or freezes.

Checking the saved-history regression

For version 1.3.1, XCTest was unavailable. A separate Swift regression check verified rankings against a copy of saved history, CPU-time fallback, live CPU watts, and gaps in battery-power samples.

Narrowing the scope

After discovering that macOS already provided charge limiting, I chose to focus Current on monitoring and history while macOS handled charging. Later bug reports also led to a clearer separation between total battery discharge and recorded process CPU energy.

Release and documentation

The public repository contains release downloads and documentation; application source is not public.

Software projects