Skip to content

fix: remove the 750ms LiveView latency simulator in dev - #3985

Closed
chasers wants to merge 3 commits into
fix/load-more-reviewfrom
fix/remove-dev-latency-sim
Closed

chasers wants to merge 3 commits into
fix/load-more-reviewfrom
fix/remove-dev-latency-sim

Conversation

@chasers

@chasers chasers commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Stack 9/9 — "Load more" pagination fixes.

  • Problem: dev holds back every LiveView message by 750 ms. The "Load more" spinner and every click feel slow.
  • Cause: the dev root layout calls liveSocket.enableLatencySim(750) on each page load.
  • Fix: remove that script. Same change as fix: remove the hardcoded 750ms LiveView latency simulator in dev #3901.
  • After merge: the value stays in sessionStorage. Run liveSocket.disableLatencySim() once in the browser console, or open a new tab.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YBPF1knvgfghTSdxuYryGL

chasers and others added 3 commits September 2, 2026 07:09
The dev root layout called `liveSocket.enableLatencySim(750)` on every page.
LiveView then delayed every client message by 750ms through `setTimeout`, so
each interaction felt slow. Selecting a backend type renders in 0.5ms on the
server, but took 750ms in the browser.

`enableLatencySim` also turns on debug mode, which logs every event to the
console.

A developer who wants the simulator can still call
`liveSocket.enableLatencySim(750)` from the console.

Note: the setting persists in sessionStorage. Run `liveSocket.disableLatencySim()`
once, or open a new tab, to clear an existing value.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015XJWSbFFxwiYB25iUAGmXc
@chasers

chasers commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Opened by mistake: this reused the head branch of #3901. The latency simulator removal goes into the stack on its own branch instead.

@chasers chasers closed this Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants