fix #2: header pill refreshes itself after swipes, undo and new batches
loadStats() only ran once at boot, so the live/fresh/new pill (and the list sub-line) went stale until a full reload. Refresh it, debounced and fire-and-forget, after any decision change, when a new batch lands, and on app foreground. Adds two fe_walk_v11 regression checks + a UI-SPEC note.
This commit is contained in:
@@ -544,6 +544,33 @@ def walk_rich():
|
||||
and ('%d fresh' % stats['fresh']) in pill_txt,
|
||||
'item 7: pill reads live + fresh (%s)' % pill_txt.replace('\n', ' '))
|
||||
|
||||
# --- v1.1.1 (issue #2): the header pill keeps itself live --------------
|
||||
pl0 = api('/api/stats')
|
||||
key('ArrowRight') # probe swipe, undone right after
|
||||
flick(300)
|
||||
pl1 = api('/api/stats')
|
||||
dl = time.time() + 5
|
||||
ptx = ''
|
||||
while time.time() < dl:
|
||||
ptx = page.evaluate("() => document.getElementById('pill').textContent")
|
||||
if ('%d fresh' % pl1['fresh']) in ptx:
|
||||
break
|
||||
time.sleep(0.2)
|
||||
check(('%d fresh' % pl1['fresh']) in ptx and ('%d live' % pl1['live']) in ptx,
|
||||
'issue #2: pill refreshes itself after a swipe, no reload (%s -> %s)'
|
||||
% (pl0['fresh'], ptx))
|
||||
key('ArrowDown') # undo the probe swipe (net-zero)
|
||||
flick(300)
|
||||
pl2 = api('/api/stats')
|
||||
dl = time.time() + 5
|
||||
while time.time() < dl:
|
||||
ptx = page.evaluate("() => document.getElementById('pill').textContent")
|
||||
if ('%d fresh' % pl2['fresh']) in ptx:
|
||||
break
|
||||
time.sleep(0.2)
|
||||
check(('%d fresh' % pl2['fresh']) in ptx,
|
||||
'issue #2: pill refreshes itself after an undo, no reload (%s)' % ptx)
|
||||
|
||||
# --- B1 no-lock: rapid commit storm (no sheet, no lock) ----------------
|
||||
before = sect_pill()['txt']
|
||||
taps(2, 40)
|
||||
|
||||
Reference in New Issue
Block a user