Skip to content

feat(power-status): make high energy apps collapsible - #504

Open
AndrewDi wants to merge 1 commit into
mactools-app:mainfrom
AndrewDi:feat/power-status-collapsible-energy-apps
Open

AndrewDi wants to merge 1 commit into
mactools-app:mainfrom
AndrewDi:feat/power-status-collapsible-energy-apps

Conversation

@AndrewDi

@AndrewDi AndrewDi commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Problem and result

The high energy apps list was always visible and sampled continuously while the Power Status panel was open. It is now a collapsible section that starts collapsed and only samples while expanded, reducing background work. The redundant total wattage in the panel header is also removed because the power flow rows already report the current draw.

Changes

  • Make the high energy apps section expandable and collapsed by default.
  • Sample app energy only while the panel is visible and the section is expanded; reset readings when collapsed or hidden.
  • Show localized loading and empty placeholder rows.
  • Remove the duplicate header wattage.
  • Add layout coverage and localized strings for the new section states.

Verification

  • make test TEST_FILTER=PowerStatusPluginTests passed.
  • make build-plugin PLUGIN=PowerStatus passed.
  • make validate-localization passed (79 catalogs, 6523 keys).
  • make validate-changelog passed.
  • Manual check with make run: the section starts collapsed, expands and collapses correctly, and the header wattage is gone.

UI evidence

Verified manually in MacTools Dev. The collapsible header is visible as 高耗电应用; the first row now shows only 电池供电, without the duplicate 17 W indicator.
image

Checklist

  • Core behavior and relevant risks are verified using existing tests, focused additions, or manual checks; results or limitations are recorded.
  • UI evidence is attached where applicable; shared components, themes, localization, and accessibility are respected.
  • User-facing documentation and changelog fragments are updated when required.
  • Plugin metadata, runtime contracts, action policies, and minimum-host compatibility agree.
  • Licensing and third-party notices are complete; no credentials, local configuration, or unrelated generated files are included.

Keep the high energy apps list collapsed by default, sample it only while expanded, and show loading or empty placeholders. Remove the duplicate header wattage since the power flow rows already report the current draw.
@AndrewDi

Copy link
Copy Markdown
Contributor Author

@ggbond268 PTAL

This branch has not been deployed

No deployments
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