Skip to content

refactor(server): move agent launch into server/agent-launch.ts - #1297

Merged
devswha merged 1 commit into
mainfrom
chore/agent-launch
Oct 17, 2026
Merged

devswha merged 1 commit into
mainfrom
chore/agent-launch

Conversation

@devswha

@devswha devswha commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Change

The workspace, tab and worktree create routes can start an agent in the pane that herdr just made. The check for that request's agent field and the start itself (with its retries for a busy shell and a taken name) are a separate concern from the routes. This PR moves them out of server/index.ts with no behavior change.

  • agentFault, agentLaunch and the AgentPayload type move to server/agent-launch.ts. index.ts imports them.

Scope: the code is unchanged apart from three export keywords. expandedDirectory, claudeTempFolder and AGENT_LABELS stay in index.ts. They move later with the routes that use them. Open PR #1147 calls agentLaunch inside index.ts, and that call still compiles after a rebase, because index.ts imports the function.

Validation

  • The moved 61 lines match origin/main byte for byte, apart from the added export keywords. A script diffed them.
  • bun run check integration: the agent start paths pass. These are "shares unique agent names across concurrent tabs and preserves a tab when an explicit name collides", "starts another agent of a kind whose name is already taken" and "creates a worktree of an owned repository as a grouped workspace, lists it, and opens it again". The only failures are the three tests that also fail on an untouched main on this Mac (api.contract pane files search, hermes.contract, output.contract). 547 pass, the same count as on main.
  • bun run check fast: typecheck and build are ok, and 4,288 unit tests pass. The only failures are the known install-star, portal and plugin timing failures on this Mac. The convention tests pass.

Made with Cursor

agentFault and agentLaunch check and start the agent that a workspace, tab or worktree create request names. They move out of server/index.ts unchanged, with the AgentPayload type, and index.ts imports them.

Co-authored-by: Cursor <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 13 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 745661bf-c7d8-4d56-b98a-f64262305f37
📥 Commits

Reviewing files that changed from the base of the PR and between d4222aa and 6e53b98.

📒 Files selected for processing: 2
  • server/agent-launch.ts
  • server/index.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@devswha
devswha merged commit db33091 into main Oct 17, 2026
23 of 25 checks passed
@devswha
devswha deleted the chore/agent-launch branch October 17, 2026 19:20
@devswha

devswha commented Oct 17, 2026

Copy link
Copy Markdown
Owner Author

CodeRabbit did not review this PR: its "Review limit reached" comment means no review ran. The PR touches no take-over, observe permission, queued input, authentication, HTTP/WS contract or workflow code, so it merged on its required checks. It moves agentFault, agentLaunch and AgentPayload unchanged, apart from three export keywords.

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