Skip to content

An installed package version with the hidden flag keeps being offered as an update #961

Done

Description

@M4n0x

What happens

With the configuration synced through iCloud Drive (Settings → General → Configuration file → Sync with iCloud), the bar uses agent-status 1.0.5 and ai-usage 1.5.1, but Settings keeps offering them as updates. Pressing Update fails:

Package ai-usage 1.5.1 is already installed. Choose a new version to replace it.
Package agent-status 1.0.5 is already installed. Choose a new version to replace it.

The offer never goes away, also on a build with #956.

Steps to reproduce

  1. Install a Store package, such as StableBar --config <scratch>/config.json --install-package <folder of ai-usage 1.5.1>.
  2. Set the macOS hidden flag on its version folder: chflags hidden <scratch>/packages/ai-usage/1.5.1.
  3. StableBar --config <scratch>/config.json --packages no longer lists ai-usage 1.5.1, though the folder is there and --inspect-package reads it.
  4. With an older version installed and 1.5.1 in the Store, Settings offers Update to 1.5.1, and pressing it fails as above.

Expected

A version folder is installed whatever its Finder visibility: it's listed, no update to it is offered, and nothing removes it as if it were missing.

Environment

StableBar 0.20.0-beta.20261128232559.1765 (build 1765), macOS 27.2.1, MacBook Pro M1 Pro. The configuration folder is synced with iCloud and shared by two Macs.

Evidence

ls -lO ~/.config/stablebar/packages/*/ shows hidden on the two newest Store installs only:

agent-status/:
drwxr-xr-x@ 7 user  staff  -      224 Nov 17 10:18 1.0.4
drwxr-xr-x@ 7 user  staff  hidden 224 Nov 29 09:05 1.0.5
ai-usage/:
drwx------@ 7 user  staff  -      224 Nov 28 00:05 1.5.0
drwxr-xr-x@ 7 user  staff  hidden 224 Nov 28 00:57 1.5.1
  • The running bar loads packages/ai-usage/1.5.1/config.json (its --query origins), and --inspect-package reads both folders.
  • --packages lists agent-status only up to 1.0.4 and ai-usage only up to 1.5.0.
  • Reproduced with the build 1765 binary in a local scratch folder. After chflags hidden on agent-status/1.0.5, --packages lists nothing, --inspect-package still reads the folder, and --install-package on the same version fails with the message above.

Where the flag comes from is still open. StableBar never sets it, and these come out without it:

  • The Store archives for both versions. Their root entry is a plain drwxr-xr-x, with no AppleDouble or flags.
  • An install into a local folder.
  • 21 command-line installs into a scratch folder in iCloud Drive, watched for 4 minutes.

Diagnosis

WidgetPackageStore (Sources/StableBar/Packages/WidgetPackage.swift) reads the packages folder with contentsOfDirectory(..., options: .skipsHiddenFiles). That skips dot names and also anything with the hidden flag (UF_HIDDEN, URLResourceValues.isHidden):

  • list() leaves the version out, so PackageLibrary.installed lacks it.
  • PackageLibrary.update(for:) then offers it.
  • After fix: stop offering a package update that is already installed #956's reread, applyUpdate still finds it missing (isInstalled) and calls install, which finds the folder there and throws .alreadyInstalled.
  • releaseIfEmpty(id:) reads the same way. Uninstalling the last visible version would then remove packages/<id>, the hidden version and its install record included, though the configuration still selects that version.
  • records() and installedVersions(id:) read the same way.

Only dot names (.source.json, the .install-<UUID> staging folder, .DS_Store) need skipping there.

Related

Triaged by Claude Code (Claude Opus 5.5).

Activity

  1. added
    bug
    on Nov 29, 2026
  2. stablebar-releases commented on Nov 29, 2026

    @stablebar-releases

    🎉 This issue has been resolved in version 0.20.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugreleased

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions