Sidebar status as text + detect git HEAD changes instantly (#30)

* Sidebar status as text + detect git HEAD changes instantly

- Replace sidebar status pills with plain text + show more/less toggle
  for a cleaner, more readable sidebar layout
- Watch .git/HEAD mtime in zsh precmd to detect branch changes from
  aliases (gco), tools (gh pr checkout), etc. without waiting for the
  3s polling interval
- Fix NSImage shared instance mutation in DraggableFolderNSView by
  copying before resizing to prevent layout side-effects
- Fix set_status --tab flag being swallowed by -- stop token via
  new parseOptionsNoStop parser
- Update sidebar test to cover alias-based branch switching

* Append status text to notification body automatically

When creating notifications, include the tab's current status entries
in the notification body so users see context (e.g. git branch, ports)
alongside the notification message.

* Add screenshot to README
This commit is contained in:
Lawrence Chen 2026-02-09 14:18:33 -08:00 committed by GitHub
parent 119511f774
commit 7d6f33c143
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 255 additions and 92 deletions

View file

@ -139,9 +139,16 @@ def main() -> int:
_wait_for_git_branch(client, "main")
# Branch change should update.
client.send("git checkout -b feature/sidebar\n")
# Cover alias/non-`git ...` command paths too (regression: branch could
# stick for ~3s when switching via alias/tools like `gh pr checkout`).
client.send("alias gco='git checkout'\n")
time.sleep(0.2)
client.send("gco -b feature/sidebar\n")
_wait_for_git_branch(client, "feature/sidebar")
client.send("gco main\n")
_wait_for_git_branch(client, "main")
# Leaving the repo should clear the branch.
client.send(f"cd {other}\n")
_wait_for_state_field(client, "cwd", str(other))
@ -167,4 +174,3 @@ def main() -> int:
if __name__ == "__main__":
raise SystemExit(main())