Commit Graph
15 Commits
Author SHA1 Message Date
adrianbonpin c974699024 feat: add TDP to quick stats + open-on-DeckyVault button 2026-07-13 06:20:30 +08:00
adrianbonpin bfd36ad632 fix: address final review — 404 error field, aggregate estFps, recent entries, panel props 2026-07-13 05:30:17 +08:00
adrianbonpin 5b107bddf7 fix(api): align /devices version scope, add Vary header, add validation + tests 2026-07-13 05:07:51 +08:00
adrianbonpin 0ad133492b feat(api): public plugin game-lookup endpoint for library panel 2026-07-13 05:03:26 +08:00
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 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 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