[High] requestNewAttempt failures are silently swallowed in language-runner #61

Closed
opened 2026-05-05 04:15:33 +00:00 by spikerj · 1 comment
Owner

Severity: High (UX)

File: spikersoft-angular/libraries/tools/src/components/language-runner/language-runner.ts (~1135-1138)

Problem: When requestNewAttempt() fails, only console.error runs. UI may leave a stale attempt token or show a misleading empty state. Users have no visible signal of the problem and no retry affordance.

Fix: Set submissionStatusSignal (or equivalent UI state) to a recoverable error state from the catch block; surface a retry button or toast.

Acceptance criteria:

  • Network failure during requestNewAttempt shows error to user
  • User can retry without page refresh
  • No silent state corruption
**Severity:** High (UX) **File:** `spikersoft-angular/libraries/tools/src/components/language-runner/language-runner.ts` (~1135-1138) **Problem:** When `requestNewAttempt()` fails, only `console.error` runs. UI may leave a stale attempt token or show a misleading empty state. Users have no visible signal of the problem and no retry affordance. **Fix:** Set `submissionStatusSignal` (or equivalent UI state) to a recoverable error state from the catch block; surface a retry button or toast. **Acceptance criteria:** - [ ] Network failure during requestNewAttempt shows error to user - [ ] User can retry without page refresh - [ ] No silent state corruption
Author
Owner

Resolved.

Added attemptErrorSignal to LanguageRunner. requestNewAttempt clears it on entry and sets it to a human-readable message in the catch block. Added retryAttempt() method bound to a new error banner in the template that renders an inline alert with a Retry button when the signal is set. Styled in csharp-runner.scss with .attempt-error (themed via existing CSS variables).

Files changed:

  • spikersoft-angular/libraries/tools/src/components/language-runner/language-runner.ts
  • spikersoft-angular/libraries/tools/src/components/language-runner/language-runner.html
  • spikersoft-angular/libraries/tools/src/components/csharp-runner/csharp-runner.scss
**Resolved.** Added `attemptErrorSignal` to `LanguageRunner`. `requestNewAttempt` clears it on entry and sets it to a human-readable message in the catch block. Added `retryAttempt()` method bound to a new error banner in the template that renders an inline alert with a Retry button when the signal is set. Styled in `csharp-runner.scss` with `.attempt-error` (themed via existing CSS variables). Files changed: - `spikersoft-angular/libraries/tools/src/components/language-runner/language-runner.ts` - `spikersoft-angular/libraries/tools/src/components/language-runner/language-runner.html` - `spikersoft-angular/libraries/tools/src/components/csharp-runner/csharp-runner.scss`
Sign in to join this conversation.