Stop the cell vanishing for a frame; eating glows instead of pulsing
Foundation / checks (deploy) (push) Successful in 26s
Foundation / checks (network) (push) Successful in 29s
Foundation / checks (ecs) (push) Successful in 53s
Foundation / checks (client) (push) Successful in 57s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 5m32s
Foundation / checks (tsan) (push) Canceled after 5m8s
Foundation / checks (postgres) (push) Canceled after 5m33s

Every tick the server sent each cellular session an empty view and then the owner's
real view. When the two landed in different client frames the client saw no cell:
steering stopped, the "no active cell" panel popped up, and every visible bubble
"vanished" at once and played its pop, a wave across the screen at random moments
(likelier with v11's larger views).

- Server: a session given a view this tick is no longer cleared in the same tick; the
  clear now follows every owner's view and reaches only sessions that got none.
- Client: an empty view never replaces a real one of the same tick (older servers).
- Only a bubble that was being eaten when last seen fades when it disappears; leaving
  the view or an empty view draws nothing.
- Eating is a soft glow in the bubble's colour, fading in and out about 1.5 times a
  second, instead of a size pulse; a finished bubble's glow shrinks and fades.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-17 10:56:27 -04:00
co-authored by Claude Opus 5.5
parent 43113e6c35
commit fcc6c57320
7 changed files with 65 additions and 22 deletions
+7 -2
View File
@@ -92,6 +92,8 @@ struct RegionSessions::Impl {
std::string account;
Clock::time_point deadline; // Hello, pending (Welcome due) or close flush.
bool close_requested{};
// The tick of the last owner view sent; a clear never follows it in that tick.
std::uint64_t perceived_tick{};
// Durable control (ledger only).
network::AccountId account_id;
std::uint64_t generation{};
@@ -930,13 +932,14 @@ void RegionSessions::replicate(
bool RegionSessions::send_cellular_perception(const network::AccountId& account,
const network::CellularPerception& perception) {
auto& m = *impl_;
for (const auto& c : m.connections) {
for (auto& c : m.connections) {
if (c.state != Impl::State::established ||
(c.protocol_version != network::session_protocol_v8 &&
c.protocol_version != network::session_protocol_v9 &&
!network::cellular_v10_family(c.protocol_version)) ||
c.account_id != account)
continue;
c.perceived_tick = perception.tick;
auto delivered = perception;
// v11 sees deposits (ADR-0136), earlier versions square patches; never both.
if (c.protocol_version == network::session_protocol_v11)
@@ -976,8 +979,10 @@ void RegionSessions::clear_cellular_perceptions(std::uint64_t tick) {
return;
auto& m = *impl_;
const network::CellularPerception cleared{tick, 0, {}, {}};
// Only a connection with no view this tick is cleared: a clear arriving after (or
// before) the real view of the same tick made the client drop its cell for a frame.
for (const auto& c : m.connections)
if (c.state == Impl::State::established &&
if (c.state == Impl::State::established && c.perceived_tick != tick &&
(c.protocol_version == network::session_protocol_v8 ||
c.protocol_version == network::session_protocol_v9 ||
network::cellular_v10_family(c.protocol_version)))