Skip to content

fix: install release asset by default#5

Merged
flamerged merged 2 commits into
mainfrom
fix/release-install-scripts
May 14, 2026
Merged

fix: install release asset by default#5
flamerged merged 2 commits into
mainfrom
fix/release-install-scripts

Conversation

@flamerged
Copy link
Copy Markdown
Owner

@flamerged flamerged commented May 14, 2026

Summary

  • make scripts/install-swiftbar.sh install the latest release asset instead of creating a dev symlink
  • add scripts/install-dev-swiftbar.sh for explicit source-checkout development installs
  • update README and checks for the release/dev install split

Validation

  • ./scripts/check.sh
  • release installer smoke test creates a regular executable file with Update to latest release
  • dev installer smoke test creates a symlink
  • cr --type uncommitted

Summary by CodeRabbit

  • New Features

    • Added a development install option for source checkouts (symlink-based) and a configurable update log with an "open update log" menu item.
  • Documentation

    • Clarified development install instructions, noted HTTPS release-asset URL expectation, and documented the AGENTWATCH_UPDATE_LOG setting.
  • Improvements

    • Installer now downloads/releases and validates release assets before activating; pre-install checks include additional syntax/configuration validation.
  • Bug Fixes

    • Update action now runs without blocking the UI and logs progress/errors to the update log.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 781cb7cc-2468-4ca6-af0c-9b36eecb5b5c

📥 Commits

Reviewing files that changed from the base of the PR and between 41d91ce and 4fc78f9.

📒 Files selected for processing (4)
  • README.md
  • bin/agent-watch.30s.sh
  • scripts/install-dev-swiftbar.sh
  • scripts/install-swiftbar.sh
✅ Files skipped from review due to trivial changes (1)
  • README.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • scripts/install-swiftbar.sh
  • bin/agent-watch.30s.sh

📝 Walkthrough

Walkthrough

Adds a dev installer that symlinks the source plugin, refactors the release installer to download and validate the latest release asset, updates build checks and README, and wires a configurable update log into the plugin's release-updater and UI.

Changes

Dual installation modes and updater logging

Layer / File(s) Summary
Release install with download and validation
scripts/install-swiftbar.sh
Downloads the release agent-watch.30s.sh asset (configurable via AGENTWATCH_RELEASE_ASSET_URL) into a temp file with curl timeouts/retries, validates the shebang/title/version markers, makes it executable, and atomically moves it into TARGET_DIR.
Development install with symlink
scripts/install-dev-swiftbar.sh
New zsh script resolves repo path, ensures plugins dir exists, creates/updates a symlink to the source agent-watch.30s.sh, sets executable permissions, and prints confirmation.
Build validation and documentation
scripts/check.sh, README.md
check.sh adds zsh -n checks for both installers and validates AGENTWATCH_RELEASE_ASSET_URL presence; README updated to recommend install-dev-swiftbar.sh for development installs and documents AGENTWATCH_UPDATE_LOG and updater behavior.
Updater: update log and UI wiring
bin/agent-watch.30s.sh
Adds AGENTWATCH_UPDATE_LOG xbar var and UPDATE_LOG runtime variable, implements log_update/update_message, changes update_plugin_from_release() to write timestamped messages and redirect curl output into the log (or /dev/null when not writable), adds an open update-log action, and updates the update menu item to run in background (terminal=false) with a conditional "open update log" menu entry.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • flamerged/agent-watch#4: Modifies the release update flow and related installer behavior; similar area of change around release asset handling and updater logic.

Poem

🐰 I hopped through scripts and followed the log,
Created a symlink and tightened the cog.
Downloads get checked, updates write a line,
Quiet background updates—now logged and fine. 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title "fix: install release asset by default" directly aligns with the primary objective to change scripts/install-swiftbar.sh to install the latest release asset by default instead of creating a development symlink.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/release-install-scripts

Comment @coderabbitai help to get the list of available commands and usage tips.

@flamerged flamerged self-assigned this May 14, 2026
@flamerged flamerged force-pushed the fix/release-install-scripts branch from b3c9dda to 41d91ce Compare May 14, 2026 18:04
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@bin/agent-watch.30s.sh`:
- Line 21: The AGENTWATCH_UPDATE_LOG variable may contain a literal tilde from
xbar metadata; normalize it immediately after it's read by expanding any leading
"~" to the user's $HOME so all subsequent checks and file ops use a real
filesystem path. Locate where AGENTWATCH_UPDATE_LOG is set/read (symbol
AGENTWATCH_UPDATE_LOG in the script) and replace that value with a normalized
form (expand a leading tilde or otherwise resolve to $HOME) before any calls
that use it (exists checks, open/write, append operations that reference
AGENTWATCH_UPDATE_LOG).

In `@scripts/install-dev-swiftbar.sh`:
- Around line 4-11: Check that the source plugin file referenced by the PLUGIN
variable exists and is readable before creating TARGET_DIR, making the symlink,
or changing permissions; if it does not exist, print a clear error (including
the PLUGIN value) and exit non‑zero. Update the script around the
PLUGIN/TARGET_DIR/TARGET logic so the existence check (for PLUGIN) runs first,
then mkdir -p "$TARGET_DIR", ln -sf "$PLUGIN" "$TARGET", and chmod +x "$PLUGIN"
only when the check passes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d138cf79-35af-4a56-bf3e-9e80252c738c

📥 Commits

Reviewing files that changed from the base of the PR and between b3c9dda and 41d91ce.

📒 Files selected for processing (5)
  • README.md
  • bin/agent-watch.30s.sh
  • scripts/check.sh
  • scripts/install-dev-swiftbar.sh
  • scripts/install-swiftbar.sh
✅ Files skipped from review due to trivial changes (1)
  • scripts/check.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • scripts/install-swiftbar.sh

Comment thread bin/agent-watch.30s.sh
Comment thread scripts/install-dev-swiftbar.sh
@flamerged flamerged merged commit 1d8d6b6 into main May 14, 2026
4 checks passed
@flamerged flamerged deleted the fix/release-install-scripts branch May 14, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant