Skip to content

Medium: submitManualSelection() is undefined in the SignalR live-update path — broken Continue Rip button #172

Description

@negativeeddy

submitManualSelection() is undefined in the SignalR live-update path — broken "Continue Rip" button

Source: Code review (automated)
Date: 2026-09-02
Scope: Recent changes (Manual Selection rip mode, PR #144)
File(s): src/ArmRipper.WebUi/Views/Jobs/JobDetail.cshtml

Problem

The submitManualSelection function and the selectAllTracks event listener are only emitted inside @if (Model.Status is JobState.ManualSelectionStarted), i.e. only when the page initially renders in that state. But the SignalR live-update handler (always rendered) injects a "Continue Rip" button calling submitManualSelection() whenever the job transitions to manual_selection:

if (isManualSelection) {
    actionsDd.innerHTML = '...onclick="submitManualSelection()"...';
}

If the page loads while the job is in VideoInfo/Active and then transitions to ManualSelectionStarted via SignalR, the button appears but submitManualSelection is not defined → ReferenceError on click. The track checkboxes and select-all checkbox are also server-rendered only, so the live-update path shows a Continue button with no way to select tracks.

Proposed Fix

Always define submitManualSelection (and the select-all handler) in the script, or trigger a full page reload when the job enters ManualSelectionStarted so the server-rendered controls appear.

Notes

Breaks the live-update path of the new manual-selection UI.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions