Skip to content

feat(library): call the button Wake Host and tell a sleeping host from one with Polaris down - #284

Merged
papi-ux merged 1 commit into
masterfrom
feat/wake-host-honest-startup
Sep 6, 2026
Merged

feat(library): call the button Wake Host and tell a sleeping host from one with Polaris down#284
papi-ux merged 1 commit into
masterfrom
feat/wake-host-honest-startup

Conversation

@papi-ux

@papi-ux papi-ux commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • The library's Start Polaris button is now Wake Host, which is all a client can do for a host it cannot reach. It cannot start Polaris on a machine that is already awake, and it used to pretend otherwise: wake nothing, wait thirty seconds, then say Polaris did not come online.
  • Before waking, the coordinator asks the machine itself. A TCP connect to the streaming port is refused within milliseconds by an awake host with nothing listening and answered by nothing on a sleeping one. The awake case is not woken and is reported within about ten seconds as "The host is awake, but Polaris is not answering. Start it on the host, or enable headless boot so it starts on its own." The silent case still gets the wake packet and the full boot budget, and its timeout message says a wake packet only reaches a sleeping host from its own network, which is what a phone on the road runs into.
  • A host that quit since the list last polled is re-polled instead of being blamed for its library for thirty seconds.
  • The probe tries every address Nova knows for the host, so a VPN or manual entry is not misread as asleep because the LAN address is out of reach.
  • Pairs with fix(packaging): start the user service from the application menu instead of a second process polaris#617 (the application menu starts the user service instead of a second process) and headless boot on the host. Together they make the awake-but-down state rare, and this PR makes the button honest when it happens.

Exact candidate

Verification

  • :app:testNonRoot_gameDebugUnitTest (x86_64): 1615 tests, 0 failures, 0 errors (PolarisStartupCoordinatorTest 10, WakeHostSourceGuardTest 2)
  • :app:lintNonRoot_gameDebug -PlintFailOnError=true: clean
  • :app:assembleNonRoot_gameDebug (arm64-v8a), installed on the Retroid Pocket 6 as com.papi.nova.debug
  • Device: the sidebar button reads Wake Host. With polaris.service stopped on pc-papi and no stream live, pressing it produced the awake-but-down message about 8 s after the press (screenshot); after starting the service, pressing it again opened the library within 3 s.
  • Unit tests pin that the awake case sends no wake packet and polls four times, that a silent host still gets the packet and times out, and that a host which went down since the last poll is reported as Polaris not running.

Not covered

  • The sleeping-host path (wake packet, timeout message) was not exercised on a device; pc-papi did not sleep today. The unit tests cover the branch.
  • androidTest is not compiled by CI and already fails to compile on master; nothing there was touched.

…m one with Polaris down

Start Polaris sent a wake packet and waited for Polaris to answer. That is all a client
can do; it cannot start Polaris on a machine that is already awake. So when a host had
Polaris quit from the tray, the button woke nothing, waited thirty seconds, and said
Polaris did not come online, which read as a failure of the button.

The button is now Wake Host. Before waking, the coordinator asks the machine itself:
a TCP connect to the streaming port is refused within milliseconds by an awake host
with nothing listening and answered by nothing on a sleeping one. An awake host with
Polaris down is not woken and is reported as such within ten seconds, with the fix
named: start Polaris on the host or enable headless boot. A silent host still gets the
packet and the full boot budget, and the timeout message says that a wake packet only
reaches a sleeping host from its own network, which is the case a phone on the road
runs into.

The probe tries every address Nova knows for the host so a VPN or manual entry is not
misread as asleep because the LAN address is out of reach.
@papi-ux
papi-ux merged commit bcaaede into master Sep 6, 2026
6 checks passed
@papi-ux
papi-ux deleted the feat/wake-host-honest-startup branch September 6, 2026 19:19
papi-ux added a commit that referenced this pull request Sep 7, 2026
Matched client for Polaris 1.4.4. Everything on master since 1.4.3: Wake Host
(#284), the Command Center that leads with the verdict's explanation, the Slim
sparkline bar, and Debug's decode and network rows (#283, #285), the Stats
Overlay fix, and the honest Play and Doctor labels from this branch.

versionName 1.4.4, versionCode 46. The Unreleased section becomes the dated
1.4.4 section with a one-line summary and the same bullets, the store notes for
build 46 fit under 500 code points, and NovaReleaseMetadataTest pins all of it.

The label fixes in the same PR:

Three labels that stopped being true once the surfaces around them changed.

The library's Continue card said Resume whether or not the host was still running
the game. The kicker already told the truth (Continue, Live, or Watch) and the
summary said "Pick up where you left off", but the button promised a resume and
then launched. Resume now appears only while the host is running that game;
otherwise the button says Play. The Watch branch is unchanged.

The Doctor card led the Command Center after #285, and its first line of advice
repeated its own title: "Streaming telemetry looks ready" over "Try first:
Streaming telemetry looks ready. Keep this page open...". The host's first-try
line usually opens by restating the finding, so the state builder now drops that
opening sentence and keeps the advice that follows it. A first-try line that only
restates the title disappears rather than saying it twice; one that merely starts
with the same words as a longer word is left alone.

The Command Center subtitle still promised "Quick keys and controls" when Quick
Keys became the last panel. It now reads "Session controls for Private Stream" and
"Session controls for virtual display streaming"; the generic fallback reads
"Stream health, tuning, and session controls".

HonestLabelsSourceGuardTest pins the hero verb and the subtitles; the Doctor
dedupe has unit coverage for the repeated, bare, unrelated, and prefix-only cases.
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