Roles is newsdesk's feed: rail, feed and reader, with read state and tags

The Roles tab takes newsdesk's shell, ported from its index.html and
app.css rather than rewritten: a filter rail (Show read, Best first or
Newest first, first seen, tag chips with counts, the old filters behind a
disclosure), the feed in newsdesk's row layout (score gutter, title,
company, place, badges, age, tags, the summary as excerpt, judge buttons)
and the reader as a third column that replaces the list on a phone. The
router pushes /roles/{uid}, which the server also renders with the reader
open, so the separate read page and role.js go. j/k, u/n/d, S, Enter,
Escape, o, /, f and c work as in newsdesk. The phone rules come with their
comments.

Two things the row lacked: roles.read_at, stamped when the reader opens a
role or a vote is cast, behind include_read on /api/roles; and role_tags,
written by summarise alongside the summary and served with counts by
/api/filters, filtered in SQL before LIMIT. Migration 5.

PyCharm run configurations in .run/ for serve, pull, seed and pytest.
core.autocrlf=input is set locally so a Windows-side checkout commits LF.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Fable 5.1 committed 2026-09-28 12:37:45 +02:00
1 parent 515d2250fc
commit a9290a6926
23 files changed
+2252 -715

No files matched your search

+6
View File
@@ -267,11 +267,17 @@ class Role(Model):
#: None unjudged, else -1 pass, 0 neutral, 1 like.
vote: Literal[-1, 0, 1] | None = None
voted_at: str | None = None
#: NULL unread, else when the feed opened it or judged it. A vote stamps
#: this too, see `Store.set_vote`: voting is reading.
read_at: str | None = None
summary: str = ""
summarised_at: str | None = None
#: The posting page as plain text, for a role whose description is a teaser.
article_text: str = ""
article_at: str | None = None
#: The open vocabulary `summarise` read off the posting, sorted. Not a
#: column: loaded from `role_tags` alongside the row, see `Store.role`.
tags: list[str] = []
class ExtractResult(ModelTaskResult):