From 2a06cf1daa799fb34fc4e446fd4f6182b11bcc1c Mon Sep 17 00:00:00 2001 From: timmy Date: Thu, 27 Aug 2026 23:30:06 +0000 Subject: [PATCH] feat: pin current mobile detail item (Closes #1489) --- frontend/dashboard.css | 3 + frontend/dashboard.js | 3 + frontend/index.html | 4 ++ frontend/mobile-recent-work.js | 30 ++++++++- tests/e2e/test_mobile_pinned_work_release.py | 23 +++++++ tests/test_mobile_recent_work.py | 68 ++++++++++++++++++++ 6 files changed, 130 insertions(+), 1 deletion(-) diff --git a/frontend/dashboard.css b/frontend/dashboard.css index ede3276..1599d99 100644 --- a/frontend/dashboard.css +++ b/frontend/dashboard.css @@ -888,8 +888,11 @@ textarea { resize: vertical; min-height: 120px; } .issue-sheet-panel { width:min(560px,100%); height:100%; overflow:auto; padding:18px; background:#0b1526; border-left:1px solid #2a496e; } .issue-sheet-header { display:flex; align-items:center; justify-content:space-between; gap:10px; } .issue-sheet-header button { min-height:44px; } +.current-work-pin { display:none; } .mobile-issue-detail-nav, .mobile-pull-detail-nav, .mobile-update-detail-nav, .mobile-review-detail-nav { display:none; } @media (max-width:600px) { + [data-current-work-pin] { display:inline-flex; align-items:center; justify-content:center; min-width:64px; min-height:44px; padding-inline:12px; } + [data-current-work-pin="unpin"] { border-color:#60a5fa; background:#17365a; color:#fff; } .issue-sheet-panel, .pull-sheet-panel, .update-sheet-panel, .review-sheet-panel { padding-top:max(12px,env(safe-area-inset-top)); } .mobile-issue-detail-nav, .mobile-pull-detail-nav, .mobile-update-detail-nav, .mobile-review-detail-nav { position:sticky; top:env(safe-area-inset-top); z-index:6; diff --git a/frontend/dashboard.js b/frontend/dashboard.js index 6293779..35be7e0 100644 --- a/frontend/dashboard.js +++ b/frontend/dashboard.js @@ -442,6 +442,7 @@ pinnedSection:qs('#mobile-pinned-work'), pinnedList:qs('#mobile-pinned-work-list'), pinnedToggle:qs('#mobile-pinned-work-toggle'), + detailPins:qsa('[data-current-work-pin]'), status:qs('#mobile-recent-work-status'), openRoute:fragment => { const sheet = qs('#mobile-queue-sheet'); @@ -2082,6 +2083,7 @@ closeOpenWorkSheets(); await openRoutedWorkSection(item); mobileRecentWork.record(item); + mobileRecentWork.setCurrent(item); const route = createWorkRoute.parse(window.location.hash); if (route?.section === item.section) navigateWorkSection(item.kind, item.section); }, @@ -2112,6 +2114,7 @@ qs('#retry-work-route').addEventListener('click', () => workRoute.sync()); function closeOpenWorkSheets() { + mobileRecentWork.setCurrent(null); issueVoiceReply.cancel(); pullVoiceReply.cancel(); updateVoiceReply.cancel(); diff --git a/frontend/index.html b/frontend/index.html index 19955b0..13f1016 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1053,6 +1053,7 @@

Assigned issue

+