Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(site/src/pages/AgentsPage): show live preview links in chat summary panel - #28512

Closed
tracyjohnsonux wants to merge 1 commit into
mainfrom
tracy/summary-preview-links
Closed

feat(site/src/pages/AgentsPage): show live preview links in chat summary panel#28512
tracyjohnsonux wants to merge 1 commit into
mainfrom
tracy/summary-preview-links

Conversation

@tracyjohnsonux

Copy link
Copy Markdown
Contributor

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 same usePortsData queries and portForwardURL scheme 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 to Preview. 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
  • ChatSummary gains an optional previews prop and stays purely presentational.
  • ChatSummaryPanel accepts workspace, workspaceAgent, and wildcardHostname; a ChatSummaryWithPreviews wrapper owns the usePortsData hook so it is only mounted when canShowPortForwarding passes and both workspace and agent exist.
  • Ports refresh on the same 5s cadence and query keys as the workspace pill, so the two stay consistent.
  • Storybook stories cover: links rendered with correct port-forward hrefs, no row without a wildcard host (and no port queries fired), and the empty-previews case.

Generated by Coder Agents on behalf of @tracyjohnsonux.

@tracyjohnsonux tracyjohnsonux added the experimental Changes that might not necessarily be merged, until its approved to proceed with. label Sep 10, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

experimental Changes that might not necessarily be merged, until its approved to proceed with.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant