Skip to content

fix: deduplicate charging status and refresh live telemetry - #36

Merged
progresshans merged 2 commits into
developfrom
feature/deduplicate-status-live-refresh
Aug 29, 2026
Merged

progresshans merged 2 commits into
developfrom
feature/deduplicate-status-live-refresh

Conversation

@progresshans

@progresshans progresshans commented Aug 29, 2026 •

Copy link
Copy Markdown
Owner

What changed

  • keep managed charging as the primary header status and remove the same semantic item from popover and Dashboard summary diagnostics
  • retain managed charging in the full diagnostics view and whenever a sustained power-delivery warning owns the header
  • refresh immediately when the popover or a managed window becomes visible, including while startup history preparation is still running
  • restart the telemetry loop when presentation cadence changes without superseding an initial read already in flight
  • derive live, delayed, and critical freshness presentation from the actual sample age
  • document the user-visible fixes in the Unreleased changelog section

Related issue

No linked issue.

Evidence

  • an 80% managed charging hold previously repeated the same status in the header and summary diagnostics
  • a successful sample could still be labeled live at 10 seconds old because health and age were rendered independently
  • summary deduplication is based on diagnostic kind rather than localized display text
  • opening a surface during startup history loading previously returned before starting a telemetry read

Verification

  • POWERLENS_BUILD_SYSTEM=native ./script/test_swiftpm.sh — 231 tests in 26 suites passed; the full suite was repeated three times
  • POWERLENS_BUILD_SYSTEM=swiftbuild ./script/test_swiftpm.sh — 231 tests in 26 suites passed
  • Relevant managed-charging, stale-sample, startup, and cadence-transition cases are covered
  • Existing English and Korean telemetry copy/placeholders were checked by the localization suite
  • git diff --check
  • CHANGELOG.md was updated for the next user-visible release
  • Privacy, release, or security docs: N/A; no data collection, storage schema, private-API contract, or distribution behavior changed
  • bash script/test_generate_release_notes.sh

Risk

Automatic refresh now distinguishes history preparation, the initial telemetry read, and the running loop. An interactive request during history preparation performs a display-only read with history persistence disabled; once the normal initial read is in flight, that read is reused so startup persistence is not superseded. Sequence checks continue to discard stale overlaps, and failures remain visible through delayed or unavailable telemetry health. The change does not alter sensor selection, history schema, or charging-policy detection. Full diagnostics retain the managed-charging item so only redundant summary presentation is removed.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-08-29T09:40:20.999909Z 533a556 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@progresshans progresshans self-assigned this Aug 29, 2026

@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: 87e5c453ea

ℹ️ 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/PowerLens/PowerLensStore.swift Outdated
@progresshans
progresshans merged commit eff64c9 into develop Aug 29, 2026
5 checks passed
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