Skip to content

Remove the local relay dashboard#1146

Merged
willwashburn merged 7 commits into
mainfrom
remove-relay-dashboard
Jun 21, 2026
Merged

Remove the local relay dashboard#1146
willwashburn merged 7 commits into
mainfrom
remove-relay-dashboard

Conversation

@willwashburn

@willwashburn willwashburn commented Jun 17, 2026

Copy link
Copy Markdown
Member

Summary

Removes the local web dashboard (relay-dashboard-server / @agent-relay/dashboard-server) and every reference/dependency on it across the CLI, supporting packages, helper scripts, and current CLI docs.

agent-relay up is now a plain broker launcher:

  • attached by default, --background to detach
  • the dashboard-only flags --no-dashboard, --port, and --foreground are gone

Changes

CLI / broker (packages/cli)

  • broker-lifecycle.ts: removed all dashboard machinery (spawning, static-asset discovery/refresh, the GitHub dashboard-ui.tar.gz download, dashboard port-fallback) and the dead "reuse broker for dashboard" branch. Added resolveBrokerBasePort() backed by AGENT_RELAY_BROKER_PORT (default 3888; broker API binds base+1). Orphan detection now keys on up minus --background instead of the removed --foreground.
  • core.ts: dropped the dashboard flags, the dashboard-binary resolver, and the unused dashboard-port findBrokerApiPort.
  • core-maintenance.ts: uninstall no longer touches dashboard assets, the relay-dashboard-server binary, or the @agent-relay/dashboard-server npm package.
  • telemetry/events.ts: dropped the dashboard / human_dashboard enum members.

Other packages: config (removed the dead localDashboardUrl / LOCAL_DASHBOARD_URL); comment fixes in harness-driver and policy.

Scripts: deleted run-dashboard.js and the stale sibling-repo test-spawn-refactor.sh; fixed removed-flag usages in ci-standalone-smoke.sh, e2e-test.sh (its --port now routes through AGENT_RELAY_BROKER_PORT, so the CI workflow keeps working), the demos, and watch-cli-tools.sh.

Tests: updated core.test.ts, broker-lifecycle.test.ts, and the e2e fleet harness for the new flag/port model.

Docs: removed the dashboard wording and the --no-dashboard/--port/--foreground rows from the current CLI docs (cli-broker-lifecycle.mdx, reference-cli.mdx, cli-overview.mdx). The 7.1.1/ snapshot (incl. relay-dashboard.mdx) is intentionally left as a historical version; generic uses of the word "dashboards" (operator consoles / API consumers) are left intact. The cloud dashboardUrl / appUrl (hosted web app) are a different concept and untouched.

Verification

  • npm run typecheck — passes (exit 0)
  • CLI test suite — 366 passed, 5 skipped

Review in cubic

The local web dashboard (relay-dashboard-server / @agent-relay/dashboard-server)
is gone. `agent-relay up` is now a plain broker launcher — attached by default,
`--background` to detach — and the dashboard-only flags (`--no-dashboard`,
`--port`, `--foreground`) are removed.

- broker-lifecycle: drop dashboard spawning, static-asset discovery/refresh,
  the GitHub dashboard-ui download, the dead reuse-broker branch, and
  dashboard-port logic. Add `AGENT_RELAY_BROKER_PORT` (resolveBrokerBasePort)
  for the broker base port; orphan detection now keys on `up` minus
  `--background` instead of the removed `--foreground`.
- core / core-maintenance: remove the dashboard flags, binary resolver, and
  uninstall handling for dashboard assets/binary/npm package.
- config: drop the unused localDashboardUrl / LOCAL_DASHBOARD_URL.
- telemetry: drop the `dashboard` / `human_dashboard` enum members.
- fleet + e2e harness: AGENT_RELAY_DASHBOARD_PORT -> AGENT_RELAY_BROKER_PORT.
- scripts: delete the dashboard launcher and the stale sibling-repo test
  script; fix removed-flag usages in CI/e2e/demo scripts.
- docs: drop dashboard wording and removed flags from the current CLI docs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 212c9448-d452-470f-a7c6-eef8e5cf3113

