You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(harness): add local preview capability preflight #5234
Add local preview capability discovery and preflight. Report GUI availability, supported URL schemes, filesystem visibility and browser reachability with verified, unsupported or unknown results. Do not infer shared localhost or sandbox isolation from a failed connection alone. Return actionable Artifact alternatives. Acceptance: covered supported, unsupported and unknown paths; failure guidance explains the boundary; readiness claims require evidence. Relates to #5213.
Observed browser/tool errors: navigating a local URL returned . The session also attempted a shell-started localhost server, but the later curl check was connection refused. These are observations from one environment; the issue must test and classify supported, unsupported, and unknown capability states instead of assuming a single sandbox cause.
Observed browser error: navigating a local file URL returned Desktop Browser admission requires an HTTP origin. The shell localhost workaround also failed a later connection check. These are observations from one environment; capability classification must distinguish supported, unsupported, and unknown rather than assume one sandbox cause.
The observations behind this issue came from a session where local file:// navigation was rejected and a shell-started localhost server was unreachable. Since then #5213 and #5238 have both closed as completed, and managed HTML artifact previews are served over a loopback HTTP endpoint (#5316, 512605fd10f1cef0a9f65c1605c15eb5e2cf31fb). Could you re-measure on current main and say which capability states are still unverifiable through that endpoint? Without that, a separate preflight path risks duplicating discovery for a case that is already covered.
Thank you — this was the right thing to ask, and re-measuring changed what this issue should say about itself rather than just confirming it.
I re-measured on current main (5b9db1ce8), reading ManagedArtifactPreview.prepare as it now stands.
What the managed endpoint does cover. It is stronger than a listening socket: after binding, it issues a HEAD against the exact authorized route and only returns reachable: true on a 200 whose content-length matches the bytes it holds. For the endpoint it just created, that is genuine reachability evidence, and #5235 correctly owns the loaded half.
What stays unverifiable through it. The overlap with this issue is one axis — "is there a loopback endpoint that answers" — and only for its own endpoint. It cannot report:
GUI availability.prepare never consults the browser view host. In a runtime with no GUI at all it still succeeds and hands back a URL nothing can display. This is the sharpest case: its success is not evidence that a preview can be shown.
View reachability. Whether this conversation's embedded view will accept an action right now is a visible-lease question nothing in that path asks.
URL-scheme policy. Why file:// fails, and that the failure is a deliberate boundary rather than a defect, is still discovered only by attempting it.
Filesystem visibility. The managed path serves HTML from memory, but Save As and Show in Folder still materialize into the staging root, and nothing reports whether that round-trips.
Three-state classification at all.prepare reports failure by throwing; there is no unknown, and Preview endpoint health check failed does not distinguish a slow start from a wrong route from an isolated namespace. That distinction is the whole point of this issue, and it cannot be recovered from an exception.
So the preflight is not duplicate discovery: it answers before an artifact exists and before anything is attempted, which is when the caller is deciding what to try, whereas the managed endpoint answers about one already-created endpoint and only in success-or-throw form.
The open PR (#5254) now reflects this. surface — can this client display a page at all — is reported separately from endpoint, which is not_checked rather than negative when no origin was supplied, and the ArtifactPreview handoff is what an unready report points at, carrying that tool's own caveat that reachable is a Desktop-side check and not a browser load. The PR body documents this relationship directly.
If you still read the remaining axes as better served by extending the managed endpoint than by a separate preflight, I would rather settle that now than after review.
Activity
liugddx commentedon Sep 12, 2026
Observed browser/tool errors: navigating a local URL returned . The session also attempted a shell-started localhost server, but the later curl check was connection refused. These are observations from one environment; the issue must test and classify supported, unsupported, and unknown capability states instead of assuming a single sandbox cause.
liugddx commentedon Sep 12, 2026
Observed browser error: navigating a local file URL returned Desktop Browser admission requires an HTTP origin. The shell localhost workaround also failed a later connection check. These are observations from one environment; capability classification must distinguish supported, unsupported, and unknown rather than assume one sandbox cause.
ying-hua commentedon Sep 13, 2026
take
Astro-Han commentedon Sep 17, 2026
The observations behind this issue came from a session where local
file://navigation was rejected and a shell-started localhost server was unreachable. Since then #5213 and #5238 have both closed as completed, and managed HTML artifact previews are served over a loopback HTTP endpoint (#5316,512605fd10f1cef0a9f65c1605c15eb5e2cf31fb). Could you re-measure on currentmainand say which capability states are still unverifiable through that endpoint? Without that, a separate preflight path risks duplicating discovery for a case that is already covered.ying-hua commentedon Sep 18, 2026
Thank you — this was the right thing to ask, and re-measuring changed what this issue should say about itself rather than just confirming it.
I re-measured on current
main(5b9db1ce8), readingManagedArtifactPreview.prepareas it now stands.What the managed endpoint does cover. It is stronger than a listening socket: after binding, it issues a
HEADagainst the exact authorized route and only returnsreachable: trueon a 200 whosecontent-lengthmatches the bytes it holds. For the endpoint it just created, that is genuine reachability evidence, and #5235 correctly owns theloadedhalf.What stays unverifiable through it. The overlap with this issue is one axis — "is there a loopback endpoint that answers" — and only for its own endpoint. It cannot report:
preparenever consults the browser view host. In a runtime with no GUI at all it still succeeds and hands back a URL nothing can display. This is the sharpest case: its success is not evidence that a preview can be shown.file://fails, and that the failure is a deliberate boundary rather than a defect, is still discovered only by attempting it.preparereports failure by throwing; there is nounknown, andPreview endpoint health check faileddoes not distinguish a slow start from a wrong route from an isolated namespace. That distinction is the whole point of this issue, and it cannot be recovered from an exception.So the preflight is not duplicate discovery: it answers before an artifact exists and before anything is attempted, which is when the caller is deciding what to try, whereas the managed endpoint answers about one already-created endpoint and only in success-or-throw form.
The open PR (#5254) now reflects this.
surface— can this client display a page at all — is reported separately fromendpoint, which isnot_checkedrather than negative when no origin was supplied, and theArtifactPreviewhandoff is what an unready report points at, carrying that tool's own caveat thatreachableis a Desktop-side check and not a browser load. The PR body documents this relationship directly.If you still read the remaining axes as better served by extending the managed endpoint than by a separate preflight, I would rather settle that now than after review.