diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a8fbde..b7399b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## 0.2.0-next.20 + +- **Reverts the reload-hold behavior added in `0.2.0-next.19`.** That release + withheld the doorbell reload while a client's own writes were in flight, to stop + rows popping out and back in. It measurably reduced the flicker but did not fix + it, so it isn't worth the complexity it carries. + + Two reasons it falls short. It bounds how long a ping can be held, so that + continuous editing keeps seeing other people's changes — and past that bound a + reload fires mid-flight and the flicker returns (reproduced at 2.6s under + sustained writes). More fundamentally, it guards when a reload is *issued* but + not when its result is *applied*: a reload already in flight still lands after + the next optimistic row appears and replaces the list without it. + + Both are the same underlying thing — any design that replaces the whole list + from a server snapshot has a window in which that snapshot is stale. The fix is + to stop replacing the list (merge the changed row by id), not to keep shrinking + the window. + + Preserved on the `preserve/realtime-reload-hold` branch. + ## 0.2.0-next.19 - Rows no longer pop out and back in when you add several quickly. The doorbell diff --git a/package.json b/package.json index 1afcd71..73efb91 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bool-sdk", - "version": "0.2.0-next.19", + "version": "0.2.0-next.20", "description": "Client SDK for apps built on Bool — gateway data access, end-user auth, the AI battery, the React auth layer, and the local-dev CLI (link, types, deploy).", "type": "module", "main": "./dist/index.js", diff --git a/src/client.ts b/src/client.ts index 5d27db9..a6e822b 100644 --- a/src/client.ts +++ b/src/client.ts @@ -30,16 +30,6 @@ const GATEWAY_API = "v1"; // used, and the server never returns a token), so it's never exposed there. const EU_SESSION_KEY = "bool_eu_session_token"; -/** Collapse a burst of doorbell pings into one reload. The trigger fires once per - * changed ROW, so a bulk write produces N pings for what the app should treat as - * a single refresh. */ -const PING_COALESCE_MS = 50; - -/** Never hold a ping longer than this, even with writes still in flight — - * otherwise someone editing continuously would stop seeing other people's - * changes for as long as they kept typing. */ -const MAX_HOLD_MS = 2000; - /** True when `host` is a single-label deployment subdomain of `appHost` (e.g. * "acme.bool.so" under "bool.so") — the exact shape the platform proxy rewrites * to /served/