Skip to content

docs: refresh README + fix uninstall regex for quoted hook paths#39

Merged
hiskudin merged 2 commits into
mainfrom
chore/post-v1.6-cleanups
May 18, 2026
Merged

docs: refresh README + fix uninstall regex for quoted hook paths#39
hiskudin merged 2 commits into
mainfrom
chore/post-v1.6-cleanups

Conversation

@hiskudin

Copy link
Copy Markdown
Collaborator

Summary

Two small but real fixes bundled together.

README

Out of date in several spots after recent feature work. This pass:

  • Panel has 4 tabs now (Events / Sessions / Usage / Settings) — previously claimed 3. Cmd+1/2/3/4 shortcuts updated to match.
  • Drop the STACKNUDGE_PANEL=true opt-in line — the panel has been unconditionally installed by install.sh since the single-binary merge; this option does nothing.
  • Document the new features that shipped in the last two releases:
    • Usage tab + threshold-crossing notifications (v1.6.0)
    • Auto-update (v1.5.0+) — the click-to-update flow, including the keychain prompt on first quota poll
    • Phrase editor in Settings
    • Welcome screen with "Grant permissions" button
  • Sharpen platform support — macOS-only for panel, auto-update, quota tracking, click-to-focus, voice. Linux / Windows get audio + libnotify only. README previously implied parity.
  • Fix agent auto-detection claiminstall.sh only wires Claude Code and Cursor; Gemini CLI and Codex go through Manual setup.
  • Update Development section — single binary, not "both .app bundles". notifier/ is no longer part of the build.
  • Expand Uninstall section with a note about pulling latest first (relevant given the regex fix below) and an explicit list of what gets cleaned.

uninstall.sh — quoted-path regex bug

User reported that uninstall.sh left hook entries behind. Root cause: the stale-hook regex required the notify.sh path to be preceded by ^ or / and followed by whitespace or EOF — so quoted command strings like "$HOME/.stack-nudge/notify.sh" claude-code stop slipped through with the leading " (not /).

Fix: add " to the leading anchor and drop the trailing anchor (the leading anchor alone is precise enough to avoid false positives).

-STALE = re.compile(r"(?:^|/)\.?(?:tinynudge|stack-nudge)/notify\.sh(?:\s|$)")
+STALE = re.compile(r'(?:^|/|")\.?(?:tinynudge|stack-nudge)/notify\.sh')

Verified empirically against 10 realistic hook-command shapes:

Case Should match? Old New
/Users/me/.stack-nudge/notify.sh …
"$HOME/.stack-nudge/notify.sh" …
$HOME/.stack-nudge/notify.sh …
~/.stack-nudge/notify.sh …
"~/.stack-nudge/notify.sh" …
bash /Users/me/.tinynudge/notify.sh …
no trailing args
inside bash -c "/.../notify.sh foo"
/Users/me/legitimate-other-tool/notify.sh
/Users/me/something-stack-nudge/notify.sh

New regex catches the two previously-missed shapes; correctly preserves the two false-positive cases.

Test plan

  • On a machine where the user is seeing leftover hooks, git pull && ./uninstall.sh should remove all stack-nudge entries from ~/.claude/settings.json and ~/.cursor/hooks.json
  • No regression for users on the existing happy path (standard unquoted commands)

Out of scope (deferred)

  • In-memory cache for the Keychain OAuth token (would reduce Faisal's keychain-prompt-flood) — separate change
  • Session display-name fallback chain (Will's "which session is done?" feedback) — separate change
  • Adding ~/.gemini/ to uninstall cleanup — install.sh doesn't wire those, so no auto-cleanup needed unless users manually wired them

🤖 Generated with Claude Code

hiskudin and others added 2 commits May 18, 2026 15:01
README sync:
- Tab count is now 4 (Events / Sessions / Usage / Settings); Cmd+1-4
  shortcuts; remove the dead STACKNUDGE_PANEL=true opt-in (panel is
  always installed since the single-binary merge).
- Sharpen platform support: macOS-only for panel, auto-update, quota
  tracking, click-to-focus, voice. Linux/Windows get audio + libnotify
  only.
- Fix the agent auto-detection claim — install.sh wires Claude Code
  and Cursor; Gemini/Codex require Manual setup.
- Add new sections for Usage tab, threshold notifications, auto-update,
  phrase editor, and welcome screen.
- Update Development section to match the current single-binary layout
  (drop notifier/; update make targets that referred to "both .app
  bundles").
- Expand Uninstall section to enumerate what's actually cleaned up.

uninstall.sh:
- Loosen the stale-hook regex to match quoted commands like
  `"$HOME/.stack-nudge/notify.sh"`. Previous version required the path
  to be preceded by `^` or `/` and followed by whitespace/EOF — quoted
  forms slipped through and left orphan hooks behind. Verified against
  ten realistic command shapes: matches 8 expected, correctly skips 2
  false positives ("legitimate-other-tool" and "something-stack-nudge").

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
build.sh's signing step now resolves an identity in this order:
  1. $STACKNUDGE_SIGN_IDENTITY (env override — for CI)
  2. First "Developer ID Application" identity in the local keychain
  3. Ad-hoc (`codesign -s -`) — previous behaviour

When a real identity is used, --options runtime is added so the
bundle is notarisation-eligible. Hardened runtime is omitted from
the ad-hoc path because it imposes restrictions without any of the
benefits (notarisation requires Developer ID anyway).

For devs with a Developer ID cert in their keychain, this stabilises
the cdhash across rebuilds — TCC and Keychain ACL grants stick
across the build/install/restart cycle instead of needing to be
re-granted every time. For everyone else, behaviour is unchanged
(ad-hoc path, prompts on every cdhash change).

Note: end users installing via `./install.sh` still build locally
and still get ad-hoc signing. Stable identity for end users
requires shipping a pre-built signed bundle as a release artifact,
which is a separate CI workflow + auto-updater change.

Also: gitignore keys/ — developers may store their local cert
backups there.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hiskudin hiskudin merged commit 392012e into main May 18, 2026
4 checks passed
@hiskudin hiskudin deleted the chore/post-v1.6-cleanups branch May 18, 2026 16:18
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