mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 04:49:41 -05:00
The client board cache (imports/lib/dataCache.js) re-fetches its value inside a reactive computation. When the board doc is briefly absent from minimongo (a subscription stops and restarts, momentarily removing the doc), the empty value was surfaced immediately, flashing the "Board not found" shell — and on WebKit throwing a Blaze "Can't select in removed DomRange" error tearing down the card view. It self-recovers when the doc is re-delivered, so it presents as a flicker, reliably hit only on Firefox/WebKit timing (which is why it surfaced as browser-specific Playwright failures in 14-voting-watchers and 24-feature-issues). Fixed with an opt-in stale-while-revalidate mode on DataCache, enabled only for getBoard: a transient miss over an already-cached board keeps the last value and re-checks after a short delay, surfacing an empty result only if the board is still gone then (a genuine deletion / access loss). First-ever loads and caches that did not opt in are unchanged. Core decision extracted to the pure shouldDeferCacheMiss helper with unit tests. Also hardens the related Playwright specs: a retry in CardPage.openActionsMenu, a longer visibility budget for the WebKit slow card-render in spec 16, and removes a reload race in the move-list-right spec (moveListBy fires two un-awaited updateListSort calls, so an immediate reload read a half-applied order).