feat(steam): the game's own banner on the tile's detail page when its folder has one #260

Merged
HumanBean merged 3 commits from omgitsgela/LongshotLauncher:feat/steam-hero-banner into main 2026-11-25 04:14:07 +00:00
Member

Why: Steam's tile detail page has a 1920x620 hero slot that today always gets the launcher's generated capsule. The builder can now put the player's own game's own still (one frame from a movie in their own dump, made on their machine, with Longshot's own mark drawn over it at build time) into the game folder as longshot_hero.png; the launcher should prefer it for that one slot and change nothing else.

WIP: the launcher half of the pair. The builder side is Longshot's own pull request (nx2/game_hero.py, same branch name); this one only reads what that writes.

No game art ships here either. The still is extracted on the player's machine from their own dump and lives in their game folder; this repository changes no artwork and scripts/make_artwork.py is untouched. The PR ships the preference rule, not a pixel.

The rule

  • WriteTileArt now offers the capsules through WithGameHero: when the game folder holds a whole longshot_hero.png (PNG header, exactly 1920x620), the _hero capsule carries the folder's bytes under both grid names, and the _logo offer is dropped with it: that hero carries Longshot's mark, drawn by the builder from the repository's own glyph master and face, and Steam draws its logo capsule right over the hero, which would paint a second mark on the same picture. A slot that is never offered is simply never written: checked against a Deck's own client with the file deleted, Steam draws no logo over the banner and no placeholder in its place, so this needs no blank art shipped to say the same thing.
  • Every other slot, and the whole generated set when the folder has no hero, none whole, or a wrong shape, stays exactly as before, the logo back in with them.
  • GameHero reads the file only when it is a whole PNG of the hero's exact size: signature, an IHDR with its CRC right and the exact dimensions, an IDAT between the ends, an intact IEND. A truncated, foreign, wrong-shape or header-only file is no hero rather than a half-broken capsule; the header-only shape was a real hole a review caught, a 45-byte file that drew its own size for the check and had no pixels behind it would have traded the logo slot for a black capsule. The builder holds its output to the same rules, both ends.
  • An upgrade from before the marked hero: WriteArtwork never overwrites existing grid art, on purpose, so such an install still holds the logo this launcher generated for it, and the game would show that logo over its own marked hero, two marks in one banner. RetireGeneratedLogo deletes the logo grid files, under both names, only when the bytes are this launcher's generated logo byte for byte; art chosen in Steam's own UI, or anything a byte off our own, is never touched. BuildStepViewModel calls it beside a folder hero, and a folder-hero build re-run offers no logo, so a retired logo stays retired.
  • WithGameHero returns a new array rather than touching the App's cached capsules: the App keeps its capsule list between builds, and mutating it would leak one game's hero into the next game's build.
  • The wide capsule, the portrait, and the icon are not touched.

Testing

  • python -I tests/test_launcher_core.py at this head: 2686 checks passing against 2668 on current main at a clean worktree of it (the wrapper then reports only the base's own inherited translation faults, byte-identical on both; the core harness itself passes both). The added hero block covers: no folder, no file, wrong shape, foreign bytes and an empty file all read as no hero; a PNG cut mid-write, and one that only draws its header (signature, IHDR and IEND with their CRCs right, no IDAT between them), are no hero either; the whole frame is not a hero; the folder's whole hero replaces only the _hero slot and drops the _logo offer, under both names a full hero takes; the launcher's cached capsules are never mutated; a broken hero leaves the whole generated set filling every open slot beside it, the logo back in; a whole hero offered again after its slot came free lands again; the retirement takes the generated logo under both names and nothing else, leaves art that is not the launcher's own byte for byte, and does not run at all with no folder hero.
  • The look was settled on real hardware first, by hand: the builder PR's helper made the hero from a real dump, the files were placed in a Longshot non-Steam tile's grid slots on a Deck by hand (the probe route, not this head's code), and the details page was checked in the Deck's real Steam in Desktop Mode and in Gaming Mode: one mark, at the anchor the project lead approved. The absent logo slot, the same state this rule produces, was verified on the same client: no logo drawn and no placeholder. So: the composition is proven on the Deck's client; this head's own WriteArtwork path is proven by the unit block above, not yet by a launcher build installed on the Deck.
Why: Steam's tile detail page has a 1920x620 hero slot that today always gets the launcher's generated capsule. The builder can now put the player's own game's own still (one frame from a movie in their own dump, made on their machine, with Longshot's own mark drawn over it at build time) into the game folder as longshot_hero.png; the launcher should prefer it for that one slot and change nothing else. WIP: the launcher half of the pair. The builder side is Longshot's own pull request (nx2/game_hero.py, same branch name); this one only reads what that writes. **No game art ships here either.** The still is extracted on the player's machine from their own dump and lives in their game folder; this repository changes no artwork and scripts/make_artwork.py is untouched. The PR ships the preference rule, not a pixel. ## The rule - WriteTileArt now offers the capsules through WithGameHero: when the game folder holds a whole longshot_hero.png (PNG header, exactly 1920x620), the `_hero` capsule carries the folder's bytes under both grid names, **and the `_logo` offer is dropped with it**: that hero carries Longshot's mark, drawn by the builder from the repository's own glyph master and face, and Steam draws its logo capsule right over the hero, which would paint a second mark on the same picture. A slot that is never offered is simply never written: checked against a Deck's own client with the file deleted, Steam draws no logo over the banner and no placeholder in its place, so this needs no blank art shipped to say the same thing. - Every other slot, and the whole generated set when the folder has no hero, none whole, or a wrong shape, stays exactly as before, the logo back in with them. - GameHero reads the file only when it is a whole PNG of the hero's exact size: signature, an IHDR with its CRC right and the exact dimensions, an IDAT between the ends, an intact IEND. A truncated, foreign, wrong-shape or header-only file is no hero rather than a half-broken capsule; the header-only shape was a real hole a review caught, a 45-byte file that drew its own size for the check and had no pixels behind it would have traded the logo slot for a black capsule. The builder holds its output to the same rules, both ends. - An upgrade from before the marked hero: WriteArtwork never overwrites existing grid art, on purpose, so such an install still holds the logo this launcher generated for it, and the game would show that logo over its own marked hero, two marks in one banner. RetireGeneratedLogo deletes the logo grid files, under both names, only when the bytes are this launcher's generated logo byte for byte; art chosen in Steam's own UI, or anything a byte off our own, is never touched. BuildStepViewModel calls it beside a folder hero, and a folder-hero build re-run offers no logo, so a retired logo stays retired. - WithGameHero returns a new array rather than touching the App's cached capsules: the App keeps its capsule list between builds, and mutating it would leak one game's hero into the next game's build. - The wide capsule, the portrait, and the icon are not touched. ## Testing - `python -I tests/test_launcher_core.py` at this head: 2686 checks passing against 2668 on current main at a clean worktree of it (the wrapper then reports only the base's own inherited translation faults, byte-identical on both; the core harness itself passes both). The added hero block covers: no folder, no file, wrong shape, foreign bytes and an empty file all read as no hero; a PNG cut mid-write, and one that only draws its header (signature, IHDR and IEND with their CRCs right, no IDAT between them), are no hero either; the whole frame is not a hero; the folder's whole hero replaces only the `_hero` slot and drops the `_logo` offer, under both names a full hero takes; the launcher's cached capsules are never mutated; a broken hero leaves the whole generated set filling every open slot beside it, the logo back in; a whole hero offered again after its slot came free lands again; the retirement takes the generated logo under both names and nothing else, leaves art that is not the launcher's own byte for byte, and does not run at all with no folder hero. - The look was settled on real hardware first, by hand: the builder PR's helper made the hero from a real dump, the files were placed in a Longshot non-Steam tile's grid slots on a Deck by hand (the probe route, not this head's code), and the details page was checked in the Deck's real Steam in Desktop Mode and in Gaming Mode: one mark, at the anchor the project lead approved. The absent logo slot, the same state this rule produces, was verified on the same client: no logo drawn and no placeholder. So: the composition is proven on the Deck's client; this head's own WriteArtwork path is proven by the unit block above, not yet by a launcher build installed on the Deck.
feat(steam): the game's own banner on the tile's detail page when its folder has one
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 4s
22196f51cc
Longshot's builder writes longshot_hero.png, one still out of the player's own
game's own movie, into the game folder (Longshot #: nx2/game_hero.py). The grid
step now prefers that file for the _hero capsule and keeps the generated art
for every other slot, and for the hero when the folder has none, none, or a
broken one: the same precedence game_title's name and icon already set.

GameHero reads the folder's file only when its PNG header says the hero's exact
1920x620 (a wrong shape is no hero rather than a broken capsule). WithGameHero
replaces the one slot without touching the launcher's cached capsules, so a
hero never leaks from one game's build into the next. The wide capsule, the
portrait, the logo and the icon are unchanged.
feat(steam): the drawn banner retires our logo slot beside it
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
5d065a263b
the game's own hero carries Longshot's mark now, drawn by the builder from the repository's own glyph and face, so Steam's procedural logo over it would paint a second mark on the same picture. An offered set with a folder hero drops the logo slot instead of offering it: the Deck's own client was checked with the slot absent and draws no logo and no placeholder, which needs no blank art shipped to say the same thing. A game whose folder has no drawn hero keeps the whole generated set, logo included, exactly as before.
Author
Member

The banner now carries the mark, so the logo offer retires with it. WithGameHero drops the _logo offer when the game folder's hero fills the _hero slot: Steam draws its logo capsule right over the hero, and a second mark on a picture that already carries one is the look this whole pair exists to stop. An absent logo file was checked on a Deck's own client: no logo, no placeholder, so the rule needs no blank art shipped to say the same thing. A folder with no whole hero keeps the entire generated set, logo back in with them.

Refreshed at this head: 2680 checks against 2668 at a clean worktree of main, zero build warnings; the hero block now asserts the logo offer is gone beside a folder hero and returns with the rest when the hero is broken. The description above is current for this head.

The banner now carries the mark, so the logo offer retires with it. WithGameHero drops the `_logo` offer when the game folder's hero fills the `_hero` slot: Steam draws its logo capsule right over the hero, and a second mark on a picture that already carries one is the look this whole pair exists to stop. An absent logo file was checked on a Deck's own client: no logo, no placeholder, so the rule needs no blank art shipped to say the same thing. A folder with no whole hero keeps the entire generated set, logo back in with them. Refreshed at this head: 2680 checks against 2668 at a clean worktree of main, zero build warnings; the hero block now asserts the logo offer is gone beside a folder hero and returns with the rest when the hero is broken. The description above is current for this head.
omgitsgela changed title from WIP: feat(steam): the game's own banner on the tile's detail page when its folder has one to feat(steam): the game's own banner on the tile's detail page when its folder has one 2026-11-23 17:36:00 +00:00
fix(steam): a hero has to be whole, and an upgrade sheds only our own logo
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 11s
9eaa2db2fd
Follows the review of the hero route; both findings reproduced first.

- GameHero accepted a file with a signature, an IHDR and an IEND and
  no pixels in it: the size it reports was drawn for the check, and
  the tile would have traded its logo slot for a black capsule. A
  hero now needs the IHDR CRC right, an IDAT between the ends, and an
  intact IEND, the same rules the builder holds itself to.
- WriteArtwork never overwrites, on purpose, so an install from
  before the marked hero keeps the logo we generated for it, and a
  game with our mark in the folder ends up showing that logo over
  it: two marks in one banner. RetireGeneratedLogo deletes the logo
  grid files under both names only when the bytes are ours byte for
  byte; art the user chose in Steam's own UI, or anything a byte off
  our own, is never touched. The build step calls it beside a folder
  hero, and a folder-hero build re-run offers no logo to put back.

Launcher core harness: 2686 checks passed, 18 above the base: the
impostor, the cut file, the retirement under both names, the user's
own art standing, and the no-hero path filling everything as before.

Assisted-by: Hermes (Qwen Code 3.8 Max)
Author
Member

Review follow-up, commit 9eaa2db. Both findings reproduced against the published head first; both now have checks in the hero block, 2686 in the harness against 2668 at a clean worktree of main.

  • header-only impostor: GameHero took a 45-byte file with a signature, an IHDR and an IEND and no pixels in it, a file that drew its own size for the check, and would have offered it to Steam, trading the logo slot for a black capsule. It now wants the IHDR CRC right, an IDAT between the ends, and an intact IEND, the same rules the builder holds its own output to. A file cut mid-write is checked too.
  • the upgrade path, found while reproducing: WriteArtwork deliberately never overwrites, so an install from before the marked hero keeps the logo this launcher generated for it, and the game ends up with that logo drawn over its own marked hero, two marks in one banner. RetireGeneratedLogo deletes the logo grid files under both names only when the bytes are ours byte for byte; art the user chose in Steam's UI, or anything a byte off our own, is never touched, and nothing runs at all when the folder has no hero. BuildStepViewModel calls it after the write beside a folder hero; a folder-hero build re-run offers no logo, so a retired logo stays retired. That makes App/ViewModels/BuildStepViewModel.cs a third file in this pull request.

Both PR heads now carry the review fixes; nothing else in either diff moved.

Review follow-up, commit `9eaa2db`. Both findings reproduced against the published head first; both now have checks in the hero block, 2686 in the harness against 2668 at a clean worktree of main. - header-only impostor: `GameHero` took a 45-byte file with a signature, an IHDR and an IEND and no pixels in it, a file that drew its own size for the check, and would have offered it to Steam, trading the logo slot for a black capsule. It now wants the IHDR CRC right, an IDAT between the ends, and an intact IEND, the same rules the builder holds its own output to. A file cut mid-write is checked too. - the upgrade path, found while reproducing: `WriteArtwork` deliberately never overwrites, so an install from before the marked hero keeps the logo this launcher generated for it, and the game ends up with that logo drawn over its own marked hero, two marks in one banner. `RetireGeneratedLogo` deletes the logo grid files under both names only when the bytes are ours byte for byte; art the user chose in Steam's UI, or anything a byte off our own, is never touched, and nothing runs at all when the folder has no hero. `BuildStepViewModel` calls it after the write beside a folder hero; a folder-hero build re-run offers no logo, so a retired logo stays retired. That makes `App/ViewModels/BuildStepViewModel.cs` a third file in this pull request. Both PR heads now carry the review fixes; nothing else in either diff moved.
Author
Member

Heads-up from the paired builder pull request: review asked the gold line out from under the LONGSHOT wording on the baked hero, and it is out there (the mark is now glyph over word only). Nothing changes in this repository's code: GameHero's whole-PNG rules, the _logo drop and the logo retirement all read and write the same files either way, and the hero's size is untouched. Harness still 2686 checks at this head.

Heads-up from the paired builder pull request: review asked the gold line out from under the LONGSHOT wording on the baked hero, and it is out there (the mark is now glyph over word only). Nothing changes in this repository's code: `GameHero`'s whole-PNG rules, the `_logo` drop and the logo retirement all read and write the same files either way, and the hero's size is untouched. Harness still 2686 checks at this head.
HumanBean deleted branch feat/steam-hero-banner 2026-11-25 04:14:07 +00:00
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!260
No description provided.