Repository navigation
fix(local): Open the linked session from a session's viewer link - #2482
Merged
Merged
Conversation
The "View events at" link for a daemon session pointed at the daemon's plain /stream, so the viewer opened whichever session came first. Session output now adds the session ID as a `session` query parameter, and the viewer selects that session from the daemon's directory, falling back to the first one when it is not listed. The link still carries no capability, and the viewer strips `session` from the address bar with `url`. Co-Authored-By: Aditya Mathur <57684218+MathurAditya724@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
When a viewer link names a session the daemon no longer lists, the viewer now shows "Session not found, showing <label>" instead of quietly opening another session. Also cover the `serve --session` viewer link in tests, name the run viewer stream once, and note in the docs that the viewer host can see the session ID, which is not a credential.
A retry or Connect to the daemon's /stream after the first attempt failed cleared the linked session ID, so the viewer opened the first session instead. Only a connection to another target now uses the ID up.
MathurAditya724
approved these changes
Nov 24, 2026
MathurAditya724
left a comment
Member
There was a problem hiding this comment.
Reviewed exact head 1e32cf3 against main including #2480 and #2481. No actionable findings. Typecheck, lint and full workspace tests passed. Independent headless Chrome QA drove the real viewer and real loopback receiver at 1280px and 390px: a public link selected the second session rather than the first; reload retained selection; connection query parameters were consumed; a missing session ID displayed the named fallback notice and opened the first session. Confirmed the public link contains no capability and reviewed the mobile screenshot. Existing integration tests also cover initial stream failure and retry.
7 tasks done
This branch was successfully deployed
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.
The "View events at" link for a daemon session only pointed at the daemon, so the viewer opened whichever session happened to be first, not the one you just started.
Session output (
run --session,serve --session,session create/view) now adds the session ID to the link, and the viewer picks that session when it finds it in the daemon's session list. If the ID isn't there anymore, the viewer opens the first session like before and shows "Session not found, showing " so it's not a silent switch. The link still has no capability in it. The viewer host can see the session ID, but that's not a credential. The viewer dropssessionfrom the address bar along withurl.Before:
After:
Pasting a raw session stream URL with its
?cap=into?url=is still refused, same as today. Capabilities shouldn't go in a query string, so that path stays closed.via @MathurAditya724.
--
View Session [Sentry]