Show battery usage for the current unplugged session#5
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6a8aa6b122
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| var usesLivePower: Bool { | ||
| self == .session || self == .today |
There was a problem hiding this comment.
Gate Session live rows to active battery sessions
When the user is plugged into AC and selects Session to inspect the last battery session, this still makes Session consumers attach/render the shared live-power layer; PopoverView and StatsView pass live.hybrid whenever range.usesLivePower, so current AC activity can appear above (and be clickable as part of) a completed battery session. Gate live power on an active/off-AC session instead so last-session usage is not mixed with unrelated current activity.
Useful? React with 👍 / 👎.
What changed
Why
Users want to understand which apps consumed battery during the specific period since they unplugged, without losing the existing full-day view.
Verification