Files
bubble/.claude/hooks/reinstall-if-stale.sh
trav 8c84feaa91 v0.2.0: bubble for Android 0.2.0 — chat search, swipe for unread, faster chat opening
Desktop:
- Search lists chats whose own name matches first, so a named group
  isn't pushed out of the top 8 by chats that merely include a member.

Android (Rabbit R1) app, 0.2.0:
- Pull the chat list past its top for a search box (name, person,
  number, then group members; archived chats too; Back clears it).
- Swipe right to left marks a chat unread / read over a magenta band;
  left to right still archives (SwipeActions replaces SwipeArchive).
- Google Voice chats don't offer voice notes in the paperclip bubble.
- Chats open with their newest 60 messages, then the full history;
  marking read (and the Google Voice network call) waits until they're
  on screen. Cached pictures show at once, and one slow download no
  longer blocks the other images. Fixed a contacts reload race.
- Sandbox data gains filler chats, a named group and a 4,000-message chat.

Also: the Android app, Google Voice support, media, export, emoji and
the other work since the first commit, and a CLAUDE.md carrying the
privacy rule.
2026-11-06 02:19:56 -08:00

25 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Claude Code Stop hook: when app sources are newer than the installed
# AppImage, rebuild and reinstall it so the desktop launcher runs the latest code.
set -uo pipefail
cd "$(dirname "$0")/../.."
# Set when Claude is already continuing because of this hook; don't loop.
retry=$(jq -r '.stop_hook_active // false' 2>/dev/null || echo false)
bin="$HOME/.local/bin/voipms-desktop.AppImage"
changed=$(find src resources package.json electron.vite.config.ts -newer "$bin" -type f -print -quit 2>/dev/null)
[ -f "$bin" ] && [ -z "$changed" ] && exit 0
log=$(mktemp -t voipms-install.XXXXXX.log)
if npm run install-desktop >"$log" 2>&1; then
msg="Rebuilt and reinstalled bubble. Quit and reopen the app to use the new version."
if pgrep -f "$bin" >/dev/null; then msg="$msg (It's running now, so restart it.)"; fi
printf '{"systemMessage": "%s"}\n' "$msg"
else
# Exit 2 hands the error back to Claude so it can fix the build.
echo "Automatic rebuild (npm run install-desktop) failed; log: $log" >&2
tail -30 "$log" >&2
[ "$retry" = true ] && exit 1
exit 2
fi