From 4b60190badbc64e263bb84c5e45aa6cd54a1c237 Mon Sep 17 00:00:00 2001 From: richblack Date: Tue, 28 Jul 2026 21:17:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(t113):=20=E6=8B=BF=E6=8E=89=E3=80=8C?= =?UTF-8?q?=E6=9A=AB=E5=81=9C=E7=9C=8B=E5=AE=88=E3=80=8D=E2=80=94=E2=80=94?= =?UTF-8?q?leo=EF=BC=9A=E6=83=B3=E4=B8=8D=E5=87=BA=E4=BB=80=E9=BA=BC?= =?UTF-8?q?=E5=A0=B4=E6=99=AF=E8=A6=81=E6=9A=AB=E5=81=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 同 t101 語意收斂:列入=同步、不要=刪除,沒有暫停態。tray go test 綠。 (實作=子 CC;驗證+commit=總管) --- cmd/arcrun-tray/main.go | 16 ---------------- cmd/arcrun-tray/main_test.go | 10 ---------- 2 files changed, 26 deletions(-) diff --git a/cmd/arcrun-tray/main.go b/cmd/arcrun-tray/main.go index f4ab4ec..0fe33e3 100644 --- a/cmd/arcrun-tray/main.go +++ b/cmd/arcrun-tray/main.go @@ -787,19 +787,6 @@ func main() { }() }) - var pauseItem *fyne.MenuItem - pauseItem = fyne.NewMenuItem("暫停看守", func() { - st := sup.Status() - if st.State == supervisor.StateStopped { - sup.Start() - pauseItem.Label = "暫停看守" - } else { - sup.Stop() - pauseItem.Label = "繼續看守" - } - rebuildTray() - }) - rebuildTray = func() { if !hasTray { return @@ -910,7 +897,6 @@ func main() { items = append(items, fyne.NewMenuItemSeparator(), syncNowItem, // t98:立刻同步 - pauseItem, // t104:「連上知識庫」改為「新增帳號」——精靈成功後 append 到 accounts,不換掉舊帳號 fyne.NewMenuItem("+ 新增帳號…", func() { showConnectWizard() }), fyne.NewMenuItemSeparator(), @@ -988,8 +974,6 @@ func buildStatusLabel(s supervisor.Status, sync traySyncStatus, extractor string return "啟動中…" case supervisor.StateError: return "暫時出錯,正在自動重試" - case supervisor.StateStopped: - return "已暫停" default: return "尚未開始" } diff --git a/cmd/arcrun-tray/main_test.go b/cmd/arcrun-tray/main_test.go index 0d4edc8..6cb9a6c 100644 --- a/cmd/arcrun-tray/main_test.go +++ b/cmd/arcrun-tray/main_test.go @@ -223,16 +223,6 @@ func TestBuildStatusLabelExtractorOKWithCount(t *testing.T) { } } -// TestBuildStatusLabelStopped:已暫停狀態不受 sync status 影響。 -func TestBuildStatusLabelStopped(t *testing.T) { - s := supervisor.Status{State: supervisor.StateStopped} - sync := traySyncStatus{ExtractorOK: false, ExtractorError: "任何錯誤"} - got := buildStatusLabel(s, sync, "claude") - if got != "已暫停" { - t.Errorf("已暫停狀態應回「已暫停」,got=%q", got) - } -} - // TestSyncNowSignalPath:syncNowSignalPath 回傳以 sync-now 結尾的路徑(t98)。 // tray 寫這個路徑,collector 從 manifest 同目錄讀——路徑語意必須一致。 func TestSyncNowSignalPath(t *testing.T) {