Skip to content

feat(metrics): Clarify energy impact ownership and sampling continuity - #112

Merged
bigtomcat6 merged 13 commits into
mainfrom
feat/energy-impact-v2
Aug 7, 2026
Merged

feat(metrics): Clarify energy impact ownership and sampling continuity#112
bigtomcat6 merged 13 commits into
mainfrom
feat/energy-impact-v2

Conversation

@bigtomcat6

@bigtomcat6 bigtomcat6 commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Summary

This branch stabilizes Energy Impact sampling and ownership tracking to avoid stale or inconsistent UI state.

  • close ownership gaps by associating samples with explicit process generations
  • prevent broken sampling continuity after process churn and baseline resets
  • preserve partial sampling state, ranking, and status across updates
  • enforce monotonic sample timing to avoid discontinuities
  • improve owner attribution, impact presentation, and localized text for affected states

How to test

  • Not run automated checks in this task environment.
  • Manual verification:
    • Open Energy Impact and verify process owner badges and state labels stay stable during frequent process start/stop.
    • Confirm sampling continuity by leaving the panel open during short spikes and checking no ownership jumps or ranking flicker.
    • Confirm localized labels remain consistent in supported locales (en/de/fr/ja/ko/zh-Hans/zh-Hant).

Release impact

  • Type: Changed
  • Release note:
    Energy Impact now keeps process ownership and sampling state coherent, reducing stale ownership entries and ranking instability.

Checklist

  • I have seen this code, I have run this code, and I take responsibility for this code.
  • PR title follows type(scope): Summary.
  • Tests or a clear manual verification path are included.
  • User-facing changes include release-note wording or Release impact: None.

@bigtomcat6 bigtomcat6 added the feature PR Label label Aug 7, 2026
@bigtomcat6

Copy link
Copy Markdown
Owner Author

@codex review

@bigtomcat6 bigtomcat6 self-assigned this Aug 7, 2026
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@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: 631841d317

ℹ️ 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 thread Sources/MacActivityCore/Metrics/Providers/EnergyImpactProvider.swift Outdated
Comment thread Sources/MacActivityApp/Models/EnergyImpactPresentation.swift

@bigtomcat6 bigtomcat6 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

reivewed

@bigtomcat6
bigtomcat6 marked this pull request as ready for review August 7, 2026 09:43
@bigtomcat6
bigtomcat6 merged commit e7e3865 into main Aug 7, 2026
13 of 15 checks passed
@bigtomcat6
bigtomcat6 deleted the feat/energy-impact-v2 branch August 14, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature PR Label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant