Commit Graph

12550 Commits

Author SHA1 Message Date
Zach Clendenen
6ebc323ac2 fix(streaming): name the ended claim's stamp in a termination notice
A re-claim of the same container keeps its key, so the container alone cannot tell the tab that lost its claim from the tab holding the next one.
2026-09-18 13:21:12 -05:00
Zach Clendenen
eaf1ee3c6f fix(streaming): settle a webstation save-and-exit pull on any exit answer
The exit writes the save dump before it answers, so an answer without a state is as final as one with. The broker's outcome now says whether it settled, and the no-change release test covers only the answered case, which is what its name says.
2026-09-18 13:16:52 -05:00
Zach Clendenen
64bc6687f0 docs(streaming): say a draining container is shutting down on the player
A drain covers every teardown, not only a save pull, so the player's note on the 409 should not promise exit state is being collected.
2026-09-18 13:05:32 -05:00
Zach Clendenen
e9e921063b fix(streaming): keep the Chinese translation of the draining notice
The shutting-down rewording replaced the existing zh_CN translation with English; reword it in Chinese instead.
2026-09-18 13:05:32 -05:00
Zach Clendenen
a483966275 fix(streaming): tell a refused claim the container is shutting down, not saving
A drain covers every teardown, including a desktop release that never saves, so the 409 message and the desktop claim's note on it claimed a save that may not be running.
2026-09-18 13:04:55 -05:00
Zach Clendenen
3ccf731958 test(streaming): re-claim the container before polling with the replaced stamp
The test named a claim re-taken on the same container but only sent an invented stamp, so it now takes the container back and polls with the first claim's stamp.
2026-09-18 13:01:13 -05:00
Zach Clendenen
6cb9bbe299 docs(streaming): wrap the status route's claimed_at line
It ran past the 88 columns the file's other docstrings wrap at.
2026-09-18 13:01:13 -05:00
Zach Clendenen
8f44b0808c refactor(streaming): recover a missed launch-ready off the stamp alone
The status poll carries the claim's stamp once the 202 lands, so it can only report this tab's own session and the container it echoed back had nothing left to check.
2026-09-18 13:00:21 -05:00
Zach Clendenen
65ea8da612 fix(streaming): enter only the launch of the claim this tab holds
A tab that missed its launch-failed keeps its container, so a second tab's re-claim of that container would otherwise hand it the other tab's room.
2026-09-18 12:58:08 -05:00
Zach Clendenen
be68050f3f fix(streaming): stamp the launch pushes with the claim they belong to
With one container per platform a second tab re-claims the same container, so the container alone cannot tell a tab its own launch-ready from the claim that replaced it.
2026-09-18 12:56:30 -05:00
Zach Clendenen
e4548b771c fix(streaming): keep retrying a webstation exit pull the exit never confirmed
A webstation exit that timed out or failed may still be writing its save dump, so taking its first answer as final could leave the archive uncollected. The stop now reports whether the broker answered, and only an answered exit or a confirmed save-and-exit takes one fetch. The claim test now makes a real claim while the pull runs.
2026-09-18 12:53:20 -05:00
Zach Clendenen
3400ba77aa fix(streaming): tell a refused player the container is shutting down, not saving
The drain marker covers every teardown, including a desktop release and an exit without saving, so the busy notice on the player and desktop claimed a save that may not be running.
2026-09-18 12:37:47 -05:00
Zach Clendenen
395b051ed3 fix(streaming): offer an emulator configured in another case once
The upload core picker deduped states' emulators by the raw id, so play and Play were two options both labelled Play! though the backend treats them as one emulator.
2026-09-18 12:37:47 -05:00
Zach Clendenen
f1ee827851 fix(streaming): group an emulator configured in another case with its own
The backend matches a save's emulator case-insensitively, so states tagged Play and play belong to one emulator, but the strip split them into two groups both headed Play!.
2026-09-18 12:37:47 -05:00
Zach Clendenen
35edbd7435 refactor(streaming): share the ended-reason block between player and desktop
Both views drew the same labelled reason with copied markup and styles, so a change to one would drift from the other.
2026-09-18 12:29:50 -05:00
Zach Clendenen
35761aa85c refactor(streaming): type a claim's 409 detail in one place
The player and the desktop each spelled the busy-container detail inline, and the two copies had already drifted.
2026-09-18 12:27:43 -05:00
Zach Clendenen
983ecc01c6 fix(streaming): ship the occupied-by desktop error in English everywhere
Untranslated streaming strings on this branch ship as the English text so translators pick them up in one pass, like the neighbouring desktop-error-occupied.
2026-09-18 12:25:59 -05:00
Zach Clendenen
bfa160a858 fix(streaming): stamp the status poll a loading tab recovers from
A second tab of the same user re-claims the same container when there is only one, so a container check alone let a loading tab adopt that tab's room.
2026-09-18 12:25:47 -05:00
Zach Clendenen
9adc555a34 fix(streaming): let the status poll name the claim it was given
With one container per platform a second tab re-claims the same container, so only the stamp tells a loading tab that the running session is no longer its own.
2026-09-18 12:24:45 -05:00
Zach Clendenen
0c5e536889 fix(streaming): stop storing a desktop's room no route reads
The desktop view takes its room from the claim POST and re-claims on reload, and the status poll never answers for a desktop, so the stored room was a dead write.
2026-09-18 12:23:05 -05:00
Zach Clendenen
765fce8add docs(streaming): say a heartbeat names any desktop it beats
The previous wording read as a desktop outside the first pool, when every desktop needs its container named.
2026-09-18 12:18:26 -05:00
Zach Clendenen
23136848e8 fix(streaming): name the route a replaced claim's call was ignored on
Release and save-and-exit share the lookup that logs a replaced claim, so the line has to say which route it ignored.
2026-09-18 12:18:24 -05:00
Zach Clendenen
7502608ab1 fix(streaming): let an unnamed stamped release of a taken-over claim be a no-op
Without a container, the lookup raised 403 when another player held the platform's only session, before the stamp check could read the takeover as a gone claim. A stamped call now treats any failed lookup as that claim being gone, as the named path does.
2026-09-18 12:18:05 -05:00
Zach Clendenen
99b44b52fa fix(streaming): keep a named save-and-exit to a game of its platform
Save-and-exit went through the release route's resolution, which ends whatever a named container holds, so naming a shared container could save and kill a desktop or another platform's game. A release still ends anything named; save-and-exit now matches only a game of the path's platform.
2026-09-18 12:17:01 -05:00
Zach Clendenen
507a91855e test(streaming): give the claim-behind-an-exit test distinct user and ROM ids
A fresh database can hand the admin and the ROM the same id, and then a claim that swapped them would still wait on the exit's key.
2026-09-18 12:13:15 -05:00
Zach Clendenen
a62d1158ad fix(streaming): keep retrying a save pull the broker has not confirmed finished
A per-emulator broker acks DELETE /launch before the emulator has flushed its saves, and a blocking save-and-exit that timed out or failed may still be killing it, so one answer from those pulls could miss the session's saves. Only a webstation exit, which answers once its dump is written, and a confirmed blocking save-and-exit take the first answer as final.
2026-09-18 12:13:11 -05:00
Zach Clendenen
11eabe6431 docs(streaming): fit the branch's comments and docstrings in two lines
The repo caps a comment at two lines and a docstring at one sentence plus Args and Returns. Several comments and docstrings this branch wrote or edited ran to three lines or more, so they are tightened, with parameter notes moved under Args.
2026-09-18 12:03:10 -05:00
Zach Clendenen
0743e456a6 fix(streaming): call a draining container shut down, not saving
The backend holds the drain marker through every teardown, including a desktop release and an exit without saving, so the admin panel told an admin a save was running when none was.
2026-09-18 11:54:09 -05:00
Zach Clendenen
5d29bdea3f test(streaming): render the real settings section in the streaming tests
The stub was justified by an auto-stub that mount never applies, and the real section already renders both slots the tests read.
2026-09-18 11:53:32 -05:00
Zach Clendenen
afd2a6e3ef fix(streaming): label a state's emulator in the upload core picker
The picker showed a streamed state's raw emulator id, such as play, while every other surface naming that emulator shows its display name.
2026-09-18 11:52:58 -05:00
Zach Clendenen
437de2866a test(streaming): share one emulatorLabel stand-in across the asset tests
Six test files carried their own copy of the fake label map, which could drift apart from each other and from the store's lookup.
2026-09-18 11:52:00 -05:00
Zach Clendenen
ff395008a4 fix(streaming): label an emulator configured in another case
The backend keys its display names in lowercase and lowercases the id before looking it up, while the store looked up the raw id, so a mixed-case configured emulator got its name on the Play button and its raw id on save chips.
2026-09-18 11:50:59 -05:00
Zach Clendenen
c7dc5ea918 fix(streaming): name the game holding a container the desktop was refused
The desktop claim's 409 carries the rom_name of the session in the way, as a game claim's does, and the desktop showed only a generic in-use message while its test claimed to name the game. The test's i18n mock now keeps params so the name is asserted.
2026-09-18 11:47:11 -05:00
Zach Clendenen
7177ca3181 test(streaming): keep playing through another container's ended notice
The test never sent launch-ready, so it asserted a loading tab under a name that promises a running game.
2026-09-18 11:45:17 -05:00
Zach Clendenen
5791f23f54 test(streaming): unmount every Stream view a test mounts
Views left mounted answered the next test's visibilitychange, so the recovery test's status poll assertion held whether or not the view under test polled. It now asserts a single poll.
2026-09-18 11:44:27 -05:00
Zach Clendenen
ce126fe440 docs(streaming): say who names the container on a release route
The holder's own release now names the container it claimed, so the docstring no longer describes an admin as the only caller that sends one.
2026-09-18 11:42:57 -05:00
Zach Clendenen
6a726f2c93 docs(streaming): say who names the container on a release
The player's own release, heartbeat and unload paths now name the container they claimed, so it is no longer only an admin ending someone else's session that sends it.
2026-09-18 11:42:38 -05:00
Zach Clendenen
144bd2a5de fix(streaming): show the reason a desktop's session was ended
The ended notice carries the reason given, which the game view shows under its headline and the desktop dropped, leaving its comment to promise a reason the admin never saw.
2026-09-18 11:42:17 -05:00
Zach Clendenen
b04a15e428 docs(streaming): say what the status reply's container is for
The reply carries no claimed_at, so it cannot let a tab name its claim on release and heartbeat; the loading tab uses it to tell its own session from another tab's.
2026-09-18 11:40:28 -05:00
Zach Clendenen
b7daab85a4 fix(streaming): enter a running game off the poll only on the claimed container
The status poll names no container, so it can answer with another tab's session on the same platform, and a loading tab that missed launch-ready would adopt that room as its own and later save and end it on unload.
2026-09-18 11:40:14 -05:00
Zach Clendenen
2cc00f2c4b fix(streaming): bind the desktop's release and heartbeat to its claim
The desktop sent only its container, so a desktop tab that missed losing its claim could end whichever game took the container, and its beat kept the admin's own game there alive instead of reporting the desktop ended. It now sends the claimed_at its claim answered with, as the game view does.
2026-09-18 11:39:24 -05:00
Zach Clendenen
156cfe4676 fix(streaming): name the claim a player's save-and-exit ends
A playing tab leaves through save-and-exit on Save & Exit, unmount and tab close, and sent neither the container nor the claim stamp, so a tab that missed its takeover could save and end the claim that replaced it. It now sends both, as release already does.
2026-09-18 11:37:40 -05:00
Zach Clendenen
75146307c5 docs(streaming): say which route reports a session's room
The heartbeat answers active with no host long after the launch returned, so the field is not None only until launch; only the status poll fills it.
2026-09-18 11:31:37 -05:00
Zach Clendenen
392eb56f6f test(streaming): pin the takeover notice ahead of the drain
Only the owner release path checked that the tombstone is written before the quiesce, so the abandoned-takeover teardown could fall back to the old order without a test failing.
2026-09-18 11:31:17 -05:00
Zach Clendenen
cdbd1fdf5c test(streaming): cover an unnamed release and heartbeat on another platform
A container serving two platforms keeps one session under one key, so an unnamed ngc release or heartbeat must not reach the caller's ps2 game there. Nothing pinned the platform filter in either lookup.
2026-09-18 11:30:21 -05:00
Zach Clendenen
accb42d9b5 test(streaming): name the desktop room test for the field it pins
No route reads a desktop's stored room back: the desktop POST answers with it directly and the status poll skips desktops, so the test only pins the stored field and should not promise a recovery path.
2026-09-18 11:28:56 -05:00
Zach Clendenen
157df721c6 refactor(streaming): list /config rows from the pools a claim walks
The config endpoint re-derived the key filter and case-insensitive platform grouping that the pool helpers own, so the Play button row and the claim could drift apart. It now reads the first container of each platform's first pool from the same helper.
2026-09-18 11:28:03 -05:00
Zach Clendenen
aef947e3da docs(streaming): say a heartbeat reaches any desktop only by naming it
An unnamed beat skips every desktop, not only one outside the platform's first pool.
2026-09-18 11:23:51 -05:00
Zach Clendenen
79be00ceb0 refactor(streaming): require a platform when scoping a session lookup
Every caller names the platform, so the None default and the branch it fed only widened the signature.
2026-09-18 11:23:19 -05:00
Zach Clendenen
a3a71d32bc test(streaming): cover a claim re-stamped between the heartbeat's lookup and write
The stale-stamp test is turned away at the lookup, so nothing exercised the claimed_at clause in the heartbeat's compare-and-set.
2026-09-18 11:19:15 -05:00