From a6c769901d33cc26f0a092f8f0eb19bf1c1e481a Mon Sep 17 00:00:00 2001 From: timmy Date: Tue, 18 Aug 2026 05:35:05 +0000 Subject: [PATCH] feat: mention teammates from Today updates (Closes #1064) --- README.md | 8 ++--- frontend/dashboard.js | 29 +++++++-------- frontend/index.html | 2 ++ frontend/today-progress.js | 10 ++++-- tests/e2e/fake_gitea.py | 5 +++ .../e2e/test_mobile_today_handoff_release.py | 32 ++++++++++++++++- tests/test_mobile_composer_integration.py | 9 ++--- tests/test_today_progress.py | 36 +++++++++++++++++++ 8 files changed, 104 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 6f82d01..67ce077 100644 --- a/README.md +++ b/README.md @@ -40,10 +40,10 @@ identity and posts one ordered Markdown evidence comment. After a partial failur the first unconfirmed image instead of duplicating the issue or earlier uploads. The installed PWA Share Target accepts the same bounded multi-image bundle through sign-in continuation. Pull-request replies and mobile My Work issue and PR comments use Gitea's -issue-comment API. In issue, pull-request, and unread-update conversations, typing -at least two characters after `@` offers repository-scoped teammate suggestions; -touch or keyboard selection inserts the login without leaving the draft. Mention -lookup failure never blocks literal text or comment delivery. Mobile issue capture requires issue +issue-comment API. In issue, pull-request, unread-update, and active Today progress +conversations, typing at least two characters after `@` offers repository-scoped +teammate suggestions; touch or keyboard selection inserts the login without leaving +the draft. Mention lookup failure never blocks literal text or comment delivery. Mobile issue capture requires issue creation and assignment permission. A fresh capture never silently targets the first repository: the operator must explicitly choose one, either from the paginated browser or through the bounded authenticated repository search. Search results include only visible repository identities, stale diff --git a/frontend/dashboard.js b/frontend/dashboard.js index 7db6368..dcfb481 100644 --- a/frontend/dashboard.js +++ b/frontend/dashboard.js @@ -497,22 +497,19 @@ {headers:{Accept:'application/json'}}, ); } - const issueMentions = createMentionComposer({ - textarea:qs('#issue-comment'), listbox:qs('#issue-comment-mentions'), - status:qs('#issue-comment-mention-status'), getRepository:()=>selectedIssue?.repository, - loadCandidates:loadMentionCandidates, + const [issueMentions, pullMentions, updateMentions, todayProgressMentions] = [ + ['issue-comment',()=>selectedIssue?.repository], + ['pull-comment',()=>selectedPull?.repository], + ['update-reply',()=>selectedUpdate?.repository], + ['today-progress-body',()=>currentTodayProgressTarget()?.repository], + ].map(([id,getRepository]) => { + const controller = createMentionComposer({ + textarea:qs('#'+id), listbox:qs('#'+id+'-mentions'), + status:qs('#'+id+'-mention-status'), getRepository, loadCandidates:loadMentionCandidates, + }); + controller.start(); + return controller; }); - const pullMentions = createMentionComposer({ - textarea:qs('#pull-comment'), listbox:qs('#pull-comment-mentions'), - status:qs('#pull-comment-mention-status'), getRepository:()=>selectedPull?.repository, - loadCandidates:loadMentionCandidates, - }); - const updateMentions = createMentionComposer({ - textarea:qs('#update-reply'), listbox:qs('#update-reply-mentions'), - status:qs('#update-reply-mention-status'), getRepository:()=>selectedUpdate?.repository, - loadCandidates:loadMentionCandidates, - }); - [issueMentions, pullMentions, updateMentions].forEach(controller => controller.start()); async function api(url) { const response = await fetch(url, { headers: { Accept: 'application/json' } }); @@ -1967,7 +1964,7 @@ } const todayProgressView = createTodayProgressView({ progress:todayProgress, currentTarget:currentTodayProgressTarget, qs, photos:todayProgressPhotos, - voice:todayProgressVoice, + voice:todayProgressVoice, mentions:todayProgressMentions, activity:mountTodayProgressActivity(qs,fetchReviewJson,actionHydrator,renderMarkdown), announce:message => { qs('#my-work-action-status').textContent = message; }, onAdmitted:() => refreshMyWorkView(), diff --git a/frontend/index.html b/frontend/index.html index f359aea..fc3e765 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1558,6 +1558,8 @@ + +