feat: bridge herdr-gh and herdr-pomodoro, and show Focus in the sidebar #2

Merged
jwarykowski merged 2 commits from feat/bridges into main 2026-10-18 01:10:07 +00:00
Owner

Phase 2 of the herdr-keybars plan: bridges to herdr-gh and herdr-pomodoro.

  • setup action (bin/setup):
    • installs rules/herdr.keybars, a rule pack, with keybars-pro market install;
    • writes a bridge hook into each plugin's hooks/ folder, if that plugin is installed. A hook you already have there is kept, and setup says which. A second run is harmless.
    • remove-bridges takes out only its own hooks.
  • bridge (bin/bridge):
    • herdr-gh's ci.*, review.* and pr.* events become keybars-pro notify events with the repo and branch;
    • failing CI marks the workspace, so the watcher holds its number key red when no agent state is showing;
    • a pomodoro start or stop starts or stops keybars Pro's Focus at the round's length. HERDR_KEYBARS_POMODORO=events or off changes that.
  • Watcher: reports $focus (🎯12m, ☕3m) to every workspace's sidebar.
  • focus action: starts or stops Focus.

Hooks run with the calling plugin's directories, so each hook setup writes passes herdr-keybars' own state and config paths to the bridge. A test checks this.

Tested with make check: shellcheck, the extended watch_test, and a new bridge_test for the bridge, setup, hooks you made, a generated hook run end to end, and remove. herdr's plugin list and config-dir output was checked against a real install. I haven't run setup on your machine, since it would change herdr-gh's hooks.

Update: using keybars Pro's names. herdr-gh and herdr-pomodoro now name their events as keybars Pro does (herdr-gh#6, herdr-pomodoro#6). So the bridge forwards them unchanged:

  • herdr-gh's go out with -source github, which needs keybars-pro#48;
  • herdr-pomodoro's are focus.*.

The plugin's own rule pack is gone; setup installs the marketplace's github-ci-pack, review-nudges and merge-confetti instead. Also fixed: setup could miss an installed plugin, because grep -q under pipefail can count herdr's SIGPIPE as a failure. The bridge test passed 15 runs in a row after the fix.

Phase 2 of the herdr-keybars plan: bridges to herdr-gh and herdr-pomodoro. - **setup action** (`bin/setup`): - installs `rules/herdr.keybars`, a rule pack, with `keybars-pro market install`; - writes a bridge hook into each plugin's `hooks/` folder, if that plugin is installed. A hook you already have there is kept, and setup says which. A second run is harmless. - `remove-bridges` takes out only its own hooks. - **bridge** (`bin/bridge`): - herdr-gh's `ci.*`, `review.*` and `pr.*` events become `keybars-pro notify` events with the repo and branch; - failing CI marks the workspace, so the watcher holds its number key red when no agent state is showing; - a pomodoro start or stop starts or stops keybars Pro's Focus at the round's length. `HERDR_KEYBARS_POMODORO=events` or `off` changes that. - **Watcher:** reports `$focus` (`🎯12m`, `☕3m`) to every workspace's sidebar. - **focus action:** starts or stops Focus. Hooks run with the calling plugin's directories, so each hook setup writes passes herdr-keybars' own state and config paths to the bridge. A test checks this. Tested with `make check`: shellcheck, the extended `watch_test`, and a new `bridge_test` for the bridge, setup, hooks you made, a generated hook run end to end, and remove. herdr's `plugin list` and `config-dir` output was checked against a real install. I haven't run setup on your machine, since it would change herdr-gh's hooks. **Update: using keybars Pro's names.** herdr-gh and herdr-pomodoro now name their events as keybars Pro does (herdr-gh#6, herdr-pomodoro#6). So the bridge forwards them unchanged: - herdr-gh's go out with `-source github`, which needs keybars-pro#48; - herdr-pomodoro's are `focus.*`. The plugin's own rule pack is gone; setup installs the marketplace's `github-ci-pack`, `review-nudges` and `merge-confetti` instead. Also fixed: setup could miss an installed plugin, because `grep -q` under `pipefail` can count herdr's SIGPIPE as a failure. The bridge test passed 15 runs in a row after the fix.
A setup action installs a keybars rule pack and links a bridge into
herdr-gh's and herdr-pomodoro's hooks, leaving hooks you made alone. CI,
review and merge events reach keybars Pro's Notify with their repo and
branch, failing CI holds the workspace's number key red, and a pomodoro
round starts and stops keybars Pro's Focus. The watcher reports Focus as
$focus in the sidebar, and a focus action starts or stops it.
Both plugins now name their events as keybars Pro does, so the bridge
forwards them unchanged: herdr-gh's as GitHub's (notify -source github),
which the marketplace's GitHub packs play, and herdr-pomodoro's focus.*
to keybars Pro's Focus. setup installs github-ci-pack, review-nudges and
merge-confetti in place of a pack of its own, and reads herdr's plugin
list whole, as grep -q under pipefail could miss an installed plugin.
jwarykowski deleted branch feat/bridges 2026-10-18 01:10:08 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jwarykowski/herdr-keybars!2
No description provided.