Download history refactor (#700)

- Much simpler handling of downloads in the activity sidebar, and
improved storage, persistence and UI behavior.
- Replace `ActivityService` with direct storage on
`DownloadHistoryService` and `download_requests` and removes the
activity_log/activity_dismissals tables
- Simplify no-auth mode by removing the fake user row pattern, handled
internally
- Add local download fallback so history entries can still serve files
after tasks leave the queue
- Downloads, requests and history are now entirely persistent between
updates / restarts, and correctly tied to each user.
This commit is contained in:
Alex
2026-03-04 19:10:06 +00:00
committed by GitHub
parent bd65bccf52
commit fbe25725d3
26 changed files with 1682 additions and 1891 deletions
-14
View File
@@ -106,20 +106,6 @@ class TestAdminUsersListEndpoint:
users = resp.json
assert "password_hash" not in users[0]
def test_list_users_hides_internal_no_auth_activity_user(self, admin_client, user_db):
user_db.create_user(
username="__shelfmark_noauth_activity__",
display_name="No-auth Activity",
role="admin",
)
user_db.create_user(username="alice", email="alice@example.com")
resp = admin_client.get("/api/admin/users")
assert resp.status_code == 200
usernames = [u["username"] for u in resp.json]
assert "__shelfmark_noauth_activity__" not in usernames
assert "alice" in usernames
def test_list_users_includes_auth_source_and_is_active(self, admin_client, user_db):
user_db.create_user(username="local_user", auth_source="builtin")
user_db.create_user(