📥 Commits

Reviewing files that changed from the base of the PR and between ca9db68 and b5605f2.

📒 Files selected for processing (3)
  • crates/broker/src/runtime/api.rs
  • crates/broker/src/telemetry.rs
  • install.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • install.sh

📝 Walkthrough

Walkthrough

Removes the dashboard component from the CLI broker lifecycle: the up command loses its --dashboard, --port, and --foreground options, replaced by a AGENT_RELAY_BROKER_PORT-based base-port model. Related configuration interfaces, telemetry types, uninstall logic, fleet wiring, E2E harnesses, scripts, workflows, and documentation are all updated to eliminate dashboard references.

Changes

Dashboard removal from CLI broker lifecycle

Layer / File(s) Summary
Public contracts: CLI up command, UpOptions, telemetry, CloudConfig
packages/cli/src/cli/commands/core.ts, packages/cli/src/cli/lib/broker-lifecycle.ts, packages/cli/src/cli/telemetry/events.ts, packages/config/src/cloud-config.ts, packages/config/src/schemas.ts, packages/harness-driver/src/spawn-config.ts
Removes --dashboard, --port, --foreground options and help text from up command. Updates UpOptions type to remove dashboard/port/foreground fields. Narrows ActionSource, TelemetryApp, TelemetrySurface unions to remove dashboard variants. Removes localDashboardUrl from CloudConfig interface, loadConfig(), and schema. Updates JSDoc for broker HTTP API port.
Broker lifecycle: base-port resolution, startup, detection, shutdown
packages/cli/src/cli/lib/broker-lifecycle.ts
Introduces resolveBrokerBasePort() that reads AGENT_RELAY_BROKER_PORT env var (default 3888). Updates startBrokerWithPortFallback() to accept basePort and derive API port as basePort + 1 with free-port scanning. Simplifies classifyBrokerStartStage() to two-parameter form. Replaces foreground-process detection with isAttachedBrokerCliCommand(). Adds shutdownUpResources() helper. Rewires runUpCommand() branches to use base-port startup without dashboard/foreground logic.
Fleet serve and fleet E2E: base-port wiring
packages/cli/src/cli/commands/fleet.ts, tests/e2e/fleet/harness.ts, tests/e2e/fleet/fleet-e2e.test.ts
Fleet serve imports resolveBrokerBasePort() and uses it for startup. FleetNode constructor renames dashboardPort to brokerPort option and wiring from AGENT_RELAY_DASHBOARD_PORT to AGENT_RELAY_BROKER_PORT env var. Fleet E2E tests allocate brokerPort via getFreePort().
Core command tests: harness and up/background/uninstall expectations
packages/cli/src/cli/commands/core.test.ts
Updates createHarness to remove dashboard-related fields. Rewrites all up tests to use plain up or up --background (no --no-dashboard/--foreground). Validates detached-child argv, spawn parameters, orphan/reaping/readiness-failure paths, workspace-key logging, and team auto-spawn. Re-scopes uninstall --dry-run to installer bin directories.
Uninstall cleanup and broker-lifecycle tests
packages/cli/src/cli/lib/broker-lifecycle.test.ts, packages/cli/src/cli/lib/core-maintenance.ts
Updates classifyBrokerStartStage test cases to remove third boolean parameter and dashboard-port assertions. Removes relay-dashboard-server binary from ~/.local/bin and /usr/local/bin uninstall steps. Removes @agent-relay/dashboard-server npm package from uninstall list and dry-run logs.
CLI dev scripts, shell utilities, workflows
package.json, scripts/ci-standalone-smoke.sh, scripts/demos/*.sh, scripts/e2e-test.sh, scripts/watch-cli-tools.sh, scripts/test-interactive-terminal.sh, .github/workflows/e2e-tests.yml, .github/workflows/package-validation.yml
Updates package.json watch/dev scripts to use up subcommand without dashboard flags. Refactors watch-cli-tools.sh to derive PROJECT_DIR from npm config and run up instead of dashboard. Updates E2E and smoke test scripts to use AGENT_RELAY_BROKER_PORT env var and remove --port/--no-dashboard flags. Removes dashboard binary download step from e2e-tests workflow. Updates package-validation test to use broker-port env setup.
Installer, telemetry updates, and documentation
install.sh, crates/broker/src/runtime/api.rs, crates/broker/src/telemetry.rs, web/content/docs/*.mdx, .agents/skills/using-agent-relay/SKILL.md, .claude/skills/using-agent-relay/SKILL.md, packages/cli/src/cli/{bootstrap,commands/local-agent}.ts, packages/policy/src/agent-policy.ts, packages/utils/cli-registry.yaml, scripts/demos/README.md, tests/e2e/fleet/README.md, web/content/agent-relay/SKILL.md, .npmignore
Removes dashboard download functions and environment variable documentation from installer. Removes dashboard from npm and standalone binary installation paths. Updates installer quick-start to remove dashboard daemon/URL steps. Updates Rust broker telemetry ActionSource enum to remove HumanDashboard variant, mapping /api/spawn calls to HumanCli instead. Removes dashboard from CLI broker lifecycle/overview documentation and command reference. Removes dashboard from demo/skill quick-start instructions. Updates inline comments to remove dashboard references. Updates .npmignore to track run-dashboard.js.

Sequence Diagram(s)

sequenceDiagram
  participant runUpCommand
  participant resolveBrokerBasePort
  participant startBrokerWithPortFallback
  participant classifyBrokerStartStage
  
  runUpCommand->>resolveBrokerBasePort: reads AGENT_RELAY_BROKER_PORT env
  resolveBrokerBasePort-->>runUpCommand: basePort (default 3888)
  
  alt background spawn
    runUpCommand->>runUpCommand: filter argv remove --background
    runUpCommand->>runUpCommand: spawnProcess detached
  else foreground startup
    runUpCommand->>startBrokerWithPortFallback: basePort
    startBrokerWithPortFallback-->>runUpCommand: apiPort = basePort + 1 (free port scan)
    runUpCommand->>runUpCommand: log relay API URL
    runUpCommand->>runUpCommand: setup fleet sidecar best-effort
  end
  
  runUpCommand->>runUpCommand: error path
  runUpCommand->>classifyBrokerStartStage: classify failure (err, message)
  classifyBrokerStartStage-->>runUpCommand: stage label
  runUpCommand->>runUpCommand: telemetry broker_start_failed
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

  • AgentWorkforce/relay#1108: Directly modifies the same broker-lifecycle.ts broker startup/shutdown flow and startBrokerWithPortFallback signature to integrate local fleet sidecar startup.
  • AgentWorkforce/relay#1131: Updates fleet E2E harness and test configuration around node port wiring, using the same brokerPort/AGENT_RELAY_BROKER_PORT rename applied in this PR.
  • AgentWorkforce/relay#1087: Removes --no-dashboard flag from documented CLI startup commands in agent skill documentation files.

Suggested labels

no-agent-relay-review

Suggested reviewers

  • khaliqgant

Poem

🐇 Hop hop, the dashboard's gone away,
No --dashboard flag to start your day.
AGENT_RELAY_BROKER_PORT is the new refrain,
basePort + 1 keeps the API sane.
The rabbit waves goodbye to port 3888,
A simpler broker lifecycle — isn't that great! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 41.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Remove the local relay dashboard' clearly and accurately summarizes the main objective of the changeset, which is the removal of the dashboard functionality.
Description check ✅ Passed The PR description comprehensively covers the summary, detailed changes across all affected areas, and verification steps, matching the required template structure with meaningful content.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 remove-relay-dashboard

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 and usage tips.

@github-actions

Copy link
Copy Markdown
Contributor

Preview deployed!

Environment URL
Web https://d1gp7b6a86uot3.cloudfront.net

This preview will be cleaned up when the PR is merged or closed.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f8d8cb6688

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

echo "=== Smoke: standalone up ==="
UP_LOG="$TMP_ROOT/up.log"
run_cli local up --no-dashboard >"$UP_LOG" 2>&1 &
run_cli local up >"$UP_LOG" 2>&1 &

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Start the smoke broker in background mode

In this smoke path, local up now stays attached by default, but the script still backgrounds it and later does local down followed by wait "$UP_PID". down stops the broker process recorded in connection.json, not this attached CLI wrapper that is stuck in holdOpen(), so the smoke job hangs after a successful start. Use local up --background here to preserve the old detached --no-dashboard behavior.

Useful? React with 👍 / 👎.

Comment thread package.json
"build:telemetry": "npm --prefix packages/telemetry run build",
"dev:watch": "cd packages/cli && npx tsc -w",
"watch:start": "npm run build && concurrently -k \"npm run dev:watch\" \"node --watch packages/cli/dist/cli/index.js start dashboard.js claude\"",
"watch:start": "npm run build && concurrently -k \"npm run dev:watch\" \"node --watch packages/cli/dist/cli/index.js up\"",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Invoke the broker through the local command group

When npm run watch:start runs this command, Commander receives up as a top-level command, but createProgram() registers broker lifecycle commands only under local (local up, local down, etc.). The watcher therefore exits with an unknown-command error instead of starting the broker; this should call node --watch packages/cli/dist/cli/index.js local up.

Useful? React with 👍 / 👎.


// Remove standalone binaries from ~/.local/bin
for (const binaryName of ['agent-relay', 'relay-dashboard-server', 'relay-acp']) {
for (const binaryName of ['agent-relay', 'relay-acp']) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep uninstall cleaning installed dashboard binaries

For users installed by the current install.sh, the installer can still place relay-dashboard-server in the install bin directory or fall back to the global @agent-relay/dashboard-server package, but this uninstall path now removes only agent-relay and relay-acp. In those installs, agent-relay uninstall leaves the dashboard binary/package/assets behind; keep removing the dashboard artifacts until the installer and old-install migration no longer produce them.

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
scripts/watch-cli-tools.sh (1)

21-24: ⚡ Quick win

Warn on ignored flags instead of silently swallowing them.

Ignoring unknown args without feedback can hide typos and mis-invocations during local dev.

Suggested patch
     *)
-      # Other flags (e.g. --tool) are accepted for compatibility but ignored.
-      :
+      # Other flags (e.g. --tool/--port) are accepted for compatibility but ignored.
+      echo "[watch-cli-tools] Ignoring flag: $1" >&2
       ;;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/watch-cli-tools.sh` around lines 21 - 24, The default case in the
watch-cli-tools.sh script currently uses a colon (no-op) to silently ignore
unknown flags. Replace the `:` operator in the `*)` case with an echo or printf
statement that outputs a warning message to stderr (using `>&2` redirection) to
alert users when they pass unrecognized flags, helping catch typos and
mis-invocations during local development.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/cli/src/cli/lib/broker-lifecycle.ts`:
- Around line 220-223: The resolveBrokerBasePort function validates that
AGENT_RELAY_BROKER_PORT is a positive integer but lacks an upper bound check,
allowing invalid values like 65535 which would cause port allocation failures
downstream. Modify the return statement in resolveBrokerBasePort to also
validate that the parsed port does not exceed 65534 (to account for port
increments that occur later in port allocation). If the port exceeds this
maximum, return DEFAULT_BROKER_BASE_PORT or throw a configuration error with a
clear message indicating the valid port range.

In `@packages/cli/src/cli/lib/core-maintenance.ts`:
- Line 287: The uninstall process is removing cleanup logic for legacy
dashboard-era artifacts including the agent-relay and relay-acp binaries, which
will leave orphaned files for upgraded users. Retain the cleanup code for these
legacy binaries (referenced in the loop iterating over ['agent-relay',
'relay-acp'] and the related removal logic around lines 322-331) as best-effort
backward-compatible cleanup in the uninstall function, ensuring users don't end
up with orphaned global binaries after upgrading and uninstalling.

In `@scripts/e2e-test.sh`:
- Around line 154-157: The preflight cleanup block with the lsof command is only
targeting the base $BROKER_PORT, but the broker API actually binds to
$BROKER_PORT + 1. Modify the lsof command to kill processes on both ports to
ensure proper cleanup and isolation. Update the logic to kill processes on both
the base port ($BROKER_PORT) and the API port ($BROKER_PORT + 1) in the same
cleanup block.

---

Nitpick comments:
In `@scripts/watch-cli-tools.sh`:
- Around line 21-24: The default case in the watch-cli-tools.sh script currently
uses a colon (no-op) to silently ignore unknown flags. Replace the `:` operator
in the `*)` case with an echo or printf statement that outputs a warning message
to stderr (using `>&2` redirection) to alert users when they pass unrecognized
flags, helping catch typos and mis-invocations during local development.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 66bf73ad-514f-4d36-8b37-ee066f137fd4

📥 Commits

Reviewing files that changed from the base of the PR and between 217b5ea and 9015c50.

📒 Files selected for processing (28)
  • package.json
  • packages/cli/src/cli/bootstrap.test.ts
  • packages/cli/src/cli/bootstrap.ts
  • packages/cli/src/cli/commands/core.test.ts
  • packages/cli/src/cli/commands/core.ts
  • packages/cli/src/cli/commands/fleet.ts
  • packages/cli/src/cli/commands/local-agent.ts
  • packages/cli/src/cli/lib/broker-lifecycle.test.ts
  • packages/cli/src/cli/lib/broker-lifecycle.ts
  • packages/cli/src/cli/lib/core-maintenance.ts
  • packages/cli/src/cli/telemetry/events.ts
  • packages/config/src/cloud-config.ts
  • packages/config/src/schemas.ts
  • packages/harness-driver/src/spawn-config.ts
  • packages/policy/src/agent-policy.ts
  • scripts/ci-standalone-smoke.sh
  • scripts/demos/server-capacity.sh
  • scripts/demos/sprint-planning.sh
  • scripts/e2e-test.sh
  • scripts/run-dashboard.js
  • scripts/test-interactive-terminal.sh
  • scripts/test-spawn-refactor.sh
  • scripts/watch-cli-tools.sh
  • tests/e2e/fleet/fleet-e2e.test.ts
  • tests/e2e/fleet/harness.ts
  • web/content/docs/cli-broker-lifecycle.mdx
  • web/content/docs/cli-overview.mdx
  • web/content/docs/reference-cli.mdx
💤 Files with no reviewable changes (3)
  • scripts/run-dashboard.js
  • scripts/test-spawn-refactor.sh
  • packages/config/src/schemas.ts

Comment on lines +220 to +223
export function resolveBrokerBasePort(deps: Pick<CoreDependencies, 'env'>): number {
const raw = Number.parseInt(deps.env.AGENT_RELAY_BROKER_PORT ?? '', 10);
return Number.isFinite(raw) && raw > 0 ? raw : DEFAULT_BROKER_BASE_PORT;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Validate upper bound for AGENT_RELAY_BROKER_PORT to prevent impossible API port allocation.

Line 221 currently accepts any positive integer. If a user sets AGENT_RELAY_BROKER_PORT=65535, Line 234 computes 65536, and startup fails every time. Clamp to a valid base-port range (1..65534) or fail fast with a clear config error.

Suggested fix
 export function resolveBrokerBasePort(deps: Pick<CoreDependencies, 'env'>): number {
   const raw = Number.parseInt(deps.env.AGENT_RELAY_BROKER_PORT ?? '', 10);
-  return Number.isFinite(raw) && raw > 0 ? raw : DEFAULT_BROKER_BASE_PORT;
+  const maxBasePort = MAX_PORT - 1; // API binds to basePort + 1
+  return Number.isFinite(raw) && raw > 0 && raw <= maxBasePort ? raw : DEFAULT_BROKER_BASE_PORT;
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/cli/src/cli/lib/broker-lifecycle.ts` around lines 220 - 223, The
resolveBrokerBasePort function validates that AGENT_RELAY_BROKER_PORT is a
positive integer but lacks an upper bound check, allowing invalid values like
65535 which would cause port allocation failures downstream. Modify the return
statement in resolveBrokerBasePort to also validate that the parsed port does
not exceed 65534 (to account for port increments that occur later in port
allocation). If the port exceeds this maximum, return DEFAULT_BROKER_BASE_PORT
or throw a configuration error with a clear message indicating the valid port
range.


// Remove standalone binaries from ~/.local/bin
for (const binaryName of ['agent-relay', 'relay-dashboard-server', 'relay-acp']) {
for (const binaryName of ['agent-relay', 'relay-acp']) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Keep best-effort legacy dashboard cleanup in uninstall.

This removes cleanup for legacy dashboard-era artifacts, so upgraded users can be left with orphaned global binaries/packages after uninstall. Keep these removals as backward-compatible best-effort cleanup.

Suggested patch
-  for (const binaryName of ['agent-relay', 'relay-acp']) {
+  for (const binaryName of ['agent-relay', 'relay-acp', 'relay-dashboard-server']) {
@@
-    for (const pkg of ['agent-relay']) {
+    for (const pkg of ['agent-relay', '`@agent-relay/dashboard-server`']) {
@@
-    deps.log('[dry-run] Would run: npm uninstall -g agent-relay');
+    deps.log('[dry-run] Would run: npm uninstall -g agent-relay');
+    deps.log('[dry-run] Would run: npm uninstall -g `@agent-relay/dashboard-server`');

Also applies to: 322-331

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/cli/src/cli/lib/core-maintenance.ts` at line 287, The uninstall
process is removing cleanup logic for legacy dashboard-era artifacts including
the agent-relay and relay-acp binaries, which will leave orphaned files for
upgraded users. Retain the cleanup code for these legacy binaries (referenced in
the loop iterating over ['agent-relay', 'relay-acp'] and the related removal
logic around lines 322-331) as best-effort backward-compatible cleanup in the
uninstall function, ensuring users don't end up with orphaned global binaries
after upgrading and uninstalling.

Comment thread scripts/e2e-test.sh
Comment on lines +154 to 157
# Kill any process using our target port (ensures the broker can bind)
if command -v lsof &> /dev/null; then
lsof -ti:$DASHBOARD_PORT | xargs kill -9 2>/dev/null || true
lsof -ti:$BROKER_PORT | xargs kill -9 2>/dev/null || true
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Preflight cleanup is targeting the base port, not the broker API port.

With AGENT_RELAY_BROKER_PORT, the API binds from base+1; killing only $BROKER_PORT can leave stale API listeners and make E2E runs less isolated.

Suggested patch
-# Kill any process using our target port (ensures the broker can bind)
+# Kill any process using the expected broker API port (base+1)
 if command -v lsof &> /dev/null; then
-  lsof -ti:$BROKER_PORT | xargs kill -9 2>/dev/null || true
+  API_PORT=$((BROKER_PORT + 1))
+  lsof -ti:$API_PORT | xargs kill -9 2>/dev/null || true
 fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Kill any process using our target port (ensures the broker can bind)
if command -v lsof &> /dev/null; then
lsof -ti:$DASHBOARD_PORT | xargs kill -9 2>/dev/null || true
lsof -ti:$BROKER_PORT | xargs kill -9 2>/dev/null || true
fi
# Kill any process using the expected broker API port (base+1)
if command -v lsof &> /dev/null; then
API_PORT=$((BROKER_PORT + 1))
lsof -ti:$API_PORT | xargs kill -9 2>/dev/null || true
fi
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/e2e-test.sh` around lines 154 - 157, The preflight cleanup block with
the lsof command is only targeting the base $BROKER_PORT, but the broker API
actually binds to $BROKER_PORT + 1. Modify the lsof command to kill processes on
both ports to ensure proper cleanup and isolation. Update the logic to kill
processes on both the base port ($BROKER_PORT) and the API port ($BROKER_PORT +
1) in the same cleanup block.

Two CI failures on the dashboard-removal branch:

- package-validation "Build & Validate" called `local up --port`, a flag
  removed with the dashboard. Route the test's port through
  AGENT_RELAY_BROKER_PORT and start a plain `local up` instead.
- Standalone macOS Smoke crashed: `defineDefaultLocalNode is not a function`.
  bun's `--compile` resolves @agent-relay/fleet's value exports to its
  type-only .d.ts, so the implicit fleet node helpers are undefined in the
  standalone binary. This is pre-existing; it was hidden because
  `up --no-dashboard` previously ran the fleet sidecar in a detached child.
  Attached `up` surfaced it. The implicit local fleet node is best-effort, so
  wrap its startup and warn-and-continue instead of aborting the broker.

Also drop the now-dead "Download dashboard binary" step from e2e-tests.yml.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/package-validation.yml:
- Around line 196-203: The health check hardcodes the API_PORT as BROKER_PORT +
1, but the broker startup can select the next available port if that one is
occupied, causing the curl request to fail against the wrong endpoint. Instead
of assuming a fixed offset, capture the actual API port that the broker selects
by parsing the broker's startup output or having it write the port to a file,
then use that captured value in the curl health check loop. This ensures the
health check queries the correct port regardless of what the broker actually
bound to.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c4a689ff-4ed5-4b5f-87b8-71b61c1d699a

📥 Commits

Reviewing files that changed from the base of the PR and between 9015c50 and 7251862.

📒 Files selected for processing (3)
  • .github/workflows/e2e-tests.yml
  • .github/workflows/package-validation.yml
  • packages/cli/src/cli/lib/broker-lifecycle.ts
💤 Files with no reviewable changes (1)
  • .github/workflows/e2e-tests.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/cli/src/cli/lib/broker-lifecycle.ts

Comment on lines +196 to 203
API_PORT=$((BROKER_PORT + 1))
# Start the broker in background
AGENT_RELAY_BROKER_PORT="$BROKER_PORT" node packages/cli/dist/cli/index.js local up &
DAEMON_PID=$!

# Wait for health endpoint (broker API is dashboard port + 1)
# Wait for health endpoint (broker API is the base port + 1)
for i in {1..20}; do
if curl -sf "http://127.0.0.1:${API_PORT}/health" > /dev/null; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Health check hardcodes base+1 even though broker port selection can fall back

Line 196/Line 203 assume the API will always bind to BROKER_PORT + 1, but lifecycle startup may move to the next free port when that slot is occupied. This can fail CI even when the broker started successfully.

Suggested fix
           BROKER_PORT=3899
-          API_PORT=$((BROKER_PORT + 1))
+          START_API_PORT=$((BROKER_PORT + 1))
+          API_PORT=""
           # Start the broker in background
           AGENT_RELAY_BROKER_PORT="$BROKER_PORT" node packages/cli/dist/cli/index.js local up &
           DAEMON_PID=$!
 
-          # Wait for health endpoint (broker API is the base port + 1)
+          # Wait for health endpoint (API starts at base+1 and may fall back)
           for i in {1..20}; do
-            if curl -sf "http://127.0.0.1:${API_PORT}/health" > /dev/null; then
-              break
-            fi
+            for candidate in $(seq "$START_API_PORT" "$((START_API_PORT + 9))"); do
+              if curl -sf "http://127.0.0.1:${candidate}/health" > /dev/null; then
+                API_PORT="$candidate"
+                break 2
+              fi
+            done
             sleep 1
           done
 
           # Verify broker is reachable
-          if curl -sf "http://127.0.0.1:${API_PORT}/health" > /dev/null; then
+          if [ -n "$API_PORT" ] && curl -sf "http://127.0.0.1:${API_PORT}/health" > /dev/null; then
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/package-validation.yml around lines 196 - 203, The health
check hardcodes the API_PORT as BROKER_PORT + 1, but the broker startup can
select the next available port if that one is occupied, causing the curl request
to fail against the wrong endpoint. Instead of assuming a fixed offset, capture
the actual API port that the broker selects by parsing the broker's startup
output or having it write the port to a file, then use that captured value in
the curl health check loop. This ensures the health check queries the correct
port regardless of what the broker actually bound to.

# Conflicts:
#	packages/cli/src/cli/lib/broker-lifecycle.ts
#	web/content/docs/cli-overview.mdx
- install.sh: drop the dashboard-server binary download, dashboard UI
  download, `npm install -g @agent-relay/dashboard-server`, the
  AGENT_RELAY_NO_DASHBOARD env, the REPO_DASHBOARD repo, and the
  `up --dashboard` post-install help. The installer no longer installs the
  removed local dashboard.
- Fix broken `--no-dashboard` / `up --dashboard` examples in using-agent-relay
  skill docs and the demos README; rename "dashboard port" -> "broker port" in
  the fleet e2e README; drop the stale run-dashboard.js line from .npmignore.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@install.sh`:
- Around line 687-693: The quick start documentation in the echo statements
shows agent-relay up being run without background mode, which will block the
terminal and prevent the subsequent status and down commands from executing.
Update the echo statements to either add the --background flag to the
agent-relay up command (changing it to agent-relay up --background), or add a
comment in the documentation explaining that users need to open a second
terminal for the status and down commands. This ensures the quick start flow is
actually executable as documented to users.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 912f40fd-55ce-4264-bc76-d44f7c96396d

📥 Commits

Reviewing files that changed from the base of the PR and between 7251862 and ca9db68.

📒 Files selected for processing (14)
  • .agents/skills/using-agent-relay/SKILL.md
  • .claude/skills/using-agent-relay/SKILL.md
  • .npmignore
  • install.sh
  • package.json
  • packages/cli/src/cli/bootstrap.test.ts
  • packages/cli/src/cli/commands/fleet.ts
  • packages/cli/src/cli/commands/local-agent.ts
  • packages/utils/cli-registry.yaml
  • scripts/demos/README.md
  • tests/e2e/fleet/README.md
  • web/content/agent-relay/SKILL.md
  • web/content/docs/cli-overview.mdx
  • web/content/docs/reference-cli.mdx
💤 Files with no reviewable changes (1)
  • .npmignore
✅ Files skipped from review due to trivial changes (7)
  • packages/cli/src/cli/bootstrap.test.ts
  • web/content/docs/reference-cli.mdx
  • packages/utils/cli-registry.yaml
  • tests/e2e/fleet/README.md
  • web/content/docs/cli-overview.mdx
  • scripts/demos/README.md
  • packages/cli/src/cli/commands/local-agent.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • package.json
  • packages/cli/src/cli/commands/fleet.ts

Comment thread install.sh Outdated
The local dashboard is gone, and the TS `ActionSource` union already dropped
`human_dashboard`. Re-sync the Rust mirror:

- Remove the `HumanDashboard` enum variant + its `as_str` arm so the broker's
  taxonomy matches TS (`human_cli | agent | protocol`).
- Re-point the only emitter — the `/api/spawn` HTTP handler — to
  `ActionSource::HumanCli`. That endpoint's human caller is now the CLI (the
  dashboard GUI that previously posted to it is gone).
- Update the telemetry unit tests.

Shared broker infrastructure that is merely *named* "dashboard" (the `/ws` SDK
event transport, `display_target_for_dashboard`, `sender_is_dashboard_label`,
the operator "Dashboard" label) is left intact — it powers the SDK/CLI event
stream and the relaycast/Observer message path, not the removed local UI.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nable

`agent-relay up` runs attached by default, which blocks the terminal and stops
the documented `status`/`down` steps from running. Use `--background` so the
quick-start sequence is executable as printed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@willwashburn willwashburn merged commit b68f93a into main Jun 21, 2026
64 of 67 checks passed
@willwashburn willwashburn deleted the remove-relay-dashboard branch June 21, 2026 05:01
willwashburn added a commit that referenced this pull request Jun 21, 2026
Add Removed / Breaking Changes / Migration Guidance entries to [Unreleased]
for the local web dashboard removal landed in #1146: dropped `up` flags
(--no-dashboard/--port/--foreground), AGENT_RELAY_DASHBOARD_PORT ->
AGENT_RELAY_BROKER_PORT, installer no longer fetches the dashboard, and the
`human_dashboard` ActionSource is retired.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

2 participants