Check for updates in the background while the window is open, and signal new results with a badge
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
Hướng nghiên cứu
Start with mintUpdate.py and trace _auto_refresh_tick(), refresh(), refresh_updates(), and show_updates_in_UI() to understand how background fetching is separated from rebuilding the visible list. Review the existing notification path and the related issues (#923, #1054, #951, #933, #603, #727, #795) before estimating the change. Done means updates can be checked while the window is open, the current list and selections remain intact, and the indicator and notification clear after the refreshed list loads.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
Auto-refresh only runs when the Update Manager window is closed (tray mode). While the window is open, _auto_refresh_tick() defers the refresh every 60 seconds:
if not self.hidden or self.refreshing:
why = "window is open" if not self.hidden else "another refresh is in progress"
self.logger.write(f"Auto refresh deferred ({why}); will retry shortly")
self.auto_refresh_source.arm(60)
So if the window is left open (behind other windows, on another workspace, or while the screen is locked), the list of updates goes stale indefinitely, and the user gets no signal that anything new is available. #923 shows a log of exactly this happening for a week. The result is that refresh behavior is inconsistent: it depends on whether the window happens to be open.
I understand why the refresh is deferred: rebuilding the list while the user is looking at it, or after they have unchecked some packages, would be disruptive.
Describe the solution you'd like
Separate checking for updates from updating the visible list:
- Keep running the scheduled refresh while the window is open, but do not rebuild the visible list.
- If the result differs from what is displayed, show an indicator next to the Refresh button (for example a small dot or symbol) meaning "new updates available, click Refresh to load them."
- Also send a desktop notification, like the existing "Updates are available" notification. Cinnamon's grouped window list already shows a badge on an app's taskbar icon with the number of pending notifications for that app (
getNotificationCountForApp()inappGroup.js). This is how Steam, Signal, and others get a red badge. Update Manager would get a taskbar badge for free, as long as the notification is associated with the app. A badge of "1" is fine, since it only needs to say "something is there." - Clicking Refresh (or the notification) loads the new list. Clear the indicator and notification when that happens.
The list never changes under the user, so selections are safe, and the user still learns that updates are waiting.
Describe alternatives you've considered
- Only defer the refresh while the window has focus (and its dialogs, such as Preferences and Software Sources, count as focus). Refresh normally when it is unfocused. This is simpler but can still discard package selections, unless selections are preserved across refreshes.
- Always refresh while the screen is locked (
org.cinnamon.ScreenSaver.GetActiveor logindLockedHint). This has the same selection caveat. - A "stale" indicator based only on time since the last refresh, as suggested in #1054. This is trivial but does not tell the user whether anything new exists. This proposal goes further by actually checking in the background.
Additional context: implementation notes
From reading mintUpdate.py, the refresh pipeline already separates fetching from displaying, so this looks like a moderate change:
refresh()starts the cache refreshes on background threads, thenrefresh_updates()builds a plain list (model_items) without touching the UI. Only the finalshow_updates_in_UI()call rebuilds theGtk.TreeStore. A background refresh could stop before that call, keepmodel_items, compare it with the displayed list, and set the indicator.refresh()immediately callsset_refresh_mode(True)(spinner page, disabled toolbar, menu, and Install button),clear_infobars(), andset_status(). A background mode would skip these.refresh_apt_cache()passesinteractive=not self.hidden. A background refresh should be non-interactive.- Installs are currently kept from overlapping a refresh only because
set_refresh_mode()disables the Install button. A background refresh would need an explicit guard: do not start one during an install, and make Install wait for (or cancel) a running background refresh. - After a background refresh, the displayed versions may be older than what APT would install. The indicator covers this, since it tells the user the list is out of date.
Related: #923, #1054, #951, #933, #603, #727, #795.
- Ngôn ngữ chính
- Python
- Star
- 428
- Fork
- 196
- Merge trung bình
- 16 giờ 9 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của linuxmint/mintupdate
-
Report failed upgrades with a non-zero exit status (mintupdate-cli, mint-refresh-cache, automatic upgrades)Có thể đã có người làm @Amadeus-22 đã nhận 14 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
linuxmint/mintupdate#1107 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
BUG
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
linuxmint/mintupdate#1089 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
flatpak-update-worker busy-loops at ~46% CPU when parent mintUpdate process exitsCó thể đã có người làm @dualfroz đã nhận 9 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
linuxmint/mintupdate#1041 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
FEATURE REQUEST
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
linuxmint/mintupdate#910 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
linuxmint/mintupdate#903 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của linuxmint/mintupdate
Issue tương tự
-
00 - Bug component: numpy.linalg
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
521xueweihan/HelloGitHub#4543 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
emeryberger/CSrankings#15700 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Bug | 工作不正常 Triage | 待检查
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
OneDragon-Anything/ZenlessZoneZero-OneDragon#3084 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Task select patterns with uppercase letters never matchCó thể đã có người làm @manobhisriram đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày