fix(web): open artifacts outside the installed app context

This commit is contained in:
2026-10-20 20:03:41 +01:00
parent 5014c9e61f
commit 06dddb002a
13 changed files with 388 additions and 92 deletions
+6 -9
View File
@@ -2,7 +2,7 @@
// the rendered/raw diff viewer, the artifact viewer, the human-decision sheet,
// the shared cancel/retry confirm and the shared Action-failed report.
import { backChevronIcon, h, canCopyLink, canShare, copyArtifactLink, copyText, shareArtifact } from "../dom.js";
import { backChevronIcon, h, canCopyLink, canShare, copyArtifactLink, copyText, shareArtifact, artifactBrowserLinkProps } from "../dom.js";
import { changeKindTone, describeError } from "../format.js";
import { definitionDocument } from "./stageDefinition.js";
import {
@@ -663,9 +663,7 @@ function openArtifactViewer(viewable, startIndex, trigger = null) {
error.append(
h("a", {
class: "viewer-external",
href: resolved,
target: "_blank",
rel: "noreferrer",
...artifactBrowserLinkProps(resolved),
text: `Open ${name} externally`,
}),
);
@@ -752,12 +750,11 @@ function openArtifactViewer(viewable, startIndex, trigger = null) {
}
if (resolved) {
actions.append(
h("button", {
class: "viewer-action",
type: "button",
h("a", {
class: "viewer-action browser-button",
...artifactBrowserLinkProps(resolved),
"data-viewer-focus": "open",
text: "Open",
onclick: () => window.open(resolved, "_blank", "noopener,noreferrer"),
text: "Open in browser",
}),
h("button", {
class: "viewer-action",