Skip to content

Plan reversible link-box heat steps from measured shares - #87

Draft
pjeweb wants to merge 7 commits into
osb/pr/heat-client-leasefrom
osb/pr/heat-link-box-share
Draft

pjeweb wants to merge 7 commits into
osb/pr/heat-client-leasefrom
osb/pr/heat-link-box-share

Conversation

@pjeweb

@pjeweb pjeweb commented Nov 14, 2026 •

Copy link
Copy Markdown

Why

When a box gets hot while carrying a phone's stream, it has to cool down somehow, but switching off a link or the hotspot would cut the very connection the phone is streaming over. The box needs a way to shed a little load without touching what the stream depends on. This draft prepares the checks for that: resting one lightly used link and, at critical heat, pausing internet for one other Wi-Fi device.

What

  • The phone, anyone who might be streaming, unnamed devices and the busiest links are always protected.
  • By default the box pauses one other Wi-Fi device at a time and shows Let back on. Settings → Device → Heat offers Suggest only, where the box asks first and one tap pauses the device it suggests.
  • A single missed temperature reading (up to three seconds) doesn't flip a link or a guest's internet off and on.
  • On real boxes the traffic actions stay off for now. Saving the setting doesn't switch them on, and the screen says "Pausing devices isn't active on this box yet. Your choice is saved for later."

How: the box looks at each link's share of the traffic and the spare room on the other links, and checks again right before changing anything. A suggestion is rechecked when tapped and again before it takes effect, so an old tap can't become permission later. The thresholds and rules are written up in docs/HEAT-LADDER.md. Real link and device control still needs complete traffic measurements and a qualified owner, which this draft doesn't add.

Sits on #76, which builds on #71.

Your call

  • Should a device pause still require a resting link first? The design also allows a pause while every stream link stays up, but that needs its own checks and undo path, so this draft withholds it.
  • Keep the three-second grace for a missed temperature reading? Longer gaps still undo everything; missing traffic numbers or a worsening stream undo at once.
  • Keep notices count-only for now? The design shows a device's name only on the box's own screen; these controls show no names or addresses yet.

How to verify

With mock data, open Settings → Device → Heat, switch between the default and Suggest only, and reopen to see it saved. In the live view, inject a suggestion and a confirmed pause to see "Pause one device" and "Let back on". apps/frontend/tests/e2e/heat-settings.spec.ts does this at 390 and 1280 px, and apps/backend/src/tests/heat-link-box-share.test.ts covers the policy.

Testing and limits
  • All heat suites, the settings tests, the touched frontend suites, rpc and i18n pass, along with type checks and lint. The browser specs pass at both widths with mock data.
  • A one-hour simulated run with a missed temperature reading every couple of minutes keeps one rested link and one paused device steady instead of flapping.
  • Only a clearly identified IPv4-only device, connected for over two minutes, with a name and real traffic, can be paused; at most one at a time, with two minutes between changes.
  • The production settings controller has no measured session yet, so it reports inactive and refuses pause requests even if a mock status shows the controls. The thresholds still need tuning on real hardware.
  • The settings dialog stays lazy-loaded; the frontend grew by about 5 kB gzip and no budget was raised.
Screenshots

Mock data only. The six settings and suggestion images were retaken for the current wording. Settings are saved, while traffic control remains inactive. Live action states are injected examples.

Screen / width Before After
Heat setting · 390 px Settings before at 390 px Automatic default at 390 px Suggest only at 390 px
One-tap suggestion · 390 px Live before at 390 px Pause suggestion at 390 px
Confirmed pause · 390 px Live before at 390 px Let back on at 390 px
Heat setting · 1280 px Settings before at 1280 px Automatic default at 1280 px Suggest only at 1280 px
One-tap suggestion · 1280 px Live before at 1280 px Pause suggestion at 1280 px
Confirmed pause · 1280 px Live before at 1280 px Let back on at 1280 px

Risks

None on real boxes yet: the actions are dormant. Once they are switched on, the risk is pausing a device someone needed; the protection rules, Suggest only and Let back on are there for that.


Checklist

  • Docs updated if behavior or structure changed (Rule A: AGENTS.md within budget, README, docs/, versions.yaml)
  • User docs (Rule G): no user-visible change, OR ceralive-docs PR updates English and Spanish, plus ceralive-website PR if a landing claim changed
  • Started from updated main; branch rebased on latest canonical branch (Rule B)
  • Rule D local-scratch reference check passes for tracked files
  • Tests pass; QA evidence attached or linked

@pjeweb pjeweb added stacked Depends on another pull request; review and integrate parents first. upstream: waits for intent Needs an issue or maintainer agreement before an upstream proposal. parked Parked or held for now; not planned for a train until picked up again. labels Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

parked Parked or held for now; not planned for a train until picked up again. stacked Depends on another pull request; review and integrate parents first. upstream: waits for intent Needs an issue or maintainer agreement before an upstream proposal.

Development

Successfully merging this pull request may close these issues.

1 participant