// The run artifacts' view preference: a gallery of tiles (the default) or a // compact list. It belongs to the operator, not the run, so it survives reloads. export const ARTIFACT_VIEW_KEY = "pipelines.web.artifactView.v1"; export function readArtifactView(storage = globalThis.localStorage) { try { return storage?.getItem(ARTIFACT_VIEW_KEY) === "list" ? "list" : "gallery"; } catch { return "gallery"; } } export function writeArtifactView(value, storage = globalThis.localStorage) { try { storage?.setItem(ARTIFACT_VIEW_KEY, value === "list" ? "list" : "gallery"); } catch { // Storage may be unavailable; the in-memory choice still applies. } }