Repository navigation
fix(thread/github): enable "Visit preview" in publish modal for hosted sandboxes - #5164
Merged
Merged
Conversation
…d sandboxes The publish modal's "Visit preview" button read previewUrl from the raw `vm.metadata.sandboxMap`. Since the shared-staging change (#5132), GitHub threads run on the hosted `agent-sandbox` provider, whose previewUrl is persisted in `agentSandboxSessions` (not the vMCP sandboxMap), so the lookup always returned null and the button stayed disabled. Read previewUrl from `useSandboxLifecycle()` instead — the same overlay the preview drawer uses, which merges the agent-sandbox session into the branch map. HeaderActions already renders inside SandboxLifecycleProvider. Also relabel the pt-br string to "Visitar o Preview". Co-Authored-By: Claude Opus 4.8 <[email protected]>
Co-Authored-By: Claude Opus 4.8 <[email protected]>
decocms Bot
pushed a commit
that referenced
this pull request
Jul 24, 2026
PR: #5164 fix(thread/github): enable "Visit preview" in publish modal for hosted sandboxes Bump type: patch - decocms (apps/mesh/package.json): 4.122.2 -> 4.122.3 Deploy-Scope: web
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.
Summary
The publish modal's "Visit preview" button was permanently disabled.
Root cause: since #5132 (
feat(sandbox): use shared staging branch), GitHub-backed threads run on the hostedagent-sandboxprovider. That provider persists itspreviewUrlin theagentSandboxSessionstable (viasharedStart.completeStart), not invm.metadata.sandboxMap— theelsebranch instart.tsthat writes to the sandboxMap only runs for non-hosted providers.header-actions.tsx(which feedspreviewUrlinto the publish dialog) still read from the rawvm.metadata.sandboxMap, so the lookup always returnednulland the button stayeddisabled.The preview drawer/tab never broke because it reads from
useSandboxLifecycle(), which overlays theagentSandboxSessiononto the branch map (agent-shell-layout/index.tsx). The header didn't use that path.Changes
header-actions.tsx: readpreviewUrlfromuseSandboxLifecycle()instead of recomputing it from the raw vMCP sandboxMap.HeaderActionsalready renders insideSandboxLifecycleProvider(viaVmEventsBridge → DesktopTaskWorkspace → WorkspacePanelGroup → VirtualMcpHeaderInfo), and it returns the same URL the preview drawer uses. Removed the now-orphanedparseBranchMapimport.thread.publishDialog.visitPreview→ "Visitar o Preview".Testing
bun run fmt✅bun run --cwd=apps/mesh check(tsc) ✅🤖 Generated with Claude Code
Summary by cubic
Enables the "Visit preview" button in the publish modal for GitHub threads on hosted sandboxes by reading
previewUrlfromuseSandboxLifecycle()instead ofvm.metadata.sandboxMap. Aligns the header with the preview drawer and restores the button foragent-sandboxsessions.previewUrlfromuseSandboxLifecycle()inheader-actions.tsx; removeparseBranchMap.thread.publishDialog.visitPreviewto "Abrir o Preview".Written for commit 74a07b9. Summary will update on new commits.