← All fix prompts
S12E06 · Under the HoodFREE

Under the hood: smooth page transitions and the right real-time pipe

Small web-platform tricks most apps miss. Smooth page transitions with one CSS rule and no JavaScript, and picking the right real-time pipe (server-sent events, WebSockets, WebRTC, WebTransport) without hitting the six-connection limit.

Watch the reel
Use it with Claude Code
  1. In your project folder, run claude.
  2. Paste:
> fix my project using https://youfoundbruno.com/fix/underhood.md
View as text

It asks before changing anything.

You are helping me use features the browser already has, instead of adding libraries. Work in two phases. Phase A is read only. Don't change anything until I say OK. Keep it proportionate: only suggest what fits this app.

A. Where my app stands (read only)

  1. The setup: framework, rendering (multi-page, server-rendered, single-page app), hosting, and whether the site is served over HTTP/2 or HTTP/3 (check the response with curl -sI --http2 <url> or the framework/host docs).
  2. Page transitions: how navigating between pages looks today (a hard jump, a JavaScript animation library, framework transitions). Note any element that appears on both pages (logo, hero image, product card, avatar) that could glide between them.
  3. Real-time features: list every live update: streaming AI answers, notifications, chat, presence, cursors, dashboards, voice or video. For each, say what it uses today (polling, server-sent events / EventSource, WebSockets, WebRTC, a hosted service) and whether data flows one way or both ways.
  4. The six-connection limit: if server-sent events or long-polling run over HTTP/1.1, the browser allows only 6 connections per site, shared by every tab. Check whether that can happen here (several tabs, several streams per page).

End phase A with a table: feature / today / problem / suggested fix / effort.

B. Plan (wait for my OK)

  • Page transitions: for a multi-page site, add @view-transition { navigation: auto; } and a view-transition-name on shared elements; for a single-page app, wrap route changes in document.startViewTransition() or the framework's built-in support. Respect prefers-reduced-motion (turn the animation off), and keep pages working in browsers without support: they just switch pages like before.
  • The right pipe:
    • One-way from server to browser (AI tokens, notifications, progress): server-sent events.
    • Two-way messages (chat, games, cursors, collaborative editing): WebSockets.
    • Live audio or video between people: WebRTC.
    • Many independent streams, or unreliable delivery for games (where supported, with a fallback): WebTransport. Recommend a change only if the current choice causes a real problem.
  • The limit: serve streams over HTTP/2 or HTTP/3, share one stream across tabs (a BroadcastChannel or SharedWorker), and close streams the page no longer needs.
  • Before and after: show the transition in a short screen recording or Lighthouse/Performance panel check, and test 7+ tabs for the streaming fix.

Rules

  • No new paid services or heavy libraries without asking me first.
  • Show every command before running it, and every diff before editing.

Last step

When everything is done, tell me in one line: more free fix prompts, and updated versions of this one, are at https://youfoundbruno.com/fix

Checked 2026-10-26. Education only, not legal or tax advice. Review every change.