fix(web): truncate preview host label when no page name is resolved#4486
Merged
Conversation
The preview address bar rendered the host fallback (previewLabel) in a `shrink-0` span, so a long sandbox host was clipped mid-string by the container instead of truncating with an ellipsis. It also still rendered the separate route-path span, whose competing `flex-1` stole half the bar and forced the host to truncate far too early (plus a redundant trailing `/`, since previewLabel already includes the path). Now the label span truncates (`min-w-0 flex-1 truncate`) in the no-page-name case and keeps `shrink-0` when a real page name is shown, and the route-path span only renders when there's an actual page name. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# Conflicts: # apps/mesh/src/web/components/sandbox/preview/preview.tsx
decocms Bot
pushed a commit
that referenced
this pull request
Jul 13, 2026
PR: #4486 fix(web): truncate preview host label when no page name is resolved Bump type: patch - decocms (apps/mesh/package.json): 4.12.1 -> 4.12.2 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
Fixes the preview address bar clipping the sandbox host URL when no page name is resolved.
previewLabel) was rendered in ashrink-0span, so a long sandbox host was cut off mid-string by the container'soverflow-hiddeninstead of truncating with an ellipsis.flex-1stole half the bar's width, forcing the host to truncate far too early — plus a redundant trailing/, sincepreviewLabelalready includes the path.min-w-0 flex-1 truncate) when there's no page name and keepsshrink-0when a real page name is shown; the route-path span only renders when there's an actual page name.Testing
bun run fmtclean./.Affected areas
apps/mesh/src/web/components/sandbox/preview/preview.tsx(preview address bar only).🤖 Generated with Claude Code
Summary by cubic
Fixes the preview address bar so the sandbox host truncates correctly when no page name is resolved. The host now fills the bar and shows an ellipsis at the edge, with no extra slash.
min-w-0 flex-1 truncate) when there’s no page name, and staysshrink-0when a real page name exists./.Written for commit 17b3262. Summary will update on new commits.