Temporary CLI edits retain and replay superseded assignments without a bound
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
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- swift
- Lĩnh vực
- performance
Hướng nghiên cứu
Start by reading Sources/StableBar/BarStore.swift around applyEdits and Sources/StableBar/ConfigurationEditing.swift around editedMainDocument, then trace how structural edits and external file reloads affect replay order. Determine how to compact superseded assignments while preserving temporary changes across reloads and save or discard behavior; done means repeated updates do not retain and replay an ever growing history without changing those documented semantics.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happens
Every successful temporary CLI edit is retained for the whole session, including older --set operations that a later assignment completely supersedes. Each subsequent command reconstructs the configuration by replaying that growing list.
A long-running automation that repeatedly changes one text field therefore retains command history rather than only the effective temporary change. The source shows unbounded retained operations and increasing replay work on the main actor. Actual latency, memory use and CPU use have not been measured, so this report does not claim a measured leak or a particular slowdown.
Steps to reproduce
Proposed isolated reproduction, not executed during this review:
-
Create a disposable directory (
scratch=$(mktemp -d)). Save this configuration as$scratch/config.jsonand start StableBar with--config "$scratch/config.json", so the test does not edit the personal bar:{"widgets":[{"id":"status","type":"text","position":"right","text":"Initial"}]} -
Repeatedly update that same widget without
--persist, for example alternate these commands:StableBar --config "$scratch/config.json" --set status '{"text":"A"}' StableBar --config "$scratch/config.json" --set status '{"text":"B"}' -
Keep the same session active without Reset, Discard, Save or switching screen setups. Inspect the retained
sessionEditsand the operations replayed on the next command or file reload.
The current implementation appends one retained operation per successful command. The widget needs only the latest text value, but old assignments remain. A loop is not included or run against the reporter's bar.
Expected
Repeated assignments to one unchanged widget property should not retain and replay every superseded value forever. Keep the documented session behavior: temporary changes remain separate from saved Settings changes, survive external file reloads, and can be saved or discarded explicitly.
See Command-line controls. The existing --set interface should remain safe for a long-running session; this report does not request a new provider or CLI command.
Environment
- Found by static review of main
01bf12a1a67f6083342421efa090e48213fbe62e. - The same
applyEditsretention exists in latest stablev0.17.0(9ac8fb042aff9e5fa65805835dcfeaddb4777f59). - No runtime reproduction, benchmark, app launch or automated test was performed.
- The installed reporting app is 0.17.0, build 1187; no observed resource figures from it are asserted here.
- Reporting workstation: macOS 27.0, build 26A428, arm64. No resource-use observations from it are implied.
Evidence
- BarStore.swift:365–379,
applyEdits: buildsallEdits = sessionEdits + edits, computes the new document, and stores the whole combined list unlesspersistis true. There is no deduplication or semantic compaction on this path. - ConfigurationEditing.swift:41–46,
editedMainDocument: replays every edit incustomizationEdits + sessionEdits, or in the explicitly supplied replay list, over the file document. - BarStore.swift:4–5:
BarStoreis@MainActor;applyEditsinvokes that reconstruction synchronously.
For scale only, one successful update every five seconds adds 24 × 60 × 60 / 5 = 17,280 operations per day. That is arithmetic from the retention rule, not a benchmark or a measurement of this workstation.
Diagnosis
The temporary overlay is represented as an ever-growing operation log. Even when the effective state is still one overridden field, appending a command copies/extends the old list and the next reconstruction applies the entire history. With N retained assignments, replay does work proportional to N before loading the resulting configuration.
Compact only semantically superseded assignments, or otherwise represent effective temporary state without losing its meaning. Preserve ordering around structural operations such as add, remove, unset, reorder, profile and package changes, and preserve rebasing over external file changes. Dropping an arbitrary oldest N operations can silently change the result. Persisting every live update would change the documented temporary behavior and write user configuration unnecessarily.
Related
- #161, released in 0.6.0, reduces repeated composition and debounces Settings controls. It does not compact temporary CLI history; the current retention/replay path remains.
- #151, closed without merging, proposed caching compositions within one edit. That is distinct from bounding superseded operations across a long session.
- #298 was declined because an event-driven script widget already covers pushing content. This report does not reopen
--pushor request a new provider. It concerns the resource behavior of already supported--setedits, including configuration properties rather than only data output. - #299 was declined as a live event-stream feature. No event stream is requested here.
No matching issue or PR was found in all-state temporary/CLI searches, plus focused replay, sessionEdits, temporary-edits and unbounded-history searches. The retention path remains in latest stable and pinned main.
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