From 6e900e31e3967497b7c4659915a86d6b68fe63a9 Mon Sep 17 00:00:00 2001 From: timmy Date: Thu, 6 Aug 2026 20:30:35 +0000 Subject: [PATCH] feat: acknowledge unread updates from My Work (#135) --- README.md | 3 +- frontend/index.html | 50 ++++++++++++++++++-- frontend/my-work.js | 36 +++++++++++++++ src/gitea_proxy.py | 8 ++++ src/main.py | 28 +++++++++++- tests/test_api_paths.py | 1 + tests/test_my_work.py | 81 +++++++++++++++++++++++++++++++++ tests/test_notification_read.py | 47 +++++++++++++++++++ 8 files changed, 248 insertions(+), 6 deletions(-) create mode 100644 tests/test_notification_read.py diff --git a/README.md b/README.md index 2f65d3a..61c0464 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,8 @@ python3 -m pip install -r requirements.txt ``` Point the dashboard at the Gitea server root (without `/api/v1`) and provide a -read-scoped access token, then start the API and bundled frontend: +token that can read dashboard data and update the authenticated user's +notification threads, then start the API and bundled frontend: ```bash export GITEA_URL='https://forge.example.com' diff --git a/frontend/index.html b/frontend/index.html index 2e8635b..5b97ca7 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -60,10 +60,12 @@ textarea { resize: vertical; min-height: 120px; } .work-filter { min-height: 44px; } .work-filter[aria-pressed="true"] { border-color:var(--accent); background:#1d4f7a; } .my-work-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:10px; } -.my-work-card { min-height: 44px; display:block; padding:12px; border:1px solid #1f3a5f; border-radius:12px; background:#0f1d33; color:var(--text); } -.my-work-card.review-trigger { width:100%; text-align:left; font:inherit; } +.my-work-card { min-height: 44px; display:grid; gap:8px; padding:12px; border:1px solid #1f3a5f; border-radius:12px; background:#0f1d33; color:var(--text); } +.my-work-card-main { display:block; width:100%; color:var(--text); text-align:left; font:inherit; background:transparent; border:0; padding:0; } +.my-work-card-main.review-trigger { width:100%; text-align:left; font:inherit; } .my-work-card:hover { border-color:var(--accent); } .my-work-card-title { display:block; margin:5px 0; font-weight:650; } +.mark-update-read { min-height:44px; width:100%; } .my-work[data-stale="true"] { border-color:#fcd34d; } .review-sheet { position:fixed; inset:0; z-index:50; display:none; justify-content:flex-end; background:rgba(5,12,21,.72); backdrop-filter:blur(4px); } .review-sheet.open { display:flex; } @@ -135,6 +137,7 @@ textarea { resize: vertical; min-height: 120px; }
+