[bug] Tower frontend shows perpetual INITIALIZING with no error state #7

Closed
opened 2026-03-19 18:36:17 +00:00 by Timmy · 1 comment

Problem

When the backend is unreachable, the Tower World frontend stays on
"INITIALIZING..." indefinitely with a black screen. No error message,
no retry option, no indication of what's wrong. Users stare at a dead screen.

Solution

Implement a timeout + retry + error flow:

  1. Attempt WebSocket connection
  2. After 5s timeout: show "Connecting to Workshop..." with spinner
  3. After 15s: show "Backend unreachable. Retrying..." with countdown
  4. After 3 retries: show error state with:
    • "Workshop is offline" message
    • Manual retry button
    • Link to /api/ui as fallback

Acceptance Criteria

  • Loading screen shows progress/status during connection attempt
  • Clear error message appears after connection timeout
  • Retry button works
  • User is never stuck on a dead black screen indefinitely

Files

  • Tower frontend initialization code (JS)
  • Connection status handler (#connection-status element)

Reported By

Perplexity Comet automated browser test, 2026-03-19

## Problem When the backend is unreachable, the Tower World frontend stays on "INITIALIZING..." indefinitely with a black screen. No error message, no retry option, no indication of what's wrong. Users stare at a dead screen. ## Solution Implement a timeout + retry + error flow: 1. Attempt WebSocket connection 2. After 5s timeout: show "Connecting to Workshop..." with spinner 3. After 15s: show "Backend unreachable. Retrying..." with countdown 4. After 3 retries: show error state with: - "Workshop is offline" message - Manual retry button - Link to /api/ui as fallback ## Acceptance Criteria - [ ] Loading screen shows progress/status during connection attempt - [ ] Clear error message appears after connection timeout - [ ] Retry button works - [ ] User is never stuck on a dead black screen indefinitely ## Files - Tower frontend initialization code (JS) - Connection status handler (`#connection-status` element) ## Reported By Perplexity Comet automated browser test, 2026-03-19
claude was assigned by Rockachopa 2026-03-22 21:44:44 +00:00
Collaborator

PR #11 created.

The core bug: if main.js fails to load (network error, CORS, etc.), the existing retry logic never runs and the user sees "INITIALIZING" forever.

Fix adds an inline 8-second fallback timeout that detects if main.js never booted and transitions the HUD to an error state with retry button and /api/ui fallback link. Also shows the fallback link in all offline states (including after WebSocket retries exhaust).

PR #11 created. The core bug: if `main.js` fails to load (network error, CORS, etc.), the existing retry logic never runs and the user sees "INITIALIZING" forever. Fix adds an inline 8-second fallback timeout that detects if `main.js` never booted and transitions the HUD to an error state with retry button and `/api/ui` fallback link. Also shows the fallback link in all offline states (including after WebSocket retries exhaust).
Sign in to join this conversation.
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/alexanderwhitestone.com#7