Skip to content

Name the power source on the PL2 slider - #188

Closed
anaveto wants to merge 2 commits into
IHulkSmashI:mainfrom
anaveto:fix/pl2-label-power-source
Closed

anaveto wants to merge 2 commits into
IHulkSmashI:mainfrom
anaveto:fix/pl2-label-power-source

Conversation

@anaveto

@anaveto anaveto commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Problem:

  • ClawDeck keeps a PL2 value for each power source.
  • Only the explanation text says so, and that text is hidden by default.
  • A PL2 value set on the charger seemed lost on battery: on battery, the slider showed TDP + 2 W.

Change:

  • The label of the slider shows the power source: "PL2 plugged in (W)" or "PL2 on battery (W)".
  • When the charger is plugged in or out, an open Power panel reads its state again after the backend changes to the picks of the new power source. Before, the panel read its state again only while a game ran. Thus, without a game, the label, the picks and the PL2 value of the other power source stayed until the panel was closed and opened again.

Test results:

  • Problem seen on a Claw 8 EX (MS-1T91): 45 W set on the charger showed as 32 W on battery.
  • The label: the side panel showed the correct power source (manual check on the device, 2026-11-14). In that test, a change of the charger state showed only after the panel was closed and opened again. The second change corrects this: with the second change, the label changed when the charger was plugged in and out, with the panel open (manual check on the device, 2026-11-14).
  • pytest on Linux (on the Claw, Python 3.15.2), this branch alone on main: 261 passed.
  • Rollup build and typecheck: pass.

🤖 Generated with Claude Code (model: Claude Opus 5.5, effort: xhigh)

PL2 is saved per power source, but only the hidden explanation said so:
a PL2 set while plugged in looked lost on battery.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@anaveto
anaveto marked this pull request as ready for review November 14, 2026 12:35
@anaveto
anaveto marked this pull request as draft November 14, 2026 12:47
The PL2 slider's label (and the picks and PL2 it shows) stayed on the old power source until the panel was closed and
opened again (user test, 2026-11-14): the panel only re-read its state on its own while a game ran. Once the backend
has switched to the new power source's picks (index.tsx), an open Power panel reads its state again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@IHulkSmashI

Copy link
Copy Markdown
Owner

Merged through #190 together with the others (your commits, rebased onto main, conflicts between the fan PRs resolved by keeping both sides) and released in beta 17. Thanks a lot for all of this, it's a huge batch of real fixes! #179 is still open since it's marked draft.

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