feat(channels): an Added column, and About cards that wait for a resting pointer
The channel manager lists when each follow reached the list (the subscription import that first saw it, or a subscribe made here) as a sortable Added date after Last upload. The About cell's card opens after the pointer rests on it for half a second instead of at once, and a scroll puts an open one away.
This commit is contained in:
@@ -76,6 +76,10 @@ def list_channels(user: User = Depends(current_user), db: Session = Depends(get_
|
||||
"details_synced": ch.details_synced_at is not None,
|
||||
"recent_synced": ch.recent_synced_at is not None,
|
||||
"backfill_done": ch.backfill_done,
|
||||
# When the follow reached this list: written by the subscription import the run that
|
||||
# first saw it, or by a subscribe made here — not the channel row's own date, which an
|
||||
# explored or discovered channel had before it was followed.
|
||||
"added_at": iso(sub.created_at),
|
||||
}
|
||||
for sub, ch in rows
|
||||
]
|
||||
|
||||
@@ -72,3 +72,23 @@ def test_the_sync_status_counts_the_callers_subscriptions(db, make_user, as_user
|
||||
assert (body["subscriptions"], body["channels_total"]) == (1, 1)
|
||||
mine = as_user(user).get("/api/sync/my-status").json()
|
||||
assert (mine["channels_total"], mine["channels_recent_pending"]) == (1, 1)
|
||||
|
||||
|
||||
def test_a_channel_lists_when_it_entered_this_users_list_not_when_the_channel_did(
|
||||
db, make_user, as_user
|
||||
):
|
||||
from datetime import datetime, timezone
|
||||
|
||||
user = make_user()
|
||||
db.add(Channel(id="UCa", title="A", created_at=datetime(2026, 6, 10, tzinfo=timezone.utc)))
|
||||
db.flush()
|
||||
db.add(
|
||||
Subscription(
|
||||
user_id=user.id,
|
||||
channel_id="UCa",
|
||||
created_at=datetime(2026, 10, 12, 8, 30, tzinfo=timezone.utc),
|
||||
)
|
||||
)
|
||||
db.commit()
|
||||
listed = as_user(user).get("/api/channels").json()
|
||||
assert [(c["id"], c["added_at"]) for c in listed] == [("UCa", "2026-10-12T08:30:00+00:00")]
|
||||
|
||||
Reference in New Issue
Block a user