[PR #1376] [MERGED] Fix remote runtime local command classification #5048

Closed
opened 2026-10-22 04:12:46 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1376
Author: @ghost
Created: 5/27/2026
Status: ✅ Merged
Merged: 5/27/2026
Merged by: @undefined

Base: refactor ← Head: fix/remote-runtime-local-command-classification


📝 Commits (1)

  • cc60b0a Fix remote runtime local command classification

📊 Changes

15 files changed (+105 additions, -43 deletions)

View changed files

📝 src-tauri/src/commands/storage/fonts.rs (+11 -1)
📝 src-tauri/src/http_dispatch.rs (+15 -16)
📝 src-tauri/src/http_server.rs (+6 -1)
📝 src/app/App.tsx (+2 -2)
📝 src/features/modes/game-assets/components/AssetGrid.tsx (+3 -3)
📝 src/features/modes/game-assets/components/GameAssetsBrowserView.tsx (+2 -2)
📝 src/features/modes/game-assets/components/ImagePreviewModal.tsx (+2 -2)
📝 src/features/shell/imports/components/STBulkImportModal.tsx (+15 -0)
📝 src/features/shell/settings/components/ProfileImportSection.tsx (+4 -0)
📝 src/features/shell/settings/components/SettingsPanel.tsx (+10 -5)
📝 src/shared/api/import-api.ts (+6 -0)
📝 src/shared/api/integration-utility-api.ts (+9 -2)
📝 src/shared/api/local-file-api.ts (+10 -1)
📝 src/shared/api/profile-api.ts (+9 -0)
📝 src/shared/api/remote-runtime.ts (+1 -8)

📄 Description

Linked issue

Closes #1375

Why this change

The hostable command parity merge made command-count parity equal to remote-capability parity. That left a few workflows split between local Tauri state and the remote runtime, or routed user-machine/device work to the server host.

What changed

  • Reclassified non-remote commands in the parity test instead of treating only five desktop commands as desktop-only.
  • Removed local-path profile import and haptic device commands from the remote /api/invoke allowlist/dispatch.
  • Added remote spotify_authorize dispatch so Spotify pending auth state is created on the same runtime that handles exchange/status; the client opens the returned auth URL when Remote Runtime is configured.
  • Prevented profile import from a local file path while Remote Runtime is configured, instead of silently importing into local storage.
  • Made SillyTavern bulk import avoid the local Tauri IPC event channel in remote mode and use the remote JSON run path.
  • Made the ST bulk folder browser use the runtime-host directory browser when Remote Runtime is configured.
  • Added hostable font asset serving and updated custom font/background/game-asset previews/downloads to use managed remote asset URLs instead of server absolute filesystem paths.

Refactor impact

Primary owner:

Shared API / remote runtime / Rust HTTP dispatch.

Impact areas reviewed:

  • Shared API wrapper and remote runtime routing
  • Tauri/Rust HTTP dispatch and managed asset serving
  • Shell imports/settings workflows
  • Spotify authorization workflow
  • Haptics local-device ownership
  • Game asset/background/font URL resolution

Boundary notes:

  • Haptic commands intentionally stay app-local because they control user-machine devices.
  • profile_import_file intentionally stays out of remote dispatch because it accepts a local filesystem path; remote profile file upload/import is separate follow-up scope.
  • import_st_bulk_run_events remains Tauri IPC-channel-only; remote mode uses the existing JSON run path without progress events.

Validation

  • pnpm typecheck passes locally
  • pnpm build passes locally
  • pnpm check:architecture passes locally
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace passes locally
  • cargo test --manifest-path src-tauri/Cargo.toml --workspace remote_runtime_command_surfaces_match_desktop_minus_documented_non_remote_commands passes locally
  • Browser or Tauri app manual verification completed
  • Remote runtime smoke checked when relevant

UI evidence

N/A; routing/asset URL behavior fix with no visual redesign.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/1376 **Author:** [@ghost](https://github.com/ghost) **Created:** 5/27/2026 **Status:** ✅ Merged **Merged:** 5/27/2026 **Merged by:** [@undefined](undefined) **Base:** `refactor` ← **Head:** `fix/remote-runtime-local-command-classification` --- ### 📝 Commits (1) - [`cc60b0a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/cc60b0a536cccebd401a3367dbb1f6bc6efb5289) Fix remote runtime local command classification ### 📊 Changes **15 files changed** (+105 additions, -43 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/src/commands/storage/fonts.rs` (+11 -1) 📝 `src-tauri/src/http_dispatch.rs` (+15 -16) 📝 `src-tauri/src/http_server.rs` (+6 -1) 📝 `src/app/App.tsx` (+2 -2) 📝 `src/features/modes/game-assets/components/AssetGrid.tsx` (+3 -3) 📝 `src/features/modes/game-assets/components/GameAssetsBrowserView.tsx` (+2 -2) 📝 `src/features/modes/game-assets/components/ImagePreviewModal.tsx` (+2 -2) 📝 `src/features/shell/imports/components/STBulkImportModal.tsx` (+15 -0) 📝 `src/features/shell/settings/components/ProfileImportSection.tsx` (+4 -0) 📝 `src/features/shell/settings/components/SettingsPanel.tsx` (+10 -5) 📝 `src/shared/api/import-api.ts` (+6 -0) 📝 `src/shared/api/integration-utility-api.ts` (+9 -2) 📝 `src/shared/api/local-file-api.ts` (+10 -1) 📝 `src/shared/api/profile-api.ts` (+9 -0) 📝 `src/shared/api/remote-runtime.ts` (+1 -8) </details> ### 📄 Description <!-- Target branch: `refactor`. Change the base to `refactor` before submitting unless a maintainer explicitly asked for another base. --> <!-- Keep all checkboxes unchecked until a human has actually verified them. --> ## Linked issue Closes #1375 ## Why this change The hostable command parity merge made command-count parity equal to remote-capability parity. That left a few workflows split between local Tauri state and the remote runtime, or routed user-machine/device work to the server host. ## What changed - Reclassified non-remote commands in the parity test instead of treating only five desktop commands as desktop-only. - Removed local-path profile import and haptic device commands from the remote `/api/invoke` allowlist/dispatch. - Added remote `spotify_authorize` dispatch so Spotify pending auth state is created on the same runtime that handles exchange/status; the client opens the returned auth URL when Remote Runtime is configured. - Prevented profile import from a local file path while Remote Runtime is configured, instead of silently importing into local storage. - Made SillyTavern bulk import avoid the local Tauri IPC event channel in remote mode and use the remote JSON run path. - Made the ST bulk folder browser use the runtime-host directory browser when Remote Runtime is configured. - Added hostable font asset serving and updated custom font/background/game-asset previews/downloads to use managed remote asset URLs instead of server absolute filesystem paths. ## Refactor impact Primary owner: Shared API / remote runtime / Rust HTTP dispatch. Impact areas reviewed: - Shared API wrapper and remote runtime routing - Tauri/Rust HTTP dispatch and managed asset serving - Shell imports/settings workflows - Spotify authorization workflow - Haptics local-device ownership - Game asset/background/font URL resolution Boundary notes: - Haptic commands intentionally stay app-local because they control user-machine devices. - `profile_import_file` intentionally stays out of remote dispatch because it accepts a local filesystem path; remote profile file upload/import is separate follow-up scope. - `import_st_bulk_run_events` remains Tauri IPC-channel-only; remote mode uses the existing JSON run path without progress events. ## Validation - [x] `pnpm typecheck` passes locally - [x] `pnpm build` passes locally - [x] `pnpm check:architecture` passes locally - [x] `cargo check --manifest-path src-tauri/Cargo.toml --workspace` passes locally - [x] `cargo test --manifest-path src-tauri/Cargo.toml --workspace remote_runtime_command_surfaces_match_desktop_minus_documented_non_remote_commands` passes locally - [ ] Browser or Tauri app manual verification completed - [ ] Remote runtime smoke checked when relevant ## UI evidence N/A; routing/asset URL behavior fix with no visual redesign. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:12:46 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#5048
No description provided.