feat(steam): Play goes through the tile when Steam is up, so the Deck's controller is a controller #151

Open
omgitsgela wants to merge 22 commits from omgitsgela/LongshotLauncher:feat/play-through-steam-tile into main
First-time contributor

Status

Feature (fresh-install controller input), ready for review. Stacked on #130 (this forge will not take a cross-fork base, so the diff against main also carries #130's commits): review the last commit, a4cf225, only. Merge #130 first and this PR's diff collapses to just the routing change.

Why

On a fresh Deck, Steam Input only treats Longshot as a game when Steam launched it. Play from the launcher's own button starts the game direct, and under a running Steam the Deck's buttons then run Steam's default desktop layout — mouse and keyboard — which is the usual fresh-install complaint (the game's own host/steam_pads.h deliberately hides Steam's virtual gamepads and re-adds the physical one only under a real steam_input device, which exists only for Steam-launched games). So make Play go through Steam whenever that layer is available, and never touch global settings, controller configs, or sudo.

What changes

  • Core/SteamLaunchRoute.cs (new): the decision. Linux + Steam up (SteamShortcuts.SteamUp, /proc scan) + our tile in its library (InLibrary) → hand off steam://rungameid/<64-bit id> via xdg-open. That id rule — (unsigned appid << 32) | 0x02000000 — is the same GridId64 this class already uses for capsule names, and it is verified working on the Deck by steam-for-linux#8580 (2026-03 workaround) and SteamTinkerLaunch#1117. Steam not up → direct (no Steam Input layer exists to want). No tile yet → direct with a toast naming the reason. Refused URI → direct. Windows → direct.
  • App/LauncherService.cs (PlayFolder): ask the route after the saves/settings prep, fall back to the same GamePlay.StartInfo launch as before.
  • No-loop, two layers: (1) SteamGameId in the environment means this launcher itself arrived through the tile — start direct; (2) a one-shot handoff token (<home>/play-handoff, armed at handoff, consumed by the launched launcher, 2-minute ttl, cleared on a refused handoff) makes a second handoff impossible by construction — the delegated review was right that SteamGameId is not a delivery guarantee (Steam or the AppImage type-2 runtime could lose it; the runtime source does execv and preserves the environment, but the token does not depend on that).
  • The tile's --play arrives through PlayWithoutWindow, which runs before the instance lock is taken, so the routed instance never fights the open window's lock and never pokes it; the window keeps its claim exactly as before this feature (an earlier shape of this commit released the lock — the review's P1 — this does not).

Testing

python3 -I tests/test_launcher_core.py --dotnet ~/dotnet/dotnet: 1458 checks passed (11 new in RouteChecks: routed URI names the tile's GridId64; SteamGameId → direct, no second URI; no tile → direct + reason; Steam down → direct, nothing asked; refused URI → direct; Windows → direct; token armed by the handoff, consumed by the launch, one handoff per Play with SteamGameId absent; stale token ignored; refused handoff clears its token). python3 -I tests/test_release.py: OK. The reviewer independently confirmed --play is handled before TakeLock() (their Program.cs:56 reading), that the type-2 runtime preserves the environment (execv, no clearenv), and found no double-gather hazard (GatherSaves returns immediately on Linux; SettingsCarry.Fill idempotent).

Not tested: a live handoff on the Deck's own desktop mode — this was written against the launcher's unit harness; the Deck's Game Mode tile path (the tile itself → Steam Input) is measured and machine-proven on #130.

Must be tested: Deck desktop mode (Test Farm: @Beanstalk steamdeck): launcher Play with Steam running → game runs as a game (buttons pad, not mouse); with Steam quit → still starts direct; the note appears when there is no tile.

Risks

xdg-open is best-effort: refused or absent → the previous direct launch. The 64-bit id rule comes from community issue threads, not Valve docs; it agrees with our own grid-id rule measured against a real Deck library, and a wrong id only means Steam declines and the direct fallback runs.

## Status Feature (fresh-install controller input), ready for review. **Stacked on #130** (this forge will not take a cross-fork base, so the diff against main also carries #130's commits): review the last commit, `a4cf225`, only. Merge #130 first and this PR's diff collapses to just the routing change. ## Why On a fresh Deck, Steam Input only treats Longshot as a game when **Steam launched it**. Play from the launcher's own button starts the game direct, and under a running Steam the Deck's buttons then run Steam's *default desktop layout* — mouse and keyboard — which is the usual fresh-install complaint (the game's own `host/steam_pads.h` deliberately hides Steam's virtual gamepads and re-adds the physical one only under a real `steam_input` device, which exists only for Steam-launched games). So make Play go through Steam whenever that layer is available, and never touch global settings, controller configs, or sudo. ## What changes - `Core/SteamLaunchRoute.cs` (new): the decision. Linux + Steam up (`SteamShortcuts.SteamUp`, /proc scan) + our tile in its library (`InLibrary`) → hand off `steam://rungameid/<64-bit id>` via xdg-open. That id rule — `(unsigned appid << 32) | 0x02000000` — is the same `GridId64` this class already uses for capsule names, and it is verified working on the Deck by steam-for-linux#8580 (2026-03 workaround) and SteamTinkerLaunch#1117. Steam not up → direct (no Steam Input layer exists to want). No tile yet → direct with a toast naming the reason. Refused URI → direct. Windows → direct. - `App/LauncherService.cs` (PlayFolder): ask the route after the saves/settings prep, fall back to the same `GamePlay.StartInfo` launch as before. - No-loop, two layers: (1) `SteamGameId` in the environment means this launcher itself arrived through the tile — start direct; (2) a one-shot handoff token (`<home>/play-handoff`, armed at handoff, consumed by the launched launcher, 2-minute ttl, cleared on a refused handoff) makes a second handoff impossible by construction — the delegated review was right that SteamGameId is not a delivery guarantee (Steam or the AppImage type-2 runtime could lose it; the runtime source does `execv` and preserves the environment, but the token does not depend on that). - The tile's `--play` arrives through `PlayWithoutWindow`, which runs **before** the instance lock is taken, so the routed instance never fights the open window's lock and never pokes it; the window keeps its claim exactly as before this feature (an earlier shape of this commit released the lock — the review's P1 — this does not). ## Testing `python3 -I tests/test_launcher_core.py --dotnet ~/dotnet/dotnet`: **1458 checks passed** (11 new in `RouteChecks`: routed URI names the tile's `GridId64`; SteamGameId → direct, no second URI; no tile → direct + reason; Steam down → direct, nothing asked; refused URI → direct; Windows → direct; token armed by the handoff, consumed by the launch, one handoff per Play with SteamGameId *absent*; stale token ignored; refused handoff clears its token). `python3 -I tests/test_release.py`: OK. The reviewer independently confirmed `--play` is handled before `TakeLock()` (their Program.cs:56 reading), that the type-2 runtime preserves the environment (`execv`, no `clearenv`), and found no double-gather hazard (`GatherSaves` returns immediately on Linux; `SettingsCarry.Fill` idempotent). **Not tested:** a live handoff on the Deck's own desktop mode — this was written against the launcher's unit harness; the Deck's Game Mode tile path (the tile itself → Steam Input) is measured and machine-proven on #130. **Must be tested:** Deck desktop mode (Test Farm: @Beanstalk steamdeck): launcher Play with Steam running → game runs as a game (buttons pad, not mouse); with Steam quit → still starts direct; the note appears when there is no tile. ## Risks xdg-open is best-effort: refused or absent → the previous direct launch. The 64-bit id rule comes from community issue threads, not Valve docs; it agrees with our own grid-id rule measured against a real Deck library, and a wrong id only means Steam declines and the direct fallback runs.
The check reads HomeViewModel.cs and asks for the line without the third term #121
added, so the game-free suite has stopped at that check on main since then. It is
the check that is stale, not the behaviour it guards: Build is still off while the
check runs, while the launcher updates itself, and now also while old versions'
folders are deleted, which is what the source says.

Assisted-by: GPT-6 Astra
On a Deck, a build that only has a desktop shortcut is still a desktop chore: the
game has to be added to Steam by hand to be playable from the couch. This makes the
Ready screen offer the tile itself, and the untick take it away again.

Steam's own file, Steam's own rules. shortcuts.vdf in the exact grammar Steam's
writer uses (a type 0 section is 00 name 00 body 08, and a lone 08 closes every
map, not 00); the tile's appid as Steam computes it, crc32(Exe + AppName) with the
high bit set read signed, the rule ChimeraOS, Heroic and SteamTinkerLaunch all
write to. Keeping the id honest is what makes the tile the game's: Steam keys its
grid art, controller settings and play time off that id, so a tile made here and
one added in Steam's own dialog behave the same. Both were checked against the
file Steam wrote on a Deck: the real file parses, the ids it holds come out of the
rule, and the reference vdf library (which round-trips the real file byte for byte)
parses the fixtures here.

The tile starts the launcher's --play like the desktop and applications-menu
shortcuts, so it follows "Play starts this version" and an update's new folder.
Ours or theirs is decided by the id and a marker beside the file: a tile the user
made by hand in Steam under the same name is left exactly as they made it, and our
add and remove leave their file byte for byte identical. A launcher that updated
keeps the one tile, pointed at the newest copy, because the AppImage's name changes
with every release. Nothing is done to Steam itself without the user: the core can
ask Steam to quit through its own -shutdown, but only a caller that has asked the
user first passes that flag, so downloads are never cut.

Checks: SteamChecks.cs over fixtures made by tests/make_steam_vdf_fixture.py; every
new text in every catalog. The BusyChecks fix above is why the suite runs again.

Assisted-by: GPT-6 Astra
review: the tile is found by Steam's id, not by the name Longshot
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
0e1e9ee44a
The first cut looked a tile up by its name and then asked whether it was ours. A
tile the user made in Steam's own dialog under the name Longshot got past that in
two ways: the marker beside the file vouched for any id it was told to carry, and
the Ready screen's first call wrote a removal before anyone was asked. Both are
gone:

- identity is the appid alone (this launcher's, or the id the marker recorded), so
  Steam's own dialog's tile is a different id and is out of reach everywhere; Add
  refuses rather than putting a second tile of the same name in the grid, and says
  why, with the tick back to what the library holds
- the marker's id is checked as a rule could have written it, and a marker that
  cannot be read is no claim at all
- the Steam tick starts on like the desktop and menu ticks: an install leaves
  something to press; the first write only ever adds

Assisted-by: GPT-6 Astra
review round two: keys never double, a marker never outranks the tile it describes
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
0464d74fd6
A second review pass found real holes the first round's fixes left:

- Remove left the numbered keys as they were and Add keyed a new tile by the item
  count, so a library with a hole (an outside edit, an older Steam) could get two
  tiles under one key, and reading it back loses one that was not ours. Add now
  takes the first free key; a check makes the hole and asserts no key repeats
- the sidecar marker vouched for any id it carried, so a stale marker beside a
  tile the user re-pointed in Steam's Properties claimed that tile. The claim now
  holds only while the tile still points at the Exe the marker recorded, and the
  check relabels a tile byte for byte and proves it stays the user's
- Remove read the file before taking Steam down, so Steam's own quit-time flush
  was overwritten by the pre-shutdown snapshot; the order is down-then-read now
- Locate and the first library read ran outside the catch: a permissions fault
  there took the Ready screen down instead of hiding its tick. They are inside
  now, InLibrary answers false for an unreadable library rather than throwing,
  and an unasked screen never writes a Remove: the desktop-or-menu ticks changing
  after a failed Add cannot delete a tile the user did not untick
- a type-5 float parsed but wrote back as type 3, quietly retyping a field we do
  not own: refused instead, and the check proves a file holding one is left alone
- SteamUp's /proc scan parsed the whole path as a number, so it saw no process
  ever: fixed, given a proc root the checks can point at a fake, and the fake
  proves both the sighting and the absence; steam.sh -shutdown no longer
  redirects output it never drains (a talking helper deadlocked the wait)

Assisted-by: GPT-6 Astra
feat(linux): the Steam tile, desktop file and menu file all carry the Longshot logo
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
3d462bb50d
The Steam tile wrote icon "" and showed the blank default in Gaming mode; the
Deck's own EmulationStation tile proves the icon field is what Steam draws.
One logo file, written once under the launcher home, feeds all three Linux
shortcuts. The appid does not move (icon is not part of Steam's id rule), and
an older tile of ours gets the icon on the next write.

Also: the Ready-screen toast now tells users to restart the console, the one
apply path hardware proved works, and SteamShortcuts' comments stop claiming
a live reload that the Deck disproved.
review: a tile keeps the art it has, and a stale logo gets repaired
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
01c181ab3d
Three points from the delegated review of 3d462bb, all real, all edge cases:

- Update/Same treat an empty icon as claiming nothing: a caller whose logo write
failed no longer rewrites a working tile to point at a file that was never
written. The upgrade order that matters (tile first, logo later) is now its own
check, with the id pinned on both sides of it.
- EnsureLogo compares the file against the embedded logo and rewrites when they
differ, so a truncated png or a newer logo from a launcher update is repaired
instead of trusted forever.
- The restart notice no longer talks over a shortcuts-write failure: one toast
shows at a time, and the error outranks the note.

launcher core: 1418 checks passed; release OK.
fix(linux): the Steam tile names an .ico; the capsules, not the icon field, are the tile's art
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
6810eef2ee
Hardware, Deck LCD: a tile whose icon field pointed at longshot.png showed the blank
default after a full console restart, while every tile in the Deck's own library that
draws art names a .ico (EmulationStation's grid _icon.ico) and carries pre-baked
capsules in config/grid/ keyed by its appid. Heroic writes an .ico into the same field
for the same reason. The tile now names longshot.ico (the launcher's own Assets copy,
embedded and written beside the .png, repaired when it differs); the desktop and menu
files keep the .png, which KDE draws correctly. Grid art for the tile's appid is a
separate piece of work and is not in this commit.
feat(linux): the tile's real art: capsules in Steam's grid/, written only when missing
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
9206814a1f
Hardware + research, Deck LCD: a Gaming-mode library tile draws from pre-baked capsule
images in grid/ beside shortcuts.vdf, keyed by the tile's appid read UNSIGNED -
<id>p.png portrait 600x900 (the library tile itself), <id>.png landscape 920x430
(the recently-played row), _hero/_logo on the detail page. The icon field is only
the small overlay icon (Steam ROM Manager's source: "Steam shows the icon named in
shortcuts.vdf, not the grid's"; Heroic writes the same capsule names for the same
reason). Our tile showed the blank default because it had no capsules at all, not
because of the icon field. The Ready screen now drops the launcher's own artwork
(embedded, generated from the green logo) into grid/ for the appid the library tile
actually carries - write-if-absent, so a capsule the user chose in Steam's own UI
is never replaced.

Assisted-by: GPT-6 Astra
fix(linux): a shortcut's capsules answer to a SECOND name: (appid << 32) | 0x02000000
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
20ca2ea2dd
The Deck's own library settled the question. EmulationStation's working tile carries
its landscape capsule byte-identical under two names: 2827843537.png (the crc32 appid
from shortcuts.vdf, what the new library UI reads) and 12145495509653520384.png, which
is exactly (2827843537 << 32) | 0x02000000 — Steam ROM Manager's lengthenAppId, the
same 64-bit id Ice's filename_for_shortcut writes and the old Big Picture reads. Our
32-bit capsules alone left the tile blank on hardware; WriteArtwork now writes every
piece under both names. Check pinned to the Deck's numbers: GridId64(-1467123759)
must equal 12145495509653520384.

Assisted-by: GPT-6 Astra
review: a capsule slot the user holds is theirs under every name and every format
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
caeaf241d2
Delegated review of the capsule work, three findings, all real:

- "Never overwrite" was not atomic: File.Exists, then AtomicFile.Write renamed with
  overwrite:true, and Steam's own UI publishes capsules at any moment — the window
  between look and rename was us possibly renaming over art the user just chose.
  AtomicFile.WriteIfAbsent: same temp-then-publish, but the rename itself is the gate
  (MoveFileEx without REPLACE_EXISTING / rename O_EXCL), no mutex needed for a
  non-replacement.
- Formats: the Deck's grid/ shows Steam's own art in .jpg as readily as .png
  (4100769614p.jpg). A .png of ours beside a .jpg of theirs is a coin flip in Steam,
  so any file in a slot, ANY extension, means the slot is taken.
- The two names (32-bit and 64-bit) are one slot seen by two UIs: art held under
  either name is held, and we never fill only the other half. Caught by the suite,
  not by reading — the fixture now seeds a .jpg hero under the 32-bit name only, and
  neither name gets our .png.

The first review's minor (a failed .ico extraction still naming the tile at a missing
file) was already fixed at 9206814; re-verified here.

Assisted-by: GPT-6 Astra
review: a half-written temp is not a capsule the user chose
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
8ed8f1bab4
The capsule review's own fix had a hole in it, and my first attempt at closing
it made it worse, so both are worth recording.

WriteArtwork asks "does any file already sit in this slot" with the glob
<stem><suffix>.* — deliberately wide, because Steam's own library art is not
always .png (this Deck holds 4100769614p.jpg). But AtomicFile publishes as
<target>.<guid>.tmp and then renames. That temp matches the wide glob. A launch
interrupted between the write and the rename therefore leaves a file that reads
as "the user's art", the slot is declared held, and the tile stays blank on
every launch afterwards with no way back except deleting files by hand.

Fix: a .tmp never counts as holding a slot. It is left on disk rather than
removed. Removing it was my first instinct and it is wrong: the temp has the
same shape whatever wrote it, so a launcher that deletes temps in the grid
folder can break a capsule Steam is mid-saving. Deleting the user's in-flight
art to work around a stale file we did not create is the exact harm this
feature exists to avoid, and once any real file lands in the slot the temp is
inert anyway.

Two checks: the tile's art still lands when a temp sits in the slot, and a temp
we did not write survives us. Suite: 1435 checks.
merge: launcher main (the DirectWrite fixes #134/#137, the nightly note #133) into the Gaming-mode tile branch
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
94d6e948c5
art: the tiles carry the Longshot name as well as the glyph
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
e40bcbd1de
The Game Mode and desktop tiles showed the weapon glyph alone; the emulator's own start-up
screen signs its picture with LONGSHOT under the glyph, in Libertinus Serif Semibold (the
fallback face the start-up screen itself uses) in cream with 0.14 em of tracking and a gold
flourish rule. The four Steam slots now carry the same lockup: glyph top, word under it,
flourish under the word, on the same flat field.

Not hand-painted: scripts/make_artwork.py composes them from the shipped art and the start-up
screen's recipe (gpu/vk/vk_menu.cpp draw_startup), and App/Assets/steam/README-artwork.md says
where they come from and that a change means re-running the script, not opening a paint program.
The Libertinus OFL licence ships with the font.
art: the compositor reads originals, never its own output
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
5cfd3988d4
A review pass found the first version cut the glyph out of the shipped capsule files -
which after one run ARE its own output: a second run would recompose a recomposition, and
the soft glow would double into a fringe with every pass. The pre-wordmark art now ships
beside the slots as src_<slot>.png, and make_artwork.py reads only those and writes only
the slot files (a csproj Remove keeps the originals out of the binary: they are build
inputs, not AvaloniaResources).

The capsules also save RGB now, the logo keeps real alpha: a capsule with a near-opaque
alpha channel mis-renders under Steam's premultiplied scaling, and the first pass invented
89/255 alpha edges the source never had (the originals are RGB). The glyph cut clamps the
alpha it gives to the source's own, and the re-run over the unchanged originals reproduces
the slot files byte for byte (md5-checked).
fix(app): FontCheck asks where the launcher runs from, not where its assembly lies
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Compile and test (pull_request) Blocked by required conditions
227ea73633
The launcher ships as one file, and an assembly inside one has no path on
disk: the new .NET 10 SDK's analyzers made the read an error (IL3000), and
with warnings-as-errors the release job has failed since #137 merged
(actions 448/457, 'The launcher, both systems'). The folder the launcher
runs from is what 'its own' means in OtherModules anyway; the modules' own
filenames are still complete paths in a single-file app, so the report's
meaning stands.
review: the tile's carried id gets a check that can tell, and a late .ico retargets the tile
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
ed14920f34
The capsule test asked TileAppId for a library id and a computed id that the
fixture held equal: replacing the getter with a bare Entry.AppId left all
checks passing (a review found it by mutation). The new check runs where the
two differ - the marker names the tile, a renamed AppImage computes another
id - and fails under that same mutation, which I re-ran after writing it.

The Ready screen cached its placement on the first attempt: if the .ico write
failed once and succeeded on a retry, the tile was still offered iconless,
and an earlier success kept its path after a later failure. The offered
entry's icon now follows the .ico that actually landed this time.
Merge remote-tracking branch 'forge-fork/fix/single-file-fontcheck-il3000' into feat/steam-gamemode-tile
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
ae680ddffa
fix(steam): a half-written library is refused, never republished
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
b52d4ec3e6
Steam rewrites shortcuts.vdf whole on every change, so a crash or power loss
mid-write leaves the file cut off inside an entry. The parser used to accept
that and return what survived; Add/Remove then published only the survivors,
deleting every tile past the cut for good. A truncated root is now refused
with a clear message, and the file stands byte for byte: a read-only caller
(InLibrary, Tiles) reports the same refusal, and an empty file stays an empty
library, not a truncation, so Add can still start one.

SteamChecks: cuts the real fixture mid-tail and at the root terminator; every
entry before the cut must survive, Add/Remove/Tiles must all refuse, the file
must be untouched after each refusal, and an empty library must still take a
tile. Mutation-checked: delete the refusal and the cut-off cases fail.
test(steam): Steam's own trailing terminator parses, a cut-off does not
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
3b08399756
The Deck's real shortcuts.vdf ends with an extra 0x08 past the root close
(verified 2026-11-16 on hardware: four closing bytes at EOF, one for the
writer's virtual top level). Padding after the terminator is normal and must
still parse; the truncation refusal must not swallow it. Fixture: append a
terminator to the real fixture, Add must succeed, and exactly one Longshot
must read back. Suite: 1447 core checks.
feat(steam): Play goes through the tile when Steam is up, so the Deck's controller is a controller
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
a4cf22553c
A fresh Deck maps the buttons through Steam Input only for games Steam
launched: a longshot started direct under a running Steam gets Steam's
default desktop layout, mouse and keyboard, the Deck's pad dead as a
pad. The game's own host/steam_pads.h re-adds the physical gamepad only
under a real steam_input device, which only exists when Steam started
the game. So Play hands off to steam://rungameid/<the tile's 64-bit id>
(the lengthenAppId rule, checked against steam-for-linux#8580 and
SteamTinkerLaunch#1117, both working on the Deck) whenever Steam is up
and our tile is in its library. Steam not up, no tile yet, or the URI
refused: the direct launch, exactly as before, with a toast note when a
missing tile is the reason.

The routed tile's --play arrives through PlayWithoutWindow, BEFORE the
instance lock is taken: it never fights the open window's lock, and the
window keeps its claim (the review's P1 — an early shape released the
lock and left a writable GUI unclaimed). The handoff arms a one-shot
token; the launch it causes consumes it and starts direct, making a
second handoff impossible by construction even if Steam or the AppImage
runtime loses SteamGameId (not a delivery guarantee, the review's
point). SteamGameId, when present, short-circuits even earlier.

Assisted-by: Hermes Agent
fix(steam): a tile's id never moves, a re-pointed tile is not ours, and a file that is not a library is not rewritten
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Compile and test (pull_request) Blocked by required conditions
2f0a8dd705
Three of the adversarial review's majors, each reproduced against this
Core before the change and against it after (scratch console, the
reviewer's own shapes):

- Update rewrote the appid from the launcher's current path. Steam
  keeps a tile's id through a launcher move (the sidecar and TileAppId
  were built for that), so the entry's id moving every update orphaned
  exactly what keys off it: the grid art landed under the id nothing
  used and the controller settings under the old one. Probe: before and
  after an update the tile now carries the same id (-529626449), while
  the Exe still follows whoever last ticked the box. The sidecar gains a
  fourth field, the path the carried id was computed from, so the
  marker still vouches for the tile after the Exe moved on; three-field
  markers written before this stay valid.

- FindOurs claimed a tile on an id match alone. The user re-pointing
  our tile at their own script in Steam's Properties keeps Steam's id
  (Properties never changes it), so the next Add re-aimed their tile
  back at us and Remove took it away. Probe: after that edit Add and
  Remove both refuse, the file stays byte-for-byte, and the tile keeps
  running their wrapper.

- A file whose root closes before its entries (a stray leading 0x08,
  an interrupted write) parsed as a whole empty library, and ShortcutsOf
  then happily created a fresh one — publishing our tile rewrote the
  file and deleted every shortcut past the stray byte. The truncation
  guard catches maps that ran out of bytes; this catches entries the
  parse never saw: RequireLibrary refuses a non-empty file with no
  shortcuts map in it, file left alone. An empty file is still no
  library yet, and Add still starts one.

Assisted-by: Hermes Agent
merge: #130's tile branch, current head (the tile this routes through)
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Compile and test (pull_request) Blocked by required conditions
a7175cc8aa
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Compile and test (pull_request) Blocked by required conditions
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
Some workflows are waiting to be reviewed.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'feat/play-through-steam-tile:omgitsgela-feat/play-through-steam-tile'
git switch 'omgitsgela-feat/play-through-steam-tile'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/LongshotLauncher!151
No description provided.