feat(framework): live session link on the dashboard#175
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #174 (child of #165).
Surfaces a link to jump into the live Claude Code session on the dashboard.
What
session-updateFrameworkEvent: the wrapped agent's real session id is captured once the first driver turn returns (it isn't known at start, so thesessionevent 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-linknow 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.#session-linkheader slot renders either alive sessionlink (when a URL exists) or the honestsession <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 theclaude remote-controlserver process, and our driver runsclaude -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
--fakee2e:node dist/bin.js --fake --no-dashboard --session-link "https://code.example.com/s/{sessionId}"printssession fake-orders-app — https://code.example.com/s/fake-orders-app.#session-link, SSE stream carries{"kind":"session-update",...,"sessionLink":"https://code.example.com/s/fake-orders-app"}.Changeset: minor.