Skip to content

feat(framework): live session link on the dashboard#175

Merged
suleimansh merged 1 commit into
mainfrom
suleimansh/feat/framework-session-link
Jul 3, 2026
Merged

feat(framework): live session link on the dashboard#175
suleimansh merged 1 commit into
mainfrom
suleimansh/feat/framework-session-link

Conversation

@suleimansh

Copy link
Copy Markdown
Member

Closes #174 (child of #165).

Surfaces a link to jump into the live Claude Code session on the dashboard.

What

  • New session-update FrameworkEvent: the wrapped agent's real session id is captured once the first driver turn returns (it isn't known at start, so the session event can't carry it), then streamed live to the dashboard header + terminal. Re-emitted if the id changes (each Claude Code prompt is a fresh session), keeping the link current.
  • --session-link now accepts a {sessionId} template that resolves to a real URL once the id is known. A literal URL (no placeholder) still shows immediately, as before.
  • Dashboard: a dedicated #session-link header slot renders either a live session link (when a URL exists) or the honest session <id> when only the id is known.

Why the honest version

I verified against code.claude.com/docs/en/remote-control: Remote Control does not expose a URL you can build from a session id (the URL is minted by the claude remote-control server process, and our driver runs claude -p, which isn't a Remote Control session). So rather than fabricate a URL format, this surfaces the real id and lets a real URL template in later, with no rework when one exists.

Verify

  • 48 tests green (6 new: session-update emission, template resolve, literal link, + helper/formatter unit tests). Typecheck + build clean.
  • --fake e2e: node dist/bin.js --fake --no-dashboard --session-link "https://code.example.com/s/{sessionId}" prints session fake-orders-app — https://code.example.com/s/fake-orders-app.
  • Live dashboard smoke: HTML ships #session-link, SSE stream carries {"kind":"session-update",...,"sessionLink":"https://code.example.com/s/fake-orders-app"}.

Changeset: minor.

…real session id

Capture the wrapped agent's real session id once the first driver turn
returns and stream it as a new session-update FrameworkEvent, rendered
live on the dashboard header and printed to the terminal. --session-link
now accepts a {sessionId} template that resolves once the id is known; a
literal URL still shows immediately.

Remote Control exposes no URL derivable from a session id (verified
against code.claude.com/docs/en/remote-control), so this ships the honest
version: the real id is always surfaced, and a real URL drops in via the
template later with no rework.

Closes #174
@suleimansh suleimansh added enhancement New feature or request priority: medium Worth doing, not urgent labels Jul 3, 2026
@suleimansh suleimansh self-assigned this Jul 3, 2026
@suleimansh suleimansh merged commit c4545c2 into main Jul 3, 2026
2 checks passed
@suleimansh suleimansh deleted the suleimansh/feat/framework-session-link branch July 3, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: medium Worth doing, not urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard: live session link from the agent's real session id

1 participant