feat(webui): add engine routes for Saves/Screenshots/Videos/Processes/Power/Users/SMP#186
Open
Twice6804 wants to merge 1 commit into
Open
feat(webui): add engine routes for Saves/Screenshots/Videos/Processes/Power/Users/SMP#186Twice6804 wants to merge 1 commit into
Twice6804 wants to merge 1 commit into
Conversation
…/Power/Users/SMP Phase 2 of browser-accessible ps5upload: thin axum handlers for the PS5-side screens whose Tauri commands previously called ps5upload-core in-process with no HTTP equivalent. Each new route is a direct spawn_blocking wrapper over the existing core function, mirroring the pattern already used by every other GET/POST handler in the engine. - GET /api/ps5/saves/list, /api/ps5/screenshots/list, /api/ps5/videos/list - GET /api/ps5/process/list, POST /api/ps5/process/kill - POST /api/ps5/power/control, GET /api/ps5/power/telemetry - GET /api/ps5/users/list - GET /api/ps5/smp/status The ShadowMount+ status snapshot logic (previously Tauri-crate-local) moved to ps5upload-core::smp so both the desktop command and the new engine route share one implementation instead of two copies drifting apart; the Tauri command is now a 3-line delegation. browserInvoke.ts gained matching cases for saves_list, screenshots_list, videos_list, process_list_get, process_kill_pid, power_reboot/shutdown/ standby/tick, power_telemetry_get, user_list_get, and smp_status. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
22 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Phase 2 of browser-accessible ps5upload (#151, follow-up to #171): thin
axum handlers for the PS5-side screens whose Tauri commands previously
called
ps5upload-corein-process with no HTTP equivalent, so thebrowser web UI can drive Saves, Screenshots, Videos, Processes, Power
control/telemetry, and the SMP panel too.
Type of Change
Changes Made
engine/crates/ps5upload-engine/src/lib.rs: 9 new routes, each a directspawn_blockingwrapper over an existingps5upload-corefunction, following the exact pattern used by every other handler in the file:GET /api/ps5/saves/list,GET /api/ps5/screenshots/list,GET /api/ps5/videos/listGET /api/ps5/process/list,POST /api/ps5/process/killPOST /api/ps5/power/control,GET /api/ps5/power/telemetryGET /api/ps5/users/listGET /api/ps5/smp/statusengine/crates/ps5upload-core/src/smp.rs(new): moved the ShadowMount+ status-snapshot logic out of the Tauri shell into core, so both the desktop command and the new engine route share one implementation instead of drifting into two copies.client/src-tauri/src/commands/smp.rsis now a 3-line delegation tops5upload_core::smp::collect_status.client/src/lib/browserInvoke.ts: matching cases forsaves_list,screenshots_list,videos_list,process_list_get,process_kill_pid,power_reboot/power_shutdown/power_standby/power_tick,power_telemetry_get,user_list_get,smp_status.Note:
/api/ps5/process/list(process_mgr's detailed pid/name/title_id/memory/kind view with kill support) is intentionally distinct from the existing/api/ps5/proc/list(hw's lightweight PROC_LIST snapshot) — different core function, different struct shape.Documentation Updates
Did you update the documentation? [ ] Yes [x] No
If no documentation updates: same reasoning as #171 — the self-hosted README section covering
Dockerfile.webui+PS5UPLOAD_ALLOW_IPis planned once capability gating (hiding native-only affordances like local file pickers/save-to-USB in the browser) lands, so the docs describe one complete browser experience rather than piecemeal per-PR notes.Testing
npm run validateequivalent:typecheck,lint, full Vitest suite (72 files / 782 tests) — all green.npm run coveragecargo build/cargo build --features webui/cargo test --workspace/cargo fmt --check/cargo clippy(all clean), then started the engine locally and curled all 9 new routes: confirmed correct request parsing, 502 on unreachable PS5, 422 on a missing required field, 400 on an invalid power action, and that SMP status never hard-fails (per-probe errors land in theerrors[]array as designed).ps5upload-core, and that/api/ps5/process/listdoesn't collide with the pre-existing/api/ps5/proc/list.Checklist
Additional Notes
Couldn't compile the Tauri desktop shell locally (missing system GTK/WebKit dev libraries, no sudo access in this environment) to verify
client/src-tauri/src/commands/smp.rsdirectly — it's a 3-line delegation matching the exact error-conversion pattern used by every sibling command in the same file (saves_screenshots.rs,process_mgr.rs,system_power.rs), and the underlyingps5upload_core::smp::collect_statusit calls is fully compiled and tested via the engine crate.Remaining before the browser web UI is "complete": capability gating (hide host-filesystem-only features — local pickers, save-to-USB archive zip/unzip, payload send from a local file — when
!isTauriEnv()) and the README self-hosted docs section.🤖 Generated with Claude Code