[GH-ISSUE #1922] [Issue]: remote SillyTavern bulk import drops progress events #941

Closed
opened 2026-10-21 05:23:51 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Xelvanis on GitHub (Jun 2, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1922

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Remote SillyTavern bulk import runs to completion through /api/invoke, but it does not preserve the legacy per-item progress stream. The UI falls back to a single final done event while the import is running.

Expected behavior

Remote-runtime bulk import should preserve progress parity with embedded/legacy import, or the UI should explicitly present it as a non-streaming remote operation.

Expected remote behavior:

  • scan folder
  • choose categories
  • run import
  • receive progress events for the selected work
  • receive the final imported counts and warnings

Actual behavior

Static inspection on current origin/refactor shows:

  • src/shared/api/import-api.ts checks remoteRuntimeTarget() inside stBulkRunEvents.
  • When remote runtime is configured, it calls import_st_bulk_run, yields one { type: "done" } event, and returns.
  • The streaming Tauri channel command import_st_bulk_run_events is intentionally listed as non-remote in src-tauri/src/http_dispatch.rs.
  • The Rust bulk import implementation still supports progress events internally, but remote /api/invoke does not expose an event/SSE route for them.

Legacy /api/import/st-bulk/run returned an SSE stream and emitted progress events while import work was running.

Steps to reproduce

  1. Configure a Remote Runtime URL.
  2. Open SillyTavern bulk import.
  3. Scan and select enough items to make import progress visible.
  4. Start import.
  5. The remote path only updates when the final result returns; no per-item progress events are available.

Impact area

  • App shell, navigation, startup, or providers
  • Catalog resources
  • Chat mode
  • Roleplay mode
  • Game mode
  • Shared mode UI
  • Runtime systems: generation, world-state, visuals, tracker, or haptics
  • Professor Mari or shell tools
  • React-free engine behavior, contracts, agents, or capability ports
  • Shared API wrapper or remote runtime routing
  • Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime
  • Docs, contributor workflow, or templates

Environment

  • Branch or commit: origin/refactor at 0afe673
  • Run mode: remote runtime
  • OS + version: not captured
  • Node + pnpm versions: not relevant
  • Rust version, if relevant: not captured
  • Remote Runtime URL configured? yes
  • Provider, model, or integration, if relevant: SillyTavern bulk import

Logs, screenshots, or video

No runtime screenshot attached. Static evidence:

  • src/shared/api/import-api.ts: remote stBulkRunEvents yields only final done data.
  • src-tauri/src/http_dispatch.rs: import_st_bulk_run_events is documented as non-remote.
  • src-tauri/src/commands/storage/imports/bulk_imports.rs: bulk import emits progress and done events when an event sink exists.
  • Legacy packages/server/src/routes/import.routes.ts: /api/import/st-bulk/run used text/event-stream and sent progress events.

Regression notes

This is legacy-better UX for remote/headless imports. The data import path still exists; the gap is progress/event delivery while work is in flight.

Additional context

Suggested fix: add a dedicated remote SSE route for ST bulk import progress, or teach /api/invoke to expose command event streams safely. Keep the non-streaming final-result fallback only as a deliberate fallback with clear UI copy.

Related tracker: #1904 target 3, remote runtime parity.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Xelvanis on GitHub (Jun 2, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1922 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Remote SillyTavern bulk import runs to completion through `/api/invoke`, but it does not preserve the legacy per-item progress stream. The UI falls back to a single final `done` event while the import is running. ## Expected behavior Remote-runtime bulk import should preserve progress parity with embedded/legacy import, or the UI should explicitly present it as a non-streaming remote operation. Expected remote behavior: - scan folder - choose categories - run import - receive progress events for the selected work - receive the final imported counts and warnings ## Actual behavior Static inspection on current `origin/refactor` shows: - `src/shared/api/import-api.ts` checks `remoteRuntimeTarget()` inside `stBulkRunEvents`. - When remote runtime is configured, it calls `import_st_bulk_run`, yields one `{ type: "done" }` event, and returns. - The streaming Tauri channel command `import_st_bulk_run_events` is intentionally listed as non-remote in `src-tauri/src/http_dispatch.rs`. - The Rust bulk import implementation still supports progress events internally, but remote `/api/invoke` does not expose an event/SSE route for them. Legacy `/api/import/st-bulk/run` returned an SSE stream and emitted progress events while import work was running. ## Steps to reproduce 1. Configure a Remote Runtime URL. 2. Open SillyTavern bulk import. 3. Scan and select enough items to make import progress visible. 4. Start import. 5. The remote path only updates when the final result returns; no per-item progress events are available. ## Impact area - [ ] App shell, navigation, startup, or providers - [x] Catalog resources - [ ] Chat mode - [ ] Roleplay mode - [ ] Game mode - [ ] Shared mode UI - [ ] Runtime systems: generation, world-state, visuals, tracker, or haptics - [ ] Professor Mari or shell tools - [ ] React-free engine behavior, contracts, agents, or capability ports - [x] Shared API wrapper or remote runtime routing - [x] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime - [ ] Docs, contributor workflow, or templates ## Environment - Branch or commit: `origin/refactor` at `0afe673` - Run mode: remote runtime - OS + version: not captured - Node + pnpm versions: not relevant - Rust version, if relevant: not captured - Remote Runtime URL configured? yes - Provider, model, or integration, if relevant: SillyTavern bulk import ## Logs, screenshots, or video No runtime screenshot attached. Static evidence: - `src/shared/api/import-api.ts`: remote `stBulkRunEvents` yields only final `done` data. - `src-tauri/src/http_dispatch.rs`: `import_st_bulk_run_events` is documented as non-remote. - `src-tauri/src/commands/storage/imports/bulk_imports.rs`: bulk import emits `progress` and `done` events when an event sink exists. - Legacy `packages/server/src/routes/import.routes.ts`: `/api/import/st-bulk/run` used `text/event-stream` and sent progress events. ## Regression notes This is legacy-better UX for remote/headless imports. The data import path still exists; the gap is progress/event delivery while work is in flight. ## Additional context Suggested fix: add a dedicated remote SSE route for ST bulk import progress, or teach `/api/invoke` to expose command event streams safely. Keep the non-streaming final-result fallback only as a deliberate fallback with clear UI copy. Related tracker: #1904 target 3, remote runtime parity. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:23:51 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Jun 2, 2026):

Fixed on refactor in a4ba3c90: remote SillyTavern bulk import now uses a dedicated privileged SSE route at /api/import/st-bulk/run, and the shared import API consumes streamed progress/done/error events instead of yielding only a final done result. Verification passed: typecheck, architecture, docs, build, cargo check, diff check.

<!-- gh-comment-id:4601639283 --> @SpicyMarinara commented on GitHub (Jun 2, 2026): Fixed on refactor in a4ba3c90: remote SillyTavern bulk import now uses a dedicated privileged SSE route at /api/import/st-bulk/run, and the shared import API consumes streamed progress/done/error events instead of yielding only a final done result. Verification passed: typecheck, architecture, docs, build, cargo check, diff check.
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#941
No description provided.