Skip to content
This repository was archived by the owner on Sep 28, 2026. It is now read-only.

launcher: hand off feature popups through their workspace actions - #12

Merged
m4ttheweric merged 2 commits into
mainfrom
launcher-chain-fix
Sep 2, 2026
Merged

m4ttheweric merged 2 commits into
mainfrom
launcher-chain-fix

Conversation

@m4ttheweric

@m4ttheweric m4ttheweric commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

What

Broadcast to panes, Chat peek, and Quick send did nothing when picked from the launcher popup (prefix+C, then b/p/s or Enter). Open viewer and sign in/out kept working.

Why

The launcher dispatched those three by calling herdr plugin pane open from inside its own popup process. herdr keeps one popup per session and refuses a second with popup already open until the current popup's process has exited, so the open failed on a stderr nobody sees and the launcher exited 1. The server log shows the pair every time: launcher open ok, chained open error, launcher pane exit code 1 a millisecond later. The two entries that worked never open a popup.

How

  • src/cmd/launcher.rs: dispatch invokes the capability's workspace action via herdr plugin action invoke <id> --plugin m4ttstack.chat. herdr runs the action as its own child, outside the popup's process session, so it survives the launcher's teardown (herdr signals the whole session on popup exit, so a detached helper would not).
  • src/herdr.rs: open_popup retries the busy refusal at 50ms for up to 2s while herdr reaps the old popup; every other failure surfaces at once. New invoke_action helper. PLUGIN_ID const replaces the inline literal.
  • AGENTS.md: gotcha for chaining one popup into another.

Tests

4 new in herdr.rs (retry while closing, retry budget, no retry on other errors, invoke argv), launcher dispatch test updated to the action hand-off; 92/92 green, clippy clean, purity gate ok.

Not verified live yet: the retry window is sized from the server log (popup exit processed ~1ms after the process ends), and the popup itself needs a keypress to close. Matt, herdr plugin link this branch's checkout and press prefix+C then b to confirm.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Launcher selections now trigger workspace actions for broadcasting, peeking, and quick-sending.
    • Added support for invoking chat actions through the workspace.
  • Bug Fixes
    • Popup transitions now briefly retry when another popup is still closing, reducing failed handoffs.
    • Other popup errors continue to be reported immediately.
  • Documentation
    • Added guidance on popup handoffs and supported launcher behavior.

m4ttheweric and others added 2 commits September 1, 2026 19:03
The launcher popup dispatched broadcast, peek, and quick-send by calling herdr plugin pane open from inside its own popup process. herdr keeps one popup per session and refuses a second with popup already open until the current popup has exited, so the open failed on a stderr nobody sees and the launcher exited 1. Open viewer and sign in/out never open a popup, which is why only those worked.

The launcher now invokes the capability's workspace action through herdr plugin action invoke. herdr runs the action as its own child, outside the popup's process session, so it survives the launcher's teardown. open_popup retries the busy refusal briefly (up to 2s) while herdr reaps the old popup, and surfaces every other failure at once.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 873b03b5-b5d3-4e82-924c-1575b01f85bc

📥 Commits

Reviewing files that changed from the base of the PR and between 4ed1ed1 and 211fc08.

📒 Files selected for processing (3)
  • AGENTS.md
  • src/cmd/launcher.rs
  • src/herdr.rs

Included review availability: 2 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


📝 Walkthrough

Walkthrough

The launcher now dispatches workspace actions for feature transitions. herdr::open_popup retries transient popup-busy failures. herdr::invoke_action invokes chat plugin manifest actions. Tests cover retries and action arguments.

Changes

Popup action flow

Layer / File(s) Summary
Popup retry and action API
src/herdr.rs, AGENTS.md
open_popup retries "popup already open" failures with a fixed delay and stops after a fixed budget. invoke_action invokes chat plugin actions. Tests cover retry outcomes and invocation arguments.
Launcher action handoff
src/cmd/launcher.rs
Feature selections invoke workspace actions instead of opening feature-specific popups. Documentation and dispatch tests reflect the new flow. Formatting-only changes preserve existing rendering and assertion behavior.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 211fc

The launcher now hands feature popups through workspace actions and retries transient popup shutdown contention; no actionable merge-blocking risk remains after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant Launcher
  participant InvokeAction
  participant ChatPlugin
  Launcher->>InvokeAction: Invoke selected workspace action
  InvokeAction->>ChatPlugin: Invoke manifest action
  ChatPlugin-->>Launcher: Return action result
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: launcher feature popups now hand off through workspace actions.
Docstring Coverage ✅ Passed Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 2 files. (1 skipped: 1 …
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 2 files. (1 skipped: 1 unsupported.)

✨ 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 launcher-chain-fix

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

@m4ttheweric
m4ttheweric merged commit c4478ac into main Sep 2, 2026
2 checks passed
@m4ttheweric
m4ttheweric deleted the launcher-chain-fix branch September 2, 2026 00:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant