Add opt-in freshness status for command and stream providers
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ó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- macos, swift
- Lĩnh vực
- desktop, developer-experience
Hướng nghiên cứu
Start with ProviderConfiguration.swift, ScriptWidget.swift and BarStore.widgetStatus in BarStore.swift, then read the Settings → Status and provider guide documentation. Trace how accepted outputs update diagnostics and how suspension affects status before deciding where freshness state belongs. Done when an opt-in per-source limit is reported consistently in Settings and the runtime query, with paused time and existing source states handled as specified.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
A command or stream can leave its last valid value on the bar without reporting a new value for longer than that particular data source allows. For sources that have an expected update cadence, users cannot currently express when that value should be considered stale.
Status already distinguishes failures, missing access, waiting, paused, connected and working sources. It also shows the last successful update. A running connection alone does not establish that a deadline-sensitive value is still fresh.
Silence is not a general bug: an event-driven battery, input-source or other change-only source may correctly send nothing for hours. This request is an explicit per-source freshness contract, disabled by default, not a global silence timeout or an automatic recovery system.
Proposal
Let a command/stream provider opt into a maximum acceptable age for its last successful output. Expose the resulting freshness and age beside its existing source status in Settings → Status and the runtime query.
A provider that needs a liveness contract can use successful repeated output as a heartbeat: the runner already accepts an unchanged valid output without redrawing views. Document that heartbeat/liveness and the age of the underlying external data are different guarantees. Do not mark an old external value fresh merely because its process is still alive.
Keep the last good value available and let the user use the existing Refresh/Restart action. Do not restart, hide or discard a source automatically when the freshness limit expires.
Acceptance
- With no configured freshness contract, existing behavior stays unchanged, including indefinitely quiet change-driven sources.
- A source with a configured limit becomes stale after its last accepted successful update exceeds that limit, even if its stream process remains running. Status/query show the age and configured limit.
- The next accepted valid update clears staleness. An unchanged valid output can renew an explicitly documented heartbeat contract without forcing a redraw.
- Source failures, missing access, initial waiting and intentional suspension remain distinguishable from stale data. Time spent deliberately paused for sleep, lock or visibility must not create a misleading live-connection warning; resume behavior is defined and documented.
- Shared consumers see one source's freshness consistently. This adds no automatic restart policy and does not require every silent source to emit unchanged data.
Possible today
Existing capability / workaround
ScriptDiagnosticsalready recordslastUpdated, running/suspended state, counters and retry information.ScriptWidget.acceptadvanceslastUpdatedfor valid repeated output while avoiding unchanged view assignments.BarStore.widgetStatususes initial-update, error, suspension and connection state, but not a freshness limit.ProviderConfigurationhas no opt-in age/heartbeat setting.- Settings → Status already offers last-update inspection, Refresh/Restart and explicit testing. A custom script can also report its own timestamp or warning. Those require each author or user to implement and interpret the policy separately.
- The provider guide explicitly supports change-driven sources and keeps streams alive until they exit, fail, suspend or stop; command
timeoutis an execution limit, not a freshness contract.
Reviewed main: 01bf12a1a67f6083342421efa090e48213fbe62e. Latest stable reviewed: 0.17.0. This is a capability review, not a claim that a particular user's stream stalled. No app interaction, build or test was performed.
Related
- #17 / #53 introduced common runners and event-driven sources. Their change-only output contract is retained; this request adds an opt-in freshness policy, not polling for all sources.
- #119 introduced the existing Status overview and explicit source testing. The request adds a defined freshness state beside that diagnostic information.
- #694 corrected the workspace connection label after a subscription drops. It does not detect an otherwise running custom source whose accepted output exceeds a user-defined age.
- #307, declined, proposed command-run history and log following. This request adds neither a history/log interface nor a new recovery action.
Triaged by OMP (closerouter/openai/gpt-6.1-sol).
- Ngôn ngữ chính
- Swift
- Star
- 184
- Fork
- 12
- Merge trung bình
- 3 giờ 50 phút
- Pull request đã merge (30 ngày)
- 387
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
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 Seb-GRAF/StableBar
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Menu bar items drawn as in the menu bar show the wrong part of the menu bar after a display changeCó thể đã có người làm @Jonathanm10 đã nhận hôm nay. Đang mởneeds-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Allow the App Menu to display the frontmost app iconCó thể đã có người làm @khatami10 đã nhận hôm nay. Đang mởenhancement needs-triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Seb-GRAF/StableBar
Issue tương tự
-
good first issue help wanted testing
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
-
area:cli documentation good first issue priority:low
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 94/100
isaaclins/freesnitch#430 ·
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 82/100
MasterJ93/ATProtoKit#354 ·
-
enhancement help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
heysidhant/appvanish#4 ·
-
bug priority:low status:queued
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày