-
Notifications
You must be signed in to change notification settings - Fork 1
Redesign menu bar icon and provider icons, harden 429 handling #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
+1,653
−2,909
Closed
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
dc5a999
Replace TUI with native macOS menu bar app
claude 2a320d7
Match original Claude User-Agent header
claude 22f37cf
Robustly parse microsecond-precision reset timestamps
claude 4ef2a83
Polish UI and add brand-icon provider picker
claude 120cbd8
Redesign menu bar icon and provider icons, harden 429 handling
willwashburn 0209eea
Menu bar flame: orange→red palette, drop the percentage label
willwashburn 977907a
Fix flame to a constant size to avoid menu bar layout shift
willwashburn 8bdadc4
Add signed/notarized release pipeline and install docs
willwashburn 5567ee6
Match Pear's release setup: date-based version, API-key notarization
willwashburn 9715cb5
Add app icon and a Quit affordance
willwashburn f1233da
Drop the visible Quit button, keep ⌘Q only
willwashburn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,122 @@ | ||
| name: Release (macOS) | ||
|
|
||
| # Manual trigger: Actions tab → "Release (macOS)" → Run workflow. | ||
| # Mirrors the Pear release flow (date-based version, Developer ID signing + | ||
| # notarization, stable-named DMG, publish-to-draft-then-flip-live). | ||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: write # create the GitHub Release | ||
|
|
||
| jobs: | ||
| release: | ||
| runs-on: macos-14 | ||
| timeout-minutes: 60 # backstop for the notarization retry loop below | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Compute date-based version | ||
| id: version | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| YEAR="$(date +%Y)" | ||
| # 10# forces base-10 so "08"/"09" aren't read as invalid octal, and | ||
| # drops the leading zero to stay valid semver (2026.6.1, not 2026.06.1). | ||
| MONTH="$((10#$(date +%m)))" | ||
| # Count this month's releases (drafts included) so re-running before | ||
| # publishing a draft doesn't reuse its version. | ||
| COUNT="$(gh api --paginate "repos/${GITHUB_REPOSITORY}/releases" \ | ||
| --jq '.[].tag_name' | grep -Ec "^v${YEAR}\.${MONTH}\." || true)" | ||
| N="$((COUNT + 1))" | ||
| VERSION="${YEAR}.${MONTH}.${N}" | ||
| echo "Release #${N} for ${YEAR}-$(date +%m) -> v${VERSION}" | ||
| echo "version=${VERSION}" >> "$GITHUB_OUTPUT" | ||
| echo "tag=v${VERSION}" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Generate changelog | ||
| id: changelog | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| TAG="${{ steps.version.outputs.tag }}" | ||
| PREVIOUS_TAG="$(git tag --sort=-version:refname | grep -E '^v[0-9]' | grep -v "^${TAG}$" | head -n 1 || true)" | ||
| NOTES_FILE="${RUNNER_TEMP}/release-notes.md" | ||
| args=(-f "tag_name=${TAG}" -f "target_commitish=${GITHUB_SHA}") | ||
| if [ -n "${PREVIOUS_TAG}" ]; then | ||
| args+=(-f "previous_tag_name=${PREVIOUS_TAG}") | ||
| fi | ||
| gh api "repos/${GITHUB_REPOSITORY}/releases/generate-notes" \ | ||
| "${args[@]}" --jq ".body" > "${NOTES_FILE}" | ||
| echo "notes_file=${NOTES_FILE}" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Decode App Store Connect API key (.p8) | ||
| env: | ||
| APPLE_API_KEY_BASE64: ${{ secrets.APPLE_API_KEY_BASE64 }} | ||
| run: | | ||
| mkdir -p "$HOME/private_keys" | ||
| echo "$APPLE_API_KEY_BASE64" | base64 --decode > "$HOME/private_keys/AuthKey.p8" | ||
| echo "APPLE_API_KEY=$HOME/private_keys/AuthKey.p8" >> "$GITHUB_ENV" | ||
|
|
||
| - name: Import Developer ID certificate | ||
| env: | ||
| CSC_LINK: ${{ secrets.CSC_LINK }} | ||
| CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} | ||
| run: | | ||
| KEYCHAIN="$RUNNER_TEMP/app-signing.keychain-db" | ||
| KCPW="$(uuidgen)" # throwaway keychain password, never persisted | ||
| echo "$CSC_LINK" | base64 --decode > "$RUNNER_TEMP/certificate.p12" | ||
| security create-keychain -p "$KCPW" "$KEYCHAIN" | ||
| security set-keychain-settings -lut 21600 "$KEYCHAIN" | ||
| security unlock-keychain -p "$KCPW" "$KEYCHAIN" | ||
| security import "$RUNNER_TEMP/certificate.p12" -k "$KEYCHAIN" \ | ||
| -P "$CSC_KEY_PASSWORD" -T /usr/bin/codesign | ||
| security set-key-partition-list -S apple-tool:,apple: \ | ||
| -s -k "$KCPW" "$KEYCHAIN" | ||
| security list-keychains -d user -s "$KEYCHAIN" \ | ||
| $(security list-keychains -d user | sed s/\"//g) | ||
|
|
||
| - name: Build, sign, notarize & package | ||
| env: | ||
| VERSION: ${{ steps.version.outputs.version }} | ||
| APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }} | ||
| APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }} | ||
| # notarytool can hit transient Apple notary drops; retry the whole | ||
| # build a few times. Notarization runs before publishing, so a failed | ||
| # attempt leaves nothing half-published. | ||
| run: | | ||
| for attempt in 1 2 3; do | ||
| if ./release.sh; then exit 0; fi | ||
| echo "release attempt ${attempt} failed; retrying in 60s..." | ||
| sleep 60 | ||
| done | ||
| echo "release failed after 3 attempts" | ||
| exit 1 | ||
|
|
||
| - name: Publish GitHub Release | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| # Upload assets to a draft first (atomic), then flip it live and mark it | ||
| # latest — what makes releases/latest/download/AgentLimit-arm64.dmg work. | ||
| run: | | ||
| TAG="${{ steps.version.outputs.tag }}" | ||
| gh release create "${TAG}" dist/AgentLimit-arm64.dmg \ | ||
| --repo "${GITHUB_REPOSITORY}" \ | ||
| --target "${GITHUB_SHA}" \ | ||
| --title "${{ steps.version.outputs.version }}" \ | ||
| --notes-file "${{ steps.changelog.outputs.notes_file }}" \ | ||
| --draft | ||
| gh release edit "${TAG}" --repo "${GITHUB_REPOSITORY}" --draft=false --latest | ||
|
|
||
| - name: Upload build artifacts | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: agentlimit-macos-${{ github.run_id }} | ||
| path: dist/*.dmg | ||
| if-no-files-found: warn | ||
| retention-days: 30 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,8 @@ | ||
| node_modules/ | ||
| dist/ | ||
| .DS_Store | ||
| *.log | ||
| bun.lockb | ||
| .npm-cache | ||
| .build/ | ||
| dist/ | ||
| *.xcodeproj | ||
| *.xcworkspace | ||
| .swiftpm/ | ||
| node_modules/ | ||
| .npm-cache/ |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| <plist version="1.0"> | ||
| <dict> | ||
| <key>CFBundleName</key> | ||
| <string>AgentLimit</string> | ||
| <key>CFBundleDisplayName</key> | ||
| <string>Agent Limit</string> | ||
| <key>CFBundleExecutable</key> | ||
| <string>AgentLimit</string> | ||
| <key>CFBundleIconFile</key> | ||
| <string>AppIcon</string> | ||
| <key>CFBundleIdentifier</key> | ||
| <string>com.agentworkforce.agentlimit</string> | ||
| <key>CFBundlePackageType</key> | ||
| <string>APPL</string> | ||
| <key>CFBundleShortVersionString</key> | ||
| <string>1.0.0</string> | ||
| <key>CFBundleVersion</key> | ||
| <string>1</string> | ||
| <key>LSMinimumSystemVersion</key> | ||
| <string>13.0</string> | ||
| <key>LSUIElement</key> | ||
| <true/> | ||
| <key>NSPrincipalClass</key> | ||
| <string>NSApplication</string> | ||
| <key>NSHumanReadableCopyright</key> | ||
| <string>MIT License</string> | ||
| </dict> | ||
| </plist> | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2026 Will Washburn | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With
LSUIElementenabled, macOS hides the app from the Dock and normal app menu, and the new MenuBarExtra content does not provide any Quit/NSApp.terminateaction. Anyone who launches the installed background app therefore has no UI path to stop it other than killing it from Activity Monitor or the terminal, so keep a quit item somewhere in the menu bar UI before shipping this mode.Useful? React with 👍 / 👎.