Use web sockets

Use web sockets in JavaScript — with the four heights of help laid out: do it now, make it easier for the next person to accept, work out the right move when you are stuck, and learn the pattern so it stops coming back.

4prompt heights
Open it in the interactive atlas →

The four heights

The same task, four distances: today's deadline, the next reviewer, the stuck moment, the pattern.

Execute — do the immediate task

+
The dashboard needs live updates for order status before the stakeholder demo on Friday. Implement…
The dashboard needs live updates for order status before the stakeholder demo on Friday. Implement a WebSocket connection that subscribes to order updates for the current user, update the UI when messages arrive without reloading the page, and reconnect automatically with exponential backoff if the socket drops. Log connection state transitions to the console for debugging.

Improve — make it easier to accept

+
Before I hand the real-time code to the frontend lead, make it easy to evaluate: place the…
Before I hand the real-time code to the frontend lead, make it easy to evaluate: place the subscription code near the component lifecycle methods, surface the last message timestamp and connection state in a small status badge, document the message schema up top, and flag any cases where UI updates could cause duplicate list items or stale focus.

Decide — diagnose the stuck moment

+
Users reported that after network blips the order list shows older statuses and sometimes…

Clients see stale data after a reconnect.

Users reported that after network blips the order list shows older statuses and sometimes duplicates. I implemented automatic reconnect with backoff, but I’m not sure whether the server resends missed events or whether my client replays cached messages. I can’t inspect the raw socket stream in production. What should I check first to diagnose whether duplicates come from server replay or client-side re-apply, and what’s the fastest safe mitigation to prevent duplicate UI entries?

Become — change the pattern

+
Over several sprints we keep patching WebSocket reconnection bugs: duplicates after reconnect, lost…

Real-time features keep breaking under poor networks.

Over several sprints we keep patching WebSocket reconnection bugs: duplicates after reconnect, lost subscriptions when tabs sleep, and memory leaks from forgotten listeners. We waste time debugging similar reconnection edge cases. What two patterns or small abstractions should we adopt so future real-time features are reliable and easier to reason about?

Next to this one

Other programming language work people do in JavaScript.

Every task here came from the work, not from a feature list — which is why the prompts name what you want done and never the button that does it. The tool changes; the work does not.
Copyright © LLOS.ai · 2026 — original pedagogy, voice, and design — all rights reserved.

The rest of the map

Same library, five ways in.