Setup's first step loses a failed menu bar change's error while Continue stays disabled

Aperta
#801 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
swift
Ambito
desktop

Direzione di ricerca

Read Sources/StableBar/SetupWindow.swift, especially SetupSession.refreshAccess() and preview(), then trace how the placement step stores its error and how SetupPlacement.Phase.failed affects Continue. Check the related behavior covered by aFailedMenuBarChangeKeepsTheFirstStepWaiting. Done when the placement error remains visible while Continue waits and clears after a new choice or successful retry.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

What happens

On setup's first step, when hiding or showing the macOS menu bar fails, setup shows "StableBar couldn’t hide the macOS menu bar. …" and Continue stays disabled. As soon as StableBar becomes active again, for example after switching to System Settings and back, the error disappears but Continue stays disabled, and nothing says why.

Steps to reproduce

System Events has to fail the change, so this is hard to trigger by hand:

  1. Start setup without full Calendar access (the usual case).
  2. Choose Replace the menu bar while System Events fails the change, for example by timing out.
  3. Switch to another app, then back to StableBar.

Expected

The error stays as long as Continue waits on it, and clears once a new choice or a retry works.

Environment

main at 5f9e2700, and #787 at 2a163f27. Found in code review, not reported by a user.

Evidence

CodeRabbit's review of #787: https://github.com/Seb-GRAF/StableBar/pull/787#pullrequestreview-5951404412

Diagnosis

  • SetupSession.refreshAccess() (Sources/StableBar/SetupWindow.swift) runs whenever StableBar becomes active, and calls preview() unless Calendar access is full.
  • preview() sets error = nil once the preview loads, which also clears the error the placement step set.
  • On main, the first step keeps waiting after a change that fails without taking effect, because placementTookEffect sees the menu bar doesn't match. #787 also holds Continue after a change that throws but took effect (SetupPlacement.Phase.failed, pinned by aFailedMenuBarChangeKeepsTheFirstStepWaiting), so both cases end up stuck without an error.
  • Choosing the same placement again retries the change and gets out of it.

One way to fix it: keep the placement's error apart from the preview's, so a preview that loads doesn't clear it.

Related

  • #787: adds the second case; CodeRabbit flagged it there.
  • #497 / #498: Skip setup while a change is still running; a failed change goes by what macOS reports.
  • #788 / #789: Skip setup while setup waits for Automation access.

Triaged by Claude Code (Claude Opus 5.5).

Lingua principale
Swift
Stelle
184
Fork
12
Merge medio
3h 50m
PR unite (30g)
387

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Seb-GRAF/StableBar

Tutte le issue di Seb-GRAF/StableBar

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.