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.
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.cshtmlProblem
The
submitManualSelectionfunction and theselectAllTracksevent 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 callingsubmitManualSelection()whenever the job transitions tomanual_selection:If the page loads while the job is in
VideoInfo/Activeand then transitions toManualSelectionStartedvia SignalR, the button appears butsubmitManualSelectionis not defined →ReferenceErroron 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 entersManualSelectionStartedso the server-rendered controls appear.Notes
Breaks the live-update path of the new manual-selection UI.