Skip to content

Show battery usage for the current unplugged session#5

Merged
EClinick merged 4 commits into
masterfrom
task/ec/session-today
Jul 23, 2026
Merged

Show battery usage for the current unplugged session#5
EClinick merged 4 commits into
masterfrom
task/ec/session-today

Conversation

@EClinick

Copy link
Copy Markdown
Owner

What changed

  • adds a Session range for the current or most recent off-charger period
  • defaults new views to Session while unplugged and Today while charging
  • shows shared live power alongside cumulative Session and Today usage, with independently collapsible live rows in the popover
  • keeps Session detail views and coverage messaging tied to exact retained PowerLog intervals
  • splits session history at unobserved telemetry gaps and avoids unused Today-history refreshes while Session is selected

Why

Users want to understand which apps consumed battery during the specific period since they unplugged, without losing the existing full-day view.

Verification

  • 184 Swift tests across 23 suites
  • signed universal Juice Dev app bundle, helper, and Sparkle verification
  • 3 Codex review rounds
  • fixed four valid review findings covering retention, telemetry gaps, partial-session labeling, and Session-only polling
  • final review reported only two stale design-artifact comments that conflict with the later approved direction; no remaining code findings

Copilot AI review requested due to automatic review settings July 23, 2026 04:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
website Ignored Ignored Jul 23, 2026 4:10am

@EClinick
EClinick merged commit 0155bc2 into master Jul 23, 2026
2 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +41 to +42
var usesLivePower: Bool {
self == .session || self == .today

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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.

2 participants