fix(desk): "everything else" is last UPDATED first, not last activity

The operator, on the live Desk: "how is this last activity first?" It was not,
usefully. The section sorted by `_newest_mtime`, which counts a look (`.viewed`),
so opening a booth moved it up. Tonight two post-deploy checks fetched every
booth page within half a second, which recorded 22 looks at once and collapsed
the section into reverse name order through the (mtime, name) tie-break.
Meanwhile each row shows "updated X ago", which is `landed_at`, a different
clock from the one the list was sorted by.

Operator ruling: "last activity can just be last time the booth was updated,
not necessarily operator's last activity." The section now sorts by
`(-landed_at, name)`, the date the row shows, labelled "last updated first".
Looking, flagging and blurring no longer move a booth. `list_booths` keeps its
own order for its other readers, and `_newest_mtime` still feeds lifetime.

The r2_flow contract (§3, the ordering table, INV-5) and ROADMAP's ordering row
are amended to match. Two tests and two r2_flow.toml rows cover it (25/25).
This commit is contained in:
vh
2026-09-23 22:55:10 -07:00
parent cce6a20abe
commit 64f64889a2
6 changed files with 73 additions and 14 deletions
+18
View File
@@ -210,3 +210,21 @@ old = '''
new = '''
var word = WORDS[form.getAttribute('data-confirm')];
if (word && !confirm('''
[[mutation]]
label = "everything else in activity order again (a look moves a booth up)"
file = "booth/app.py"
test = "tests/test_flow.py::test_everything_else_is_ordered_by_last_update_not_by_looking"
old = '''
rest.sort(key=lambda b: (-b["landed_at"], b["name"]))'''
new = '''
pass'''
[[mutation]]
label = "everything else breaks an update tie by name reversed"
file = "booth/app.py"
test = "tests/test_flow.py::test_everything_else_breaks_an_update_tie_by_name"
old = '''
rest.sort(key=lambda b: (-b["landed_at"], b["name"]))'''
new = '''
rest.sort(key=lambda b: (b["landed_at"], b["name"]), reverse=True)'''