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) {