feat(site/src/pages/AgentsPage): show live preview links in chat summary panel - #28512
Closed
tracyjohnsonux wants to merge 1 commit into
Closed
feat(site/src/pages/AgentsPage): show live preview links in chat summary panel#28512tracyjohnsonux wants to merge 1 commit into
tracyjohnsonux wants to merge 1 commit into
Conversation
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 chat summary panel previously had no workspace context, so any "preview link" agents wrote into the summary text was fabricated. This adds a
Preview:row to the summary panel with links derived from the workspace's live listening ports, using the sameusePortsDataqueries andportForwardURLscheme as the workspace pill's ports menu.Links render as
Storybook (6006)/Preview (8080); labels come from a small known-port map (currently only 6006 → Storybook), everything else falls back toPreview. The row hides when there is no wildcard access URL, the agent is disconnected, no ports are listening, or the chat has no attached workspace, and the ports queries do not fire in those cases.This is a frontend-only first step to validate the UX. Semantic labels ("the agent started Storybook here") need the agent to report
{port, label}through a chatd tool and a persisted field, which is a follow-up.Implementation notes
ChatSummarygains an optionalpreviewsprop and stays purely presentational.ChatSummaryPanelacceptsworkspace,workspaceAgent, andwildcardHostname; aChatSummaryWithPreviewswrapper owns theusePortsDatahook so it is only mounted whencanShowPortForwardingpasses and both workspace and agent exist.Generated by Coder Agents on behalf of @tracyjohnsonux.