Skip to content

feat(core): expose dashboardBaseUrl and include session dashboardUrl in spawn responses (closes #717)#725

Open
harishkotra wants to merge 2 commits intoComposioHQ:mainfrom
harishkotra:feat/dashboard-session-url
Open

feat(core): expose dashboardBaseUrl and include session dashboardUrl in spawn responses (closes #717)#725
harishkotra wants to merge 2 commits intoComposioHQ:mainfrom
harishkotra:feat/dashboard-session-url

Conversation

@harishkotra
Copy link

@harishkotra harishkotra commented Mar 26, 2026

Expose an optional dashboardBaseUrl config option and populate session.dashboardUrl when spawning sessions so the CLI and plugins can surface a direct Dashboard link for each session.

Files Changed

types.ts: add dashboardBaseUrl to OrchestratorConfig and dashboardUrl to Session.
config.ts: validate dashboardBaseUrl in config schema.
session-manager.ts: compute and attach session.dashboardUrl during spawn flows.
spawn.ts: print Dashboard: <url> when available.
agent-orchestrator.yaml.example: document dashboardBaseUrl example.

Notes:

  • Backwards compatible: dashboardBaseUrl is optional; if unset behavior is unchanged.
  • No new tests were added (existing test suites pass; see earlier test run: core 484 / cli 224 passed).
  • Follow-up: plugin (e.g., OpenClaw) can use session.dashboardUrl to construct links - consider updating plugins to prefer that field.

Closes #717

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

if (!base) return null;
const trimmed = base.replace(/\/+$/, "");
return `${trimmed}/sessions/${encodeURIComponent(sessionId)}`;
}
Copy link

Choose a reason for hiding this comment

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

Null check is dead code due to fallback

Medium Severity

buildDashboardUrl can never return null despite its string | null return type and docstring claiming otherwise. The ?? on line 210 always provides a truthy localhost fallback when config.dashboardBaseUrl is undefined, making the if (!base) return null check on line 211 unreachable dead code. This means session.dashboardUrl is always populated, and the CLI always prints a Dashboard: line — contradicting the PR's stated goal that "if unset behavior is unchanged." If the intent was to only show a URL when dashboardBaseUrl is explicitly configured, the localhost fallback defeats that; if the intent was to always show a URL, the null guard and | null return type are misleading.

Fix in Cursor Fix in Web

if (session.dashboardUrl) {
console.log(` Dashboard: ${chalk.dim(session.dashboardUrl)}`);
console.log();
}
Copy link

Choose a reason for hiding this comment

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

Dashboard URL printed outside the session info block

Low Severity

The Dashboard: line is printed after the blank-line separator on line 138, visually orphaning it from the rest of the session info block (Worktree, Branch, PR, Attach). This produces output with two separate blocks separated by blank lines instead of one cohesive block. The Dashboard URL logically belongs with the other session details and would be better placed before the existing console.log() separator.

Fix in Cursor Fix in Web

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.

OpenClaw plugin should know how to construct session dashboard URLs

1 participant