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
+7 -2
View File
@@ -1159,8 +1159,12 @@ def create_app(
booth that has one; name breaks ties.
new — content landed since the booth was last looked at, or never
looked at. Newest content first; name breaks ties.
rest — everything else, in `list_booths`' own order (last activity
first, name as the tie-break). No second rule is stated.
rest — everything else, last UPDATED first: `(-landed_at, name)`,
the date the row shows. Not `list_booths`' activity order:
that counts a look, so opening a booth moved it up and a
script fetching every booth reshuffled the section into
reverse name order (operator, 2026-09-23: "last activity can
just be last time the booth was updated").
The kept/ephemeral lanes are gone: 23 of 24 live booths were kept, so
the lanes sorted nothing. Kept status still shows on every row.
"""
@@ -1176,6 +1180,7 @@ def create_app(
in_new = {b["name"] for b in new}
rest = [b for b in everything
if b["name"] not in in_needs and b["name"] not in in_new]
rest.sort(key=lambda b: (-b["landed_at"], b["name"]))
benches, benches_error = read_benches(data_dir)
board = data_dir / links_board
bookmarks = [row for row in _board_rows(board)