Skip to content

feat(deck): dependency-free Steam art + pwnDeck rename#278

Merged
mabry1985 merged 1 commit into
mainfrom
feat/deck-steam-art-assets
Jun 21, 2026
Merged

feat(deck): dependency-free Steam art + pwnDeck rename#278
mabry1985 merged 1 commit into
mainfrom
feat/deck-steam-art-assets

Conversation

@mabry1985

@mabry1985 mabry1985 commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Why

You asked whether a fresh install adds the shortcut to Steam with the correct images — and honestly, it didn't. The old steam-art.sh generated art on-device with ImageMagick and parsed shortcuts.vdf with the vdf pip package — neither is on a stock SteamOS, so the art step bailed and no images were installed. The shortcut also needed renaming to pwnDeck (a fresh add-to-steam already uses pwnDeck via the desktop entry; an existing one was still "protoPen").

What — make it dependency-free + validated

  • Pre-rendered grid assets committed to deck/art/ (hero 1920×620, wide 920×430, portrait 600×900, rendered from the OG poster). The script just copies them — no ImageMagick.
  • deck/steam-shortcut.py — a pure-Python (stdlib-only) reader/editor for the binary shortcuts.vdf: resolves the non-Steam shortcut's grid AppID and renames it to pwnDeck (keeps the AppID). No vdf pip package.
  • steam-art.sh now: stop Steam (so it can't clobber the edit, backs up shortcuts.vdf), rename protoPen→pwnDeck, copy the art keyed to the AppID, prompt to restart Steam.

Testing — validated live on the Deck

  • Parser round-trips against the real shortcuts.vdf (found protoPen/appid 2858097465).
  • Ran it: shortcut renamed protoPen→pwnDeck, all three grid images installed, Steam picked them up on restart.
  • shellcheck + ruff clean.

Closes the last gap: a fresh bootstrap → install → add-to-steam → steam-art.sh now genuinely lands a branded pwnDeck entry with correct art, no extra packages.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Steam library grid art installation streamlined with pre-rendered assets for faster, more reliable setup
    • Eliminated external tool dependencies for improved installation reliability
    • Steam shortcut automatically renamed to pwnDeck during installation
    • Enhanced overall installation efficiency and user experience

…k/vdf)

The old steam-art.sh generated art on-device with ImageMagick and parsed
shortcuts.vdf with the `vdf` pip package — neither present on a fresh SteamOS, so
the art never installed and the "correct images from the script" didn't work.

- Pre-render the three grid assets (hero 1920x620, wide 920x430, portrait
  600x900) from the OG poster and commit them to deck/art/ — the script just
  COPIES them. No ImageMagick.
- deck/steam-shortcut.py: a pure-Python (stdlib-only) reader/editor for the
  binary shortcuts.vdf — resolves the non-Steam shortcut's grid AppID and renames
  it to pwnDeck (keeps the AppID). No `vdf` pip package.
- steam-art.sh now: stop Steam (so it can't clobber the edit), rename
  protoPen→pwnDeck, copy the art keyed to the AppID, prompt to restart Steam.

Validated live on the Deck: shortcut renamed protoPen→pwnDeck, all three grid
images installed, Steam picked them up. shellcheck + ruff clean; VDF
parse/serialize round-trips against the real shortcuts.vdf.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@protoquinn

protoquinn Bot commented Jun 21, 2026

Copy link
Copy Markdown

👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow.

@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

deck/steam-art.sh is rewritten to remove ImageMagick dependencies, instead copying pre-rendered hero, wide, and portrait PNGs from deck/art/ into Steam's grid directory. A new deck/steam-shortcut.py helper is introduced to parse/serialize Steam's binary VDF format and provides list, appid, and rename CLI operations used by the shell script.

Changes

Steam Grid Art Installer — Dependency-free Rewrite

Layer / File(s) Summary
steam-shortcut.py: binary VDF parser, serializer, and CLI
deck/steam-shortcut.py
Adds a standalone Python 3 script with internal _parse/_ser helpers for Steam's binary VDF format, case-insensitive shortcut lookup via _match, and a CLI with list, appid, and rename subcommands; rename writes a .bak backup before overwriting shortcuts.vdf.
steam-art.sh: pre-rendered asset copy flow
deck/steam-art.sh
Rewrites the script to validate that deck/art/{hero,wide,portrait}.png exist, stop Steam before editing, call steam-shortcut.py rename to brand the shortcut as pwnDeck/PWNDECK_NAME, resolve the AppID via steam-shortcut.py appid, copy the three PNGs into config/grid under the {appid}_hero.png, {appid}.png, {appid}p.png naming conventions, and print updated status messages.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • protoLabsAI/protoPen#271: Renames the deck/desktop/launcher branding to pwnDeck, which is the same shortcut identity that steam-shortcut.py and the updated steam-art.sh target when renaming and resolving the Steam AppID.

Suggested reviewers

  • protoquinn
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: making Steam art installation dependency-free and renaming the shortcut to pwnDeck, which are the core objectives of this PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/deck-steam-art-assets

Comment @coderabbitai help to get the list of available commands and usage tips.

@protoquinn protoquinn Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA Audit — PR #278 | feat(deck): dependency-free Steam art + pwnDeck rename

VERDICT: WARN


CI Status

  • Lint: queued
  • Verify workspace config: queued

Diff Review

  • Replaces on-device ImageMagick art generation with pre-rendered PNGs in deck/art/ — good, eliminates a runtime dependency that didn't exist on stock SteamOS
  • New deck/steam-shortcut.py — pure-Python (stdlib-only) binary VDF parser for shortcuts.vdf; handles appid resolve and rename commands
  • steam-art.sh now stops Steam before editing shortcuts.vdf to prevent clobbering, then copies art keyed to the resolved AppID

Observations

  • MEDIUM: Steam-exit race — the script loops 25s waiting for steam to exit after SIGTERM, but proceeds unconditionally after the loop. If Steam hasn't exited, it can still clobber the edited shortcuts.vdf. Add a post-loop guard: pgrep -x steam >/dev/null 2>&1 && { echo "..."; exit 1; } (steam-art.sh:53-55)
  • MEDIUM: Missing backup — PR description says "backs up shortcuts.vdf" but the diff shows no cp backup before the rename. If the VDF parser writes a malformed file, there's no recovery. Add cp "$SHORTCUTS" "$SHORTCUTS.bak" before running the rename (steam-art.sh:56)
  • LOW: Truncated diff — steam-shortcut.py cuts off mid-_ser() at 200 lines (266 total). The _ser(), appid, and rename command dispatch are not fully visible in the diff. Spot-checked the visible parser; looks correct for the three type tags (0x00/0x01/0x02 + 0x08 terminator)
  • LOW: clawpatch unavailable for this repo — structural cross-file review skipped

— Quinn, QA Engineer

@protoquinn

protoquinn Bot commented Jun 21, 2026

Copy link
Copy Markdown

Submitted COMMENT review on #278.

@protoquinn protoquinn Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI terminal-green, no blockers on prior review — auto-approving on green (#748).

@mabry1985 mabry1985 merged commit bf49add into main Jun 21, 2026
5 of 6 checks passed
@mabry1985 mabry1985 deleted the feat/deck-steam-art-assets branch June 21, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant