Commit Graph
13 Commits
Author SHA1 Message Date
adrianbonpin bf33f8735d fix(api): raise FPS caps to 1000 and validate FPS before game lookup 2026-07-13 04:35:24 +08:00
adrianbonpin c3215d9766 fix(api): replace raw = ANY() SQL with Drizzle inArray()
The sql template literal '= ANY()' was causing 500 errors during
screenshot deletion in the PATCH edit endpoint. Replaced all 3 occurrences
with Drizzle's native inArray() which safely handles array parameters,
including empty arrays.
2026-06-29 00:49:41 +08:00
adrianbonpin 60266ad9c9 fix(api): filter empty/invalid screenshot IDs before ANY query
The PATCH /api/performance/:id/edit endpoint was passing raw
removedScreenshotIds from the client to an = ANY() SQL clause.
Empty strings or invalid values would crash the query. Added a filter
to ensure only non-empty string IDs are used.
2026-06-29 00:46:45 +08:00
adrianbonpin 868faafb4d fix(plugin): screenshot limit, version/build fields, delete button, workspace scripts
- list_screenshots: bump limit 12 → 50 so users can scroll further back
- Add versionString + buildId to DeckyVaultImportV1, SessionData, and
  buildImportPayload. Import endpoint now saves them on new game versions.
- Screenshot delete button in preset detail modal: owner/admin sees a
  trash icon on hover that calls DELETE /api/performance/:id/screenshots/:sid
- Root workspace scripts for plugin workflow:
  bun run plugin:build  | plugin:zip | plugin:release | plugin:deploy
- Add deploy.sh (SSH scripts to push plugin to Deck)
2026-06-29 00:33:20 +08:00
adrianbonpin 59ecb4e4a6 feat(plugin page): robust SEO + sitemap inclusion
- Richer metadata: 14 targeted keywords, explicit robots directives
  (index/follow + googleBot max-image-preview), full OpenGraph with OG
  image, twitter summary_large_image, authors/creator/publisher fields
- 3 JSON-LD blocks: SoftwareApplication (version, downloadUrl, featureList,
  screenshot), FAQPage (4 install/usage Q&As), BreadcrumbList
- Add /plugin to STATIC_PAGES sitemap (monthly, priority 0.7)
- Update sitemap tests: static count 7→8, assert /plugin present
- All 25 sitemap tests pass
2026-06-29 00:10:07 +08:00
adrianbonpin b416f49e3d feat(plugin): attach Steam Deck screenshots to performance submissions
The plugin can now attach up to 2 Steam Deck screenshots (Steam + R1)
to a performance entry, uploaded together in one Submit tap.

Backend:
- Screenshot upload/delete endpoints now accept API key auth via
  requireRoleWithApiKeyFallback (was session-only), so the plugin's
  x-api-key header works. The 2-screenshot limit was already enforced
  server-side (MAX_SCREENSHOTS_PER_ENTRY = 2).

Plugin Python (main.py):
- list_screenshots(): scans ~/Pictures/Screenshots/ + Steam Client/
  subfolder, skips the most_recent.jpg duplicate, returns recent shots
- upload_screenshots(): hard-caps at 2, builds multipart/form-data with
  urllib, posts to /api/performance/:id/screenshots

Plugin UI (session-form.tsx):
- New Screenshots section (max 2) with a picker listing recent Steam
  screenshots (time + size), selected shots as removable rows
- Submit flow: upload entry → get entry ID → upload selected screenshots
  → combined success message (partial-success if screenshots fail)
2026-06-29 00:10:01 +08:00
adrianbonpin 4958220c55 feat: add /plugin docs page + TDP peripheral overhead
Plugin docs page (/plugin):
- Hero, feature grid, numbered install guide, screenshot gallery, install CTA
- Navbar 'Plugin' link added
- Screenshot slots with placeholders for 6 captures (flip HAS_SCREENSHOT
  once PNGs are dropped into /public/plugin/)
- Structured data (SoftwareApplication) + breadcrumbs

TDP fix:
- Add 3W fixed overhead to CPU+GPU power for screen/fan/speakers/peripherals
  so reported TDP is closer to total system power draw
2026-06-28 22:49:13 +08:00
adrianbonpin 3ed0ee3128 fix: API key test now actually verifies the key against a real auth endpoint
The old test hit /api/games/lookup which is a public endpoint with no auth,
so it never checked the key — any key (or a deleted one) reported as valid.

- Add GET /api/plugin/verify-key endpoint that uses authenticateWithApiKey
  to properly verify the x-api-key header via Better Auth
- Plugin test_api_key now calls /api/plugin/verify-key instead of games-lookup
- Returns the linked user's name + avatar on success for richer feedback
2026-06-28 22:22:47 +08:00
adrianbonpin 1de08ed4ec feat: QR code phone pairing for Decky plugin + MangoHud guide revision + SteamOS version fix
- Add plugin_pairings table + migration (0028) for short-lived pairing sessions
- Add pairing API: POST /api/plugin/pair/initiate, GET /status/:token, POST /confirm
- Add /pair web page: user scans QR on phone, confirms, API key auto-created
- Plugin: 'Pair with Phone' button renders QR code (qrcode.react), polls for status, saves API key
- Plugin: new initiate_pair + check_pair_status Python RPCs
- Revise MangoHud Setup Guide into clean numbered steps
- Fix SteamOS version detection: read VERSION_ID + BUILD_ID (was just 'SteamOS')
2026-06-28 22:09:39 +08:00
adrianbonpin dedc756dde fix(api): remove settingsJson IS NOT NULL filter so entries without in-game settings show up 2026-06-28 21:34:14 +08:00
adrianbonpin 4b7efd3c5c fix: accept steamAppId=0 in games lookup, treat 400 as valid key in plugin test 2026-06-28 17:36:32 +08:00
adrianbonpin 6cb407acaa merge: convert to bun workspaces monorepo 2026-06-28 05:31:30 +08:00
adrianbonpin cd72b7a948 refactor: convert to bun workspaces monorepo
- Move web app into apps/web/
- Create packages/shared/ with shared types
- Create plugins/decky-vault/ scaffold
- Root package.json manages workspaces only
2026-06-28 05:20:28 +08:00