发布

  • fix: codex review hardening + bump to 2.5.1 (build 10)

    frostbyte_neo 发布于 2026-05-24 05:46:59 +00:00

    Three bugs surfaced by post-2.5.0 codex review:

    1. AppState.requestFullDiskAccessAndRetry read pendingPermissionRetryItems
      at callback fire time instead of capturing the items synchronously. A
      second requestAccess call (e.g. user retries cleanup while uninstall
      sheet still open) would clobber pendingPermissionRetryItems before the
      first callback resolved, sending the wrong batch to retryCleanItems.
      Fix: capture items in the closure directly.

    2. retryCleanItems never called handleCleanOutcome. If FDA was revoked
      between grant detection and the retry firing, post-retry survivors
      were silently swallowed instead of re-popping the permission sheet.
      Fix: filter survivors after the retry pass and route through the
      normal outcome path so an FDA regression still cycles back to the
      sheet.

    3. OnboardingView.refreshFda fired DispatchQueue.main.asyncAfter on every
      1-second poll tick that saw a granted state. If two ticks landed close
      together while still on the permission page, two .8s delays queued
      and the page advanced twice (harmless because of the min() clamp, but
      wasteful). Fix: autoAdvanceScheduled latch + page re-check at delay
      fire so the auto-advance is exactly-once per grant transition.

    Also: PermissionCoordinator.requestAccess nils onGrantCallback before
    installing the new one. Defensive — without it, a stuck previous
    callback would hold AppState slices that the second request superseded.

    下载附件