feat(steam): the tile uses the banner the game folder carries, when it has one #377
No reviewers
Labels
No labels
area/build
area/install
area/mods
area/saves
area/tooling
area/ui
area/updates
ci: approved
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!377
Loading…
Reference in a new issue
No description provided.
Delete branch "omgitsgela/LongshotLauncher:feat/game-folder-hero"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The game's own frame should be on its details page. The builder now makes it (Longshot #2353): when the player's own dump has the staff-credit movie, the finish decodes one pinned frame, draws Longshot's mark on it, and writes
longshot_hero.png(1920x620) beside the game's executable. This is the launcher half that was missing:artwork()wrote its four generated slots and never looked at the game folder, so the picture could not reach Steam.When the game folder carries a whole 1920x620 PNG of that name, the launcher now:
_logobeside it, because the banner already carries the mark;Without such a file, nothing changes: the four generated slots are written as before. No game-derived image ships in this repository; the composed banner stays in the player's own game folder.
Testing
Tested: Linux, this PC, x86_64.
cargo test --lockedat headc9b3bf6: 287 passed, 0 failed, 1 ignored. The banner decision has its own module,game::steam::hero_art, with six named cases:the_game_folders_banner_takes_the_hero_slot_and_the_logo_goes,a_heros_own_art_keeps_its_slot_and_the_logo_stays,without_a_banner_the_slots_are_written_as_before,whole_hero_is_a_complete_png_of_the_heros_own_size(it decodes, and refuses a truncated file, a wrong size and a non-PNG),an_upgrade_retires_the_art_the_released_launcher_shippedandan_upgrade_from_the_rust_port_release_is_retired_too(both plant a whole 1920x620 banner that is nobody's shipped artwork in the game folder and the launcher's own older art in the grid, then require the banner to take the hero slot and the old logo to go).scripts/ci-test.sh --longshot <the committests/longshot.refpins,7015105c…>`: green, the 287 plus the contract checks against that builder commit.cargo fmt --check: clean;cargo clippy --all-targets -- -D warnings: clean (this PC is Rust 1.100.0; the launcher pins 1.99.1).mainand the forge calls it mergeable; the shortcut path it rides on is the current one.Still to test: the end-to-end on a machine with a real build and the player's own banner: build with the dump, let the launcher refresh the shortcut, and see the tile. That needs the Longshot builder release that carries #2353; the file the launcher reads is the one it writes.
Risks
Contained: the launcher only reads one optional file in the game folder, and only ever deletes grid art whose bytes are identical to its own generated ones. Steam's own art, the player's own art and held slots are untouched. A revert is enough.
Checklist
main; the title is a Conventional Commit.cargo test, clippy and fmt as above.docs/mentions the generated art; the new rule is in the function's comment and this description).Assisted-by:trailers.How the banner is requested
When Add to Steam adds or updates a tile, the launcher first checks the builder program's own file for the word
steam-art(reading the file, never running an old builder that could mistake the word for game arguments). If the word is there, it runssteam-art --game <the profile's build folder>with a 20 second cap and ignores any failure. The builder writeslongshot_hero.pngbeside the executable when the player's dump can make one; the launcher then installs that banner as the hero. If the builder is older, fails, or makes nothing, the generated artwork is written exactly as before.Possibly related, for context:
@review
Recommendation: Request changes. The launcher looks for the banner in the builder folder, while the game and its banner are in a build folder, so the advertised feature will not work for a normal installation. Existing artwork also cannot be recognized for upgrade because this change replaces the bytes used for the comparison.
The change attempts to put a locally generated game banner on a Steam shortcut and omit the redundant logo. Its current folder selection, upgrade handling and artwork retirement prevent that result or can alter a custom tile.
Blocking (3): must change before merging.
src/game/steam.rs:177: The artwork reader receives the version's builder folder instead of the selected profile's game build folder. (more on the line) Do: Resolve the game folder for the version and profile using the builder's info result, and pass that folder to artwork. Add a synthetic test with distinct builder and game folders.src/game/steam.rs:452: Retirement compares only against this head's artwork, but both embedded hero and logo differ from the files shipped by the base. (more on the line) Do: Recognize the previously shipped generated hero and logo as well as the current versions, without treating arbitrary player artwork as launcher-owned. Test an upgrade from the base assets.src/game/steam.rs:177: Existing shortcuts are not refreshed when a banner becomes available. (more on the line) Do: Refresh artwork for existing owned shortcuts after the relevant build or during the existing shortcut migration, while preserving held custom slots. Test a banner appearing after the shortcut was created.Should fix (2): not blocking, but worth doing before merging.
src/game/steam.rs:452: The generated logo is retired even when a custom hero holds the hero slot and the game banner will not be written. (more on the line) Do: Decide whether the game banner can occupy the hero slot before retiring the logo, and preserve the logo when another hero holds the slot. Cover mixed custom and generated slots in a test.src/game/steam.rs:412: The predicate accepts a truncated or corrupt file as a whole PNG because it only checks selected header bytes and the final marker. (more on the line) Do: Validate the PNG structure and image data before replacing generated artwork, and test a truncated file with a valid-looking header and ending.Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)
@fixcan do L1, L2, L3, L4 and L5.Questions (1) (not confirmed from the code; they don't hold the recommendation)
assets/steam/hero_1920x620.png: Which revision's four slot files reproduce from the unchanged recipe and originals?Checks: Failing on this head, which is behind its base, where it passes:
CI / Release packages and stable upgrades (pull_request).@rebase(or@fix) brings it up to date and runs it again; not held against it.More: does it help, other systems, switches, what was read
Does it help: Unproven. The reported Linux tests cover the PNG predicate, not the artwork path, and the author reports that an end-to-end run with the builder is still needed.
Other systems: The artwork path is shared by Windows and Linux, both Steam grid stems, game shortcuts and the launcher’s own tile. The launcher tile passes no game folder. Profile-specific build selection and existing custom Steam artwork need coverage; no end-to-end Steam run is reported.
Switches: None.
Reviewed:
83ba43bdbaagainst29c6603aa4: Read AGENTS.md, CONTRIBUTING.md, the commit log, the full changed Rust file, its diff, the artwork recipe and documentation, and the relevant builder and path documentation. Skimmed the binary artwork diffs and related callers and tests; no review checklist or pull request template was present. Did not visually inspect the PNGs or run code.; nothing run (a code review).Checked and fine:
Testing: Read-only review; no commands from the project or tests were run. The author reports Linux cargo tests, clippy and formatting checks, with end-to-end Steam testing outstanding.
Overlaps and merge order: None identified from the supplied pull request information.
Automated code review by BeanBot (gpt-6.1-terra), asked for by omgitsgela. Nothing was run; a maintainer decides.
@ -175,3 +175,3 @@let changed =library::use_launcher(&path, title, id, &builder, &ctx.profile, &ctx.home)?;artwork(&path, id)?;artwork(&path, id, Some(version))?;L1 (blocking): The artwork reader receives the version's builder folder instead of the selected profile's game build folder.
When: For a normal installation the builder is in the version folder and the game executable and its longshot_hero.png are under builds//. Reading version/longshot_hero.png fails, so the generated hero is used even when the builder produced a banner.
Do: Resolve the game folder for the version and profile using the builder's info result, and pass that folder to artwork. Add a synthetic test with distinct builder and game folders.
L4 (blocking): Existing shortcuts are not refreshed when a banner becomes available.
When: After a player updates or rebuilds a version with an existing Steam tile, the startup migration only retargets shortcuts and does not call artwork; artwork is called when a shortcut is added or moved. The existing tile therefore retains its old art without an explicit shortcut rewrite.
Do: Refresh artwork for existing owned shortcuts after the relevant build or during the existing shortcut migration, while preserving held custom slots. Test a banner appearing after the shortcut was created.
@ -416,0 +449,4 @@let generated_hero: &[u8] = include_bytes!("../../assets/steam/hero_1920x620.png");let logo: &[u8] = include_bytes!("../../assets/steam/logo_998x323.png");if player.is_some() {retire(&grid, app, [("_hero", generated_hero), ("_logo", logo)])?;L2 (blocking): Retirement compares only against this head's artwork, but both embedded hero and logo differ from the files shipped by the base.
When: A shortcut created by the previous launcher contains the base's hero and logo. Neither equals these new embedded bytes, so both remain held and the player's banner cannot replace the hero.
Do: Recognize the previously shipped generated hero and logo as well as the current versions, without treating arbitrary player artwork as launcher-owned. Test an upgrade from the base assets.
L3 (should fix): The generated logo is retired even when a custom hero holds the hero slot and the game banner will not be written.
When: If a player has a custom hero and the launcher-generated logo, a valid game banner causes retire to delete the logo; the held check then preserves the custom hero, leaving that tile without its previous logo.
Do: Decide whether the game banner can occupy the hero slot before retiring the logo, and preserve the logo when another hero holds the slot. Cover mixed custom and generated slots in a test.
@ -408,0 +409,4 @@fn whole_hero(bytes: &[u8]) -> bool {const W: u32 = 1920;const H: u32 = 620;bytes.len() > 24L5 (should fix): The predicate accepts a truncated or corrupt file as a whole PNG because it only checks selected header bytes and the final marker.
When: A file containing the PNG signature, an IHDR name and the expected dimensions followed directly by the IEND marker passes, despite having no image data. It is installed as the hero and the generated logo is removed.
Do: Validate the PNG structure and image data before replacing generated artwork, and test a truncated file with a valid-looking header and ending.
All five are addressed in
744dc98.L1 (folder).
write_shortcutnow resolves the game folder withinfo::folder(version, &ctx.profile), the builder's own info result for the version and the profile the shortcut plays, and passes that toartwork.installed_withresolves the same way. A new test stages the build folder apart from the version root (builds/defaultunder a separate root) and proves the banner is read from the game folder, not from the version.L2 (upgrade). The bytes the base release shipped are now in the crate too (
assets/steam/previous/), taken from just before the gold-line change, and retirement accepts either the current or the previously shipped hero and logo. The comparison is still exact bytes, so player art never matches. Test: an upgrade with the previous hero and previous logo in the grid ends with the game folder's banner in the hero slot and the old logo recognised and retired.L3 (logo retired when a custom hero holds the slot). The slot is checked for foreign art before anything is retired. If a hero the launcher did not write holds it, the banner cannot take the slot, so the generated logo is kept (and written back if it was missing). Test: a player-made hero stays untouched and the logo is present.
L4 (existing shortcuts not refreshed). An owned tile is refreshed whenever the launcher looks it up (
installed_with, which the UI re-runs after a build), not only when the shortcut is created. Held custom slots are preserved by the same rules. Test: the no-banner case still writes the generated slots, and the banner case replaces them on a later run.L5 (truncated PNG).
whole_heronow decodes the file with thepngcrate, checks 1920x620 and decodes the first frame, so a truncated or corrupt file is rejected. Test: half of a valid hero is refused, as is a wrong size and a non-PNG.Suite: 285 pass, 1 ignored.
cargo clippy --all-targetsandcargo fmt --checkclean.@review
Recommendation: Request changes. Existing installs can keep the base release’s generated hero instead of receiving the game banner, and the selected profile’s build folder is not reliably resolved. Custom heroes in non-PNG formats can also lose their generated logo.
The launcher uses a game-produced banner for Steam artwork and refreshes existing shortcuts. The fix adds upgrade handling and PNG decoding, but the folder lookup and artwork retirement still miss cases covered by the earlier review.
Blocking (2): must change before merging.
src/game/steam.rs:177: The artwork reader receives the version's builder folder instead of the selected profile's game build folder. When: For a normal installation the builder is in the version folder and the game executable and its longshot_hero.png are under builds//. Reading version/longshot_hero.png fails, so the generated hero is used even when the builder produced a banner. Do: Resolve the game folder for the version and profile using the builder's info result, and pass that folder to artwork. Add a synthetic test with distinct builder and game folders.src/game/steam.rs:452: Retirement compares only against this head's artwork, but both embedded hero and logo differ from the files shipped by the base. When: A shortcut created by the previous launcher contains the base's hero and logo. Neither equals these new embedded bytes, so both remain held and the player's banner cannot replace the hero. Do: Recognize the previously shipped generated hero and logo as well as the current versions, without treating arbitrary player artwork as launcher-owned. Test an upgrade from the base assets.Should fix (2): not blocking, but worth doing before merging.
src/game/steam.rs:452: The generated logo is retired even when a custom hero holds the hero slot and the game banner will not be written. When: If a player has a custom hero and the launcher-generated logo, a valid game banner causes retire to delete the logo; the held check then preserves the custom hero, leaving that tile without its previous logo. Do: Decide whether the game banner can occupy the hero slot before retiring the logo, and preserve the logo when another hero holds the slot. Cover mixed custom and generated slots in a test.src/game/steam.rs:412: The predicate accepts a truncated or corrupt file as a whole PNG because it only checks selected header bytes and the final marker. When: A file containing the PNG signature, an IHDR name and the expected dimensions followed directly by the IEND marker passes, despite having no image data. It is installed as the hero and the generated logo is removed. Do: Validate the PNG structure and image data before replacing generated artwork, and test a truncated file with a valid-looking header and ending.Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)
@fixcan do L1, L2, L3 and L5.Since the last review (on
83ba43bdba)Resolved: L4 (Existing shortcuts are not refreshed when a banner becomes available.)
Still open: L1 (The artwork reader receives the version's builder folder instead of the selected profile's…); L2 (Retirement compares only against this head's artwork, but both embedded hero and logo diff…); L3 (The generated logo is retired even when a custom hero holds the hero slot and the game ban…); L5 (The predicate accepts a truncated or corrupt file as a whole PNG because it only checks se…); L6 (The visible Steam result has not yet been exercised with a builder-produced banner.)
Checks: Still running:
PR title / Conventional Commit title (pull_request),CI / Rust formatting, lint and tests (pull_request),CI / Release packages and stable upgrades (pull_request).Also noticed (1; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Unproven: the author reports passing synthetic artwork tests, but the visible Steam result with a builder-produced banner has not been exercised.
Other systems: The artwork path is shared by Windows and Linux Steam shortcuts. Profile-specific builds depend on an asynchronous, single-entry builder-info cache; custom artwork can use extensions other than PNG. No end-to-end Steam result is reported.
Switches: None.
Reviewed:
744dc98af7against29c6603aa4: Read AGENTS.md, CONTRIBUTING.md, the Steam change and its surrounding code, the builder-info folder lookup, and the relevant refresh caller. Skimmed the lockfile, commit list and binary artwork metadata. No review checklist or pull request template was found.; nothing run (a code review).Checked and fine:
Testing: The author reports 285 passing tests, one ignored, and clean clippy and formatting checks. CI is still running; no commands or tests were run for this review.
Overlaps and merge order: None found.
Automated code review by BeanBot (gpt-6.1-terra), asked for by omgitsgela. Nothing was run; a maintainer decides.
What changed at this head
744dc98af7 → c9b3bf6, three commits:e7632ac— the note aboveslot_stemssaid the banner is read without decoding it. It is decoded now; the comment is gone (the "also noticed" line in the 18:49 review).c9b3bf6— L2 fixed: the art the released launcher actually shipped is now recognised as the launcher's own. Details and proof below.L2 was right, and here is the proof
The branch carried two revisions of its own art: this head's, and the pair from the Rust port. The bytes the released
launcher writes today are neither:
mainshipsprevious/carriedhero_1920x620.png66694ba498…21e1f8d077…07cb82580c…logo_998x323.pngf02b47e833…0ffafbe18b…0854ed25d7…The two
previous/copies are what5932797e(the Rust port) shipped, and nothing in the tree matched main's bytes —so a tile written by the launcher in the field held art that matched no revision
artwork()knew, stayed held, andthe build's banner never took the hero slot.
Fix:
previous/now holdsmain's copies byte for byte, the Rust port's pair moved toolder/, andhero_art/logo_artcover all three revisions. A file matching none of them is still the player's or Steam's and is nevertouched.
assets/steam/README-artwork.mdsays which revision each pair is and what to move when the artwork changesagain.
Two tests name it, with a whole 1920x620 PNG that is nobody's shipped artwork as the stand-in banner, so "the banner
won" is distinguishable from "the launcher's own art was written":
an_upgrade_retires_the_art_the_released_launcher_shippedandan_upgrade_from_the_rust_port_release_is_retired_too.Red/green, not assertion: the first test, run unchanged against
744dc98af7in a throwaway worktree, fails there —test result: FAILED. 0 passed; 1 failed(the grid keeps the release's hero). Atc9b3bf6it passes.Where the other findings stand at
744dc98af7foreign_herois computed before anything is retired(
src/game/steam.rs:487), and if a hero the launcher did not write holds the slot, the generated logo is writtenback and kept (
:489-499, and("_logo", logo, player.is_none() || foreign_hero)in the write loop).a_heros_own_art_keeps_its_slot_and_the_logo_stayscovers exactly the mixed case.whole_herois not a header scan: it decodes with thepngcrate,rejects any
(width,height)other than 1920x620, and requiresnext_frameto decode(
src/game/steam.rs:447-462). A file with a signature, an IHDR and an IEND and no image data fails atread_info/next_frame. The test asserts a truncated file, a wrong-size file andb"not a png"are all refused.version/longshot_hero.png) is not what the code does:installed_withresolves the folder assuper::info::folder(version, profile)(src/game/steam.rs:57-58), which is the builder's info result. What istrue: that lookup reads a single-entry thread-local cache and falls back to
builds/defaultwhen the cache is coldor names another profile (
src/game/info.rs:157-165). For a code-mod profile the builder resolves into its ownbuild directory, so a cold cache means the guess, and the banner is missed. Closing it properly means the shortcut
path calling
info::describe(the synchronous call Play already uses, with a 30 s bound) instead of trusting theprobe. That is a decision about blocking a "add to Steam" click on a builder subprocess, so it is left for a
maintainer's steer rather than changed unasked —
@fixcan take it if that is the preferred route.end-to-end needs the Longshot builder release that carries #2353.
The two failing checks were the forge, not the branch
From the job logs of the run at
744dc98af7:116460(Conventional Commit title): the title step produced no verdict — the job died withcontext deadline exceededwhile copyingSUMMARY.mdout of the act container. Nothing of the title was checked.116458(Rust formatting, lint and tests):error: RPC failed; curl 92 HTTP/2 stream 3 was not closed cleanly: INTERNAL_ERROR, thencurl 56 Recv failure: Connection reset by peer, thenfatal: unable to access 'https://git.magicbean.dev/MagicBeanDev/Longshot.git/': … 403. It never reached cargo.116459(Release packages and stable upgrades) also fails onmainitself (job116150), so it is inheritedfrom the base and not held against this branch.
At
c9b3bf6on this PC:cargo test --locked287 passed, 0 failed, 1 ignored,cargo fmt --checkclean, andscripts/ci-test.sh --longshot 7015105c…(the committests/longshot.refpins) green including the contract checks.@review
This review was submitted on
744dc98, and two commits have landed since; please look at the headc9b3bf6, where L2 goes further than the version reviewed. Point by point:L2 (upgrade) is now exact, and it was the strongest finding. What the released launcher actually writes is
main's pair (66694ba4…hero,f02b47e8…logo), not the Rust port's pair that myprevious/held. The head now carries both revisions:previous/ismain's copy byte for byte,older/is the Rust port's, andhero_art/logo_artcompare against all three (current, previous, older). Two tests name the upgrade:an_upgrade_retires_the_art_the_released_launcher_shippedandan_upgrade_from_the_rust_port_release_is_retired_too, andassets/steam/README-artwork.mdsays which pair is which and what to move when the art changes again.L1 (folder). At this head the reader is not given the version root:
write_shortcutpassesinfo::folder(version, &ctx.profile)(src/game/steam.rs:153) andinstalled_withdoes the same (:58).info::folderis the builder info result for that version and profile, falling back tobuilds/defaultonly when no probe has run for it. If you think that fallback is what "not reliably resolved" means, say so and I will make the folder assert itself (exists and holds the built executable) before the banner is read, rather than trusting the fallback.L3. The hero slot is tested for foreign art before anything is retired, and the generated logo is kept, and restored if missing, when a foreign hero holds the slot. Test:
a_heros_own_art_keeps_its_slot_and_the_logo_stays.L5.
whole_herodecodes the image with thepngcrate and decodes the first frame; a file with a valid signature, IHDR and IEND but no data is refused. Test: half of a real hero, a wrong size and a non-PNG are all rejected.L6. Agreed, and it cannot be closed from here: the launcher can only show a builder-produced banner after a builder release carries Longshot #2353. The test above proves the reader given a whole banner; the visible Steam result needs that release and will be checked then.
Current head: 287 tests pass, clippy
-D warningsclean, fmt clean.@review
Recommendation: Request changes. The released artwork is now recognized, but the launcher can still select the wrong profile’s build folder, remove the logo beside a custom JPEG hero, and accept an incomplete PNG.
The launcher can use a game-produced banner for a Steam shortcut and retire its own older artwork. The feature adds PNG decoding and retains copies of shipped artwork, but several existing edge cases remain unresolved.
Blocking (1): must change before merging.
src/game/steam.rs:177: The artwork reader receives the version's builder folder instead of the selected profile's game build folder. When: For a normal installation the builder is in the version folder and the game executable and its longshot_hero.png are under builds//. Reading version/longshot_hero.png fails, so the generated hero is used even when the builder produced a banner. Do: Resolve the game folder for the version and profile using the builder's info result, and pass that folder to artwork. Add a synthetic test with distinct builder and game folders.Should fix (2): not blocking, but worth doing before merging.
src/game/steam.rs:452: The generated logo is retired even when a custom hero holds the hero slot and the game banner will not be written. When: If a player has a custom hero and the launcher-generated logo, a valid game banner causes retire to delete the logo; the held check then preserves the custom hero, leaving that tile without its previous logo. Do: Decide whether the game banner can occupy the hero slot before retiring the logo, and preserve the logo when another hero holds the slot. Cover mixed custom and generated slots in a test.src/game/steam.rs:412: The predicate accepts a truncated or corrupt file as a whole PNG because it only checks selected header bytes and the final marker. When: A file containing the PNG signature, an IHDR name and the expected dimensions followed directly by the IEND marker passes, despite having no image data. It is installed as the hero and the generated logo is removed. Do: Validate the PNG structure and image data before replacing generated artwork, and test a truncated file with a valid-looking header and ending.Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)
@fixcan do L1, L3 and L5.Since the last review (on
744dc98af7)Resolved: L2 (Retirement compares only against this head's artwork, but both embedded hero and logo diff…)
Still open: L1 (The artwork reader receives the version's builder folder instead of the selected profile's…); L3 (The generated logo is retired even when a custom hero holds the hero slot and the game ban…); L5 (The predicate accepts a truncated or corrupt file as a whole PNG because it only checks se…); L6 (The visible Steam result has not yet been exercised with a builder-produced banner.)
Checks: Failing on this head, which is behind its base, where it passes:
CI / Release packages and stable upgrades (pull_request).@rebase(or@fix) brings it up to date and runs it again; not held against it.More: does it help, other systems, switches, what was read
Does it help: Unproven: the reported synthetic tests exercise banner selection and upgrades, but the visible Steam result with a builder-produced banner has not yet been tested.
Other systems: The artwork path applies to Steam shortcuts on Windows and Linux. The reported tests ran on Linux; a real builder-to-Steam run remains outstanding.
Switches: None.
Reviewed:
c9b3bf6adcagainst29c6603aa4: Read AGENTS.md, CONTRIBUTING.md, the pull request diff, src/game/steam.rs, src/game/info.rs, the artwork documentation, commit history, comments, and CI report. Skimmed the binary artwork and lockfile; no review checklist or pull request template was found at the named paths.; nothing run (a code review).Checked and fine:
Testing: No commands that build or run project code were executed. The author reports 287 passing tests, one ignored, and clean formatting and Clippy checks.
Overlaps and merge order: Longshot #2353 supplies the builder-produced banner needed for the end-to-end result.
Automated code review by BeanBot (gpt-6.1-terra), asked for by omgitsgela. Nothing was run; a maintainer decides.
The launcher now asks for the banner when the player presses Add to Steam, and not before (
5a7eed3).steam-artbefore calling: an older builder treats unknown words as game arguments, and asking would start the game. No word, no call, generated art as before.287 tests pass, 1 ignored; clippy and fmt clean.
@review
Recommendation: Request changes. The selected profile can still receive another build’s banner, and the launcher can remove its generated logo while a custom JPEG hero holds the slot. The new builder invocation also needs to be described in the pull request.
The launcher can use a game-produced banner for a Steam shortcut and retire matching artwork from earlier launcher releases. It adds image decoding and an optional builder invocation, but profile resolution and some artwork safeguards remain incomplete.
Blocking (1): must change before merging.
src/game/steam.rs:177: The artwork reader receives the version's builder folder instead of the selected profile's game build folder. When: For a normal installation the builder is in the version folder and the game executable and its longshot_hero.png are under builds//. Reading version/longshot_hero.png fails, so the generated hero is used even when the builder produced a banner. Do: Resolve the game folder for the version and profile using the builder's info result, and pass that folder to artwork. Add a synthetic test with distinct builder and game folders.Should fix (2): not blocking, but worth doing before merging.
src/game/steam.rs:452: The generated logo is retired even when a custom hero holds the hero slot and the game banner will not be written. When: If a player has a custom hero and the launcher-generated logo, a valid game banner causes retire to delete the logo; the held check then preserves the custom hero, leaving that tile without its previous logo. Do: Decide whether the game banner can occupy the hero slot before retiring the logo, and preserve the logo when another hero holds the slot. Cover mixed custom and generated slots in a test.src/game/steam.rs:412: The predicate accepts a truncated or corrupt file as a whole PNG because it only checks selected header bytes and the final marker. When: A file containing the PNG signature, an IHDR name and the expected dimensions followed directly by the IEND marker passes, despite having no image data. It is installed as the hero and the generated logo is removed. Do: Validate the PNG structure and image data before replacing generated artwork, and test a truncated file with a valid-looking header and ending.Nits (1): optional.
src/game/steam.rs:224: The pull request description does not explain that adding or updating a shortcut now runs the builder to request artwork. (more on the line) Do: Update the pull request description to explain the builder invocation, when it runs, and its optional-failure behavior.Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)
@fixcan do L1, L3, L5 and L7.Since the last review (on
c9b3bf6adc)Still open: L1 (The artwork reader receives the version's builder folder instead of the selected profile's…); L3 (The generated logo is retired even when a custom hero holds the hero slot and the game ban…); L5 (The predicate accepts a truncated or corrupt file as a whole PNG because it only checks se…); L6 (The visible Steam result has not yet been exercised with a builder-produced banner.)
New: L7 (The pull request description does not explain that adding or updating a shortcut now runs…)
Checks: Still running: 5 checks.
Also noticed (1; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Unproven: synthetic artwork tests are reported, but no end-to-end run with a builder-produced banner and the visible Steam result is reported.
Other systems: The artwork path applies on Windows and Linux and preserves held PNG artwork by byte comparison. Custom hero files with other extensions and incomplete PNG streams remain covered by open ledger items.
Switches: No switches added, changed or removed.
Reviewed:
5a7eed3fc9against29c6603aa4: Read the repository rules, pull request description, comments, ledger, source diff and relevant Steam artwork, profile-folder and process code. Skimmed binary artwork and recorded test results; the complete process and Steam source output was truncated.; nothing run (a code review).Checked and fine:
Testing: The author reports 287 passing tests, one ignored, plus clean formatting and clippy at an earlier head; CI is still running. No commands or tests were run for this review.
Overlaps and merge order: None found in the supplied context.
Automated code review by BeanBot (gpt-6.1-terra), asked for by omgitsgela. Nothing was run; a maintainer decides.
@ -199,0 +221,4 @@return Ok(());}let mut command = ctx.command_for(builder, false, false)?;command.args(["steam-art", "--game"]).arg(game);L7 (nit): The pull request description does not explain that adding or updating a shortcut now runs the builder to request artwork.
When: When a builder contains the steam-art command, Add to Steam starts it with steam-art and --game, although the description says the launcher reads an optional file already in the game folder.
Do: Update the pull request description to explain the builder invocation, when it runs, and its optional-failure behavior.
Branding update, all four plates (
7c4c922):assets/longshot.png, the same master the game build composes its banner from, instead of cutting it out of the old plate art.assets/longshot.pngis replaced with the game build's master (same design, the newer file).previous/toolder/so installed tiles still retire cleanly.287 tests pass, 1 ignored. The composite (#2353) and these four now carry the same mark and wordmark.
@review
Recommendation: Request changes. A code-mod profile can still use the default build’s banner because both shortcut paths trust a cached folder lookup that falls back to builds/default. The custom JPEG and incomplete PNG cases also remain unresolved.
The launcher can use a game-generated Steam hero and retire its own older art while preserving custom slots. It also refreshes existing shortcuts and updates the generated artwork, but folder selection and some artwork validation and preservation cases remain incorrect.
Blocking (1): must change before merging.
src/game/steam.rs:177: The artwork reader receives the version's builder folder instead of the selected profile's game build folder. When: For a normal installation the builder is in the version folder and the game executable and its longshot_hero.png are under builds//. Reading version/longshot_hero.png fails, so the generated hero is used even when the builder produced a banner. Do: Resolve the game folder for the version and profile using the builder's info result, and pass that folder to artwork. Add a synthetic test with distinct builder and game folders.Should fix (2): not blocking, but worth doing before merging.
src/game/steam.rs:452: The generated logo is retired even when a custom hero holds the hero slot and the game banner will not be written. When: If a player has a custom hero and the launcher-generated logo, a valid game banner causes retire to delete the logo; the held check then preserves the custom hero, leaving that tile without its previous logo. Do: Decide whether the game banner can occupy the hero slot before retiring the logo, and preserve the logo when another hero holds the slot. Cover mixed custom and generated slots in a test.src/game/steam.rs:412: The predicate accepts a truncated or corrupt file as a whole PNG because it only checks selected header bytes and the final marker. When: A file containing the PNG signature, an IHDR name and the expected dimensions followed directly by the IEND marker passes, despite having no image data. It is installed as the hero and the generated logo is removed. Do: Validate the PNG structure and image data before replacing generated artwork, and test a truncated file with a valid-looking header and ending.Nits (1): optional.
src/game/steam.rs:224: The pull request description does not explain that adding or updating a shortcut now runs the builder to request artwork. When: When a builder contains the steam-art command, Add to Steam starts it with steam-art and --game, although the description says the launcher reads an optional file already in the game folder. Do: Update the pull request description to explain the builder invocation, when it runs, and its optional-failure behavior.Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)
@fixcan do L1, L3, L5 and L7.Since the last review (on
5a7eed3fc9)Still open: L1 (The artwork reader receives the version's builder folder instead of the selected profile's…); L3 (The generated logo is retired even when a custom hero holds the hero slot and the game ban…); L5 (The predicate accepts a truncated or corrupt file as a whole PNG because it only checks se…); L6 (The visible Steam result has not yet been exercised with a builder-produced banner.); L7 (The pull request description does not explain that adding or updating a shortcut now runs…)
Checks: Still running: 5 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven: the reported synthetic tests exercise banner selection, but no visible Steam result with a builder-produced banner is reported. This is not a performance change.
Other systems: The artwork path affects Steam shortcuts on Windows and Linux, including existing shortcuts and custom grid art. The reported tests ran on Linux; the visible result with the builder-produced banner remains untested.
Switches: None.
Reviewed:
7c4c922881against29c6603aa4: Read AGENTS.md, CONTRIBUTING.md, the changed artwork generator and artwork README, and the relevant Steam and builder-info code. Reviewed the diff, commit list, comments, reported tests and CI status. Binary artwork and generated files were not visually inspected; the full Steam file output was truncated.; nothing run (a code review).Checked and fine:
Testing: No commands that execute project code or tests were run. The author reports 287 tests passed, one ignored, and clean formatting and Clippy; CI is still running. The builder-produced banner and visible Steam result still need an end-to-end check.
Overlaps and merge order: Longshot #2353 supplies the builder-produced banner; its release is needed for the reported end-to-end check. Other overlapping pull requests were not available.
Automated code review by BeanBot (gpt-6.1-terra), asked for by omgitsgela. Nothing was run; a maintainer decides.
L1, L3 and L5 are addressed in
836ba61(on top of0805a76).write_shortcutnow callsinfo::resolve_folder, which runs the builder'sinfofor this run (20 s cap) and uses itsbuild.folder; the cached answer is only a last resort for old builders.installed_with) no longer uses the default-folder fallback. It refreshes art only from a folder a finished probe named for this version and profile, and otherwise abstains; the next Add to Steam does the work. A wrong banner can no longer be copied in and then look foreign.hero.jpgorlogo.jpgholds its slot, is never overwritten, and is never given a competing.png.Tests: 289 pass, 1 ignored, including a custom jpeg hero keeping the launcher logo and a player jpeg logo not gaining a competing png. Clippy
-D warningsand fmt clean.@review
Recommendation: Request changes. A failed or timed-out builder lookup can still select the default build’s banner for a different profile, leaving that profile with the wrong Steam art.
The launcher can use a game-produced Steam hero and retire its own older hero and logo, while preserving custom art. It adds profile resolution and PNG decoding, but the fallback can still select the wrong build folder.
Blocking (1): must change before merging.
src/game/steam.rs:177: The artwork reader receives the version's builder folder instead of the selected profile's game build folder. When: For a normal installation the builder is in the version folder and the game executable and its longshot_hero.png are under builds//. Reading version/longshot_hero.png fails, so the generated hero is used even when the builder produced a banner. Do: Resolve the game folder for the version and profile using the builder's info result, and pass that folder to artwork. Add a synthetic test with distinct builder and game folders.Should fix (1): not blocking, but worth doing before merging.
src/game/steam.rs:412: The predicate accepts a truncated or corrupt file as a whole PNG because it only checks selected header bytes and the final marker. When: A file containing the PNG signature, an IHDR name and the expected dimensions followed directly by the IEND marker passes, despite having no image data. It is installed as the hero and the generated logo is removed. Do: Validate the PNG structure and image data before replacing generated artwork, and test a truncated file with a valid-looking header and ending.Nits (1): optional.
src/game/steam.rs:224: The pull request description does not explain that adding or updating a shortcut now runs the builder to request artwork. When: When a builder contains the steam-art command, Add to Steam starts it with steam-art and --game, although the description says the launcher reads an optional file already in the game folder. Do: Update the pull request description to explain the builder invocation, when it runs, and its optional-failure behavior.Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)
@fixcan do L1, L5 and L7.Since the last review (on
7c4c922881)Resolved: L3 (The generated logo is retired even when a custom hero holds the hero slot and the game ban…)
Still open: L1 (The artwork reader receives the version's builder folder instead of the selected profile's…); L5 (The predicate accepts a truncated or corrupt file as a whole PNG because it only checks se…); L6 (The visible Steam result has not yet been exercised with a builder-produced banner.); L7 (The pull request description does not explain that adding or updating a shortcut now runs…)
Checks: Still running: 5 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven: the reported synthetic tests exercise the artwork decision, but the visible Steam result with a builder-produced banner has not been reported.
Other systems: The folder lookup and Steam artwork paths affect Windows and Linux, including profile-specific builds. The reported tests are on Linux; the visible Steam result remains untested.
Switches: None.
Reviewed:
836ba61fc6against29c6603aa4: Read AGENTS.md, CONTRIBUTING.md, the changes since the ledger, the changed folder-resolution and artwork code, and the artwork documentation. Skimmed the remaining Steam module, artwork generator diff, commit list, recorded test claims, and asset changes; binary artwork was not visually reviewed.; nothing run (a code review).Checked and fine:
Testing: No commands that execute project code were run. The author reports 289 tests passing, one ignored, with clippy and formatting clean; CI is still running.
Overlaps and merge order: Not established from the supplied information.
Automated code review by BeanBot (gpt-6.1-terra), asked for by omgitsgela. Nothing was run; a maintainer decides.
L1 and L5 addressed in
eb7c584.resolve_foldernow abstains whenever the builder'sinfofails or times out, except on the default profile, whosebuilds/defaultis the folder this launcher has always used. A code-mod profile never receives the default build's banner, so the "foreign art locks the slot" trap is gone.289 tests pass, 1 ignored; fmt and clippy
-D warningsclean.L6 (visible Steam result with a builder-produced banner) needs a Deck with Steam running; I can do that when you want a live check.
@review
Recommendation: Approve. The selected profile no longer falls back to the default build for code-mod profiles, but whole PNG validation remains incomplete. The visible Steam result also still needs an end-to-end run. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.
The launcher requests and installs a game-produced Steam hero when available, while preserving held artwork and retiring recognized launcher artwork. It also updates the generated Steam branding; the remaining validation gap can allow a truncated banner to replace the generated hero.
Should fix (1): not blocking, but worth doing before merging.
src/game/steam.rs:412: The predicate accepts a truncated or corrupt file as a whole PNG because it only checks selected header bytes and the final marker. When: A file containing the PNG signature, an IHDR name and the expected dimensions followed directly by the IEND marker passes, despite having no image data. It is installed as the hero and the generated logo is removed. Do: Validate the PNG structure and image data before replacing generated artwork, and test a truncated file with a valid-looking header and ending.Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)
@fixcan do L5.Since the last review (on
836ba61fc6)Resolved: L1 (The artwork reader receives the version's builder folder instead of the selected profile's…); L7 (The pull request description does not explain that adding or updating a shortcut now runs…)
Still open: L5 (The predicate accepts a truncated or corrupt file as a whole PNG because it only checks se…); L6 (The visible Steam result has not yet been exercised with a builder-produced banner.)
Checks: Still running: 5 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven: the reported tests exercise the artwork decision, but no run shows a builder-produced banner appearing in Steam.
Other systems: The folder resolution and Steam artwork paths affect Windows and Linux. The reported automated tests ran on Linux; the visible Steam result has not been reported.
Switches: None.
Reviewed:
eb7c584915against29c6603aa4: Read the repository instructions and contribution rules, the changes since the ledger, and the relevant portions of the full PR diff, folder resolution, artwork validation and tests. Artwork binaries and the complete changed code files were not read in full.; nothing run (a code review).Checked and fine:
Testing: Reported: 289 tests passed and one was ignored, with formatting and clippy clean. CI is still running. No commands or tests were run for this review.
Overlaps and merge order: None identified from the supplied information.
Automated code review by BeanBot (gpt-6.1-terra), asked for by omgitsgela. Nothing was run; a maintainer decides.