Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
8dcf12f
style(chooser): nudge brand beam anchor for chooser background
MaanilVerma May 24, 2026
2eb8562
style(modal): blur BaseModal overlay backdrop
MaanilVerma May 24, 2026
a2c10d3
refactor(terms): render legal modal on BaseModal
MaanilVerma May 24, 2026
e159678
style(why-cloud): match modal overlay blur treatment
MaanilVerma May 24, 2026
b3ddac4
style(brand): size first-use checkboxes consistently
MaanilVerma May 24, 2026
31dadb8
feat(choice-card): add selectable radio variant
MaanilVerma May 24, 2026
7ef922a
chore(i18n): refresh first-use merged start strings
MaanilVerma May 24, 2026
f8794e2
refactor(panel): narrow openFirstUseTakeover initial step union
MaanilVerma May 24, 2026
ba32f2d
refactor(panel): align first-use chain reopen typing
MaanilVerma May 24, 2026
5619823
feat(first-use): merge consent + cloud/local fork into one start step
MaanilVerma May 24, 2026
7d99b0b
test(first-use): cover merged start checkbox + tooltip stubs
MaanilVerma May 24, 2026
9cb7d8e
fix(title-bar): hide install/app update pills when chrome is locked
MaanilVerma May 24, 2026
c17b06c
feat(tooltip): add placement-aware resolver with legacy overload
MaanilVerma May 24, 2026
5a45a3c
feat(ui): add position-aware Tooltip primitive
MaanilVerma May 24, 2026
1944928
refactor(tooltip): forward TooltipWrap to ui Tooltip
MaanilVerma May 24, 2026
2e91bb8
refactor(info-tooltip): compose shared Tooltip primitive
MaanilVerma May 24, 2026
401547f
fix(progress): seed operation before progress overlay mounts
MaanilVerma May 24, 2026
8cbcb6c
feat(first-use-chain): standalone express install shortcut
MaanilVerma May 24, 2026
4713744
chore(i18n): busy copy for merged first-use Continue
MaanilVerma May 24, 2026
6408280
feat(first-use): wire express branching and Continue busy state
MaanilVerma May 24, 2026
d8694ec
test(first-use): cover express vs legacy fork and Tooltip mock updates
MaanilVerma May 24, 2026
d27e5d0
feat(css): tooltip surface tokens and z-index
MaanilVerma May 24, 2026
56cf382
fix(tooltip): reposition on capture scroll resize and unify API
MaanilVerma May 24, 2026
ac41206
feat(ui): improve Tooltip accessibility and token styling
MaanilVerma May 24, 2026
36f306e
feat(modal): make backdrop-filter blur opt-in
MaanilVerma May 24, 2026
a1d70d1
style(why-cloud): soften modal overlay backdrop blur strength
MaanilVerma May 24, 2026
16471f8
fix(terms): tie BaseModal lifecycle to parent open binding
MaanilVerma May 24, 2026
b6d16dd
a11y(choice-card): roving tabindex on selectable radios
MaanilVerma May 24, 2026
988caad
a11y(brand-layout): takeover dialog chrome and focus bootstrap
MaanilVerma May 24, 2026
53f1168
a11y(first-use): radiogroup arrow keys + terms modal open binding
MaanilVerma May 24, 2026
df73fd7
test(first-use): remove unused ComfyWordmark mock stub
MaanilVerma May 24, 2026
d3ac98c
refactor(select): retire BaseSelect brand variant
MaanilVerma May 24, 2026
08a5636
refactor(settings): share ArgsRawInput for launch-args field
MaanilVerma May 24, 2026
e8022af
feat(settings): improve env-vars table remove affordances
MaanilVerma May 24, 2026
ea99866
feat(instance-picker): show terse last-launched recency on rows
MaanilVerma May 24, 2026
4dc8bc2
style(ui): sync chips and takeover tiles to chooser surface tokens
MaanilVerma May 24, 2026
a1afaba
refactor(instance-picker): remove compact/expanded mode split
MaanilVerma May 24, 2026
3b592be
refactor(settings): channel strip, status facts, and snapshot cards
MaanilVerma May 24, 2026
4469ac8
fix(git): drop redundant venv editable row from install facts
MaanilVerma May 24, 2026
c6cee61
a11y(info-tooltip): label help trigger for screen readers
MaanilVerma May 24, 2026
adbe46a
Revert "fix(git): drop redundant venv editable row from install facts"
MaanilVerma May 24, 2026
2e87804
feat(instance-picker): default to first install on install-less host
MaanilVerma May 25, 2026
9d03688
refactor(global-settings): desktop-only layout and split snapshot buc…
MaanilVerma May 25, 2026
5d79749
fix(downloads-modal): contextual filter pills and softer panel overlay
MaanilVerma May 25, 2026
3abd723
fix: remove redundant styling
MaanilVerma May 25, 2026
0c959db
fix: add border to triangle slanting edges
MaanilVerma May 25, 2026
4d86a02
feat(env-vars): encrypt at rest and mask sensitive value fields
MaanilVerma May 25, 2026
04a35b9
fix(chooser): widen grid for four tiles and ellipsize long names
MaanilVerma May 25, 2026
74a0094
fix(chooser): group untrack and delete under one menu separator
MaanilVerma May 25, 2026
5190e9e
Merge branch 'main' into fix/polishing-ui-flows
MaanilVerma May 25, 2026
5728214
fix(settings): trigger check-update after updateChannel change
MaanilVerma May 25, 2026
d41068c
feat(settings): inline action busy state and channel picker polish
MaanilVerma May 25, 2026
6b36fb9
fix(copy): capitalize "Just now" in last-launched labels
MaanilVerma May 25, 2026
9c2ee0e
fix(first-use): show express-install checkbox only for Local pick
MaanilVerma May 25, 2026
2490097
feat(ui): floor minimum busy feedback for quick async actions
MaanilVerma May 25, 2026
9fb4146
fix(first-use): consent strip layout and ToS nudge on Continue
MaanilVerma May 25, 2026
e3be888
feat(progress): chainSpan plumbing for install→launch unified bar
MaanilVerma May 25, 2026
9ec71b1
feat(progress): unified bar, launch stepper, and substatus polish
MaanilVerma May 25, 2026
aae85ef
refactor(env-vars): remove safeStorage at-rest encryption
MaanilVerma May 26, 2026
d4433d4
feat(first-use): show detected GPU hint under express install
MaanilVerma May 26, 2026
ffadc5d
feat(choice-card): add desc-trailing slot and label layout hooks
MaanilVerma May 26, 2026
270f47a
feat(first-use): Quick vs Configure tabs with GPU-aware local copy
MaanilVerma May 26, 2026
b5eaa9e
feat(global-settings): polish models dir list and remove confirmation
MaanilVerma May 26, 2026
8ae5e58
feat(settings): inline snapshot diff from previous
MaanilVerma May 26, 2026
fdb9d52
fix(settings): cap snapshot diff scroll and flatten panel surface
MaanilVerma May 26, 2026
b3db422
Merge branch 'main' into fix/polishing-ui-flows
MaanilVerma May 26, 2026
713250a
fix: remove unused props
MaanilVerma May 26, 2026
1780f37
Merge branch 'main' into fix/polishing-ui-flows
MaanilVerma May 26, 2026
2135095
Merge branch 'main' into fix/polishing-ui-flows
MaanilVerma May 26, 2026
5f030e8
feat(ui): add useDialogs with BasePrompt, BaseActionSheet, and BaseAlert
MaanilVerma May 26, 2026
4d02a39
refactor(ui): migrate settings and launch guards to useDialogs
MaanilVerma May 26, 2026
ec37dfd
Merge branch 'fix/polishing-ui-flows' of https://github.com/MaanilVer…
MaanilVerma May 26, 2026
30c55e7
fix(instance-picker): set picker root background to modal surface
MaanilVerma May 26, 2026
fa647a8
fix(actions): rename Untrack to Forget and Delete to Uninstall
MaanilVerma May 26, 2026
54d6dba
feat(title-popup): trim install-host menu and add Exit Window
MaanilVerma May 26, 2026
bcdbf28
feat(instance-picker): add Current pill, update dot, and Home escape
MaanilVerma May 26, 2026
f300413
refactor(settings): reorder tabs and rename Startup Args / About
MaanilVerma May 26, 2026
a5ab06c
fix(settings): show install footprint and start-truncate paths on About
MaanilVerma May 26, 2026
415d25e
fix(settings): preserve partial env-var rows and simplify security no…
MaanilVerma May 26, 2026
6079483
feat(settings): mark launch fields as requiresRestart
MaanilVerma May 26, 2026
9cf6702
feat(settings): track pending restart fields with optimistic updates
MaanilVerma May 26, 2026
e8cf5b6
fix(ui): brighten danger token and align menu hover states
MaanilVerma May 26, 2026
867f030
fix: add zoom reset in chooser host
MaanilVerma May 26, 2026
db77285
refactor(sources): move useSharedPaths into Storage tab section
MaanilVerma May 26, 2026
e10ad81
feat(settings): add Storage tab to instance picker
MaanilVerma May 26, 2026
d89af12
fix(models): pulse highlight when promoting dir to primary
MaanilVerma May 26, 2026
74b9d59
refactor(first-use): replace Quick/Configure tabs with Express checkbox
MaanilVerma May 26, 2026
e27e2dd
feat(progress): chainSpan plumbing for install→launch unified bar
MaanilVerma May 25, 2026
1afde66
feat(progress): unified bar, launch stepper, and substatus polish
MaanilVerma May 25, 2026
14dccd5
Merge branch 'fxi/progress-bar-unification' of https://github.com/Maa…
MaanilVerma May 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 52 additions & 18 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"menuMigrate": "Migrate to Standalone…",
"menuRestoreSnapshot": "Restore Snapshot…",
"menuRevealInFolder": "Open Folder",
"menuDelete": "Delete…"
"menuDelete": "Uninstall…"
},

"titleBar": {
Expand All @@ -69,15 +69,18 @@

"comfyUISettings": {
"title": "Settings",
"tabConfig": "Config",
"tabStatus": "Status",
"tabConfig": "Startup Args",
"tabStatus": "About",
"tabUpdate": "Update",
"tabSnapshots": "Snapshots",
"tabStorage": "Storage",
"relaunch": "Relaunch",
"more": "More",
"diskUsage": "Disk Usage",
"envVarsCount": "{n} defined",
"emptyInstallLess": "Open a ComfyUI install to view its settings."
"emptyInstallLess": "Open a ComfyUI install to view its settings.",
"storageGlobalNote": "Changes here apply to all of your ComfyUI instances.",
"storageRestartNote": "Restart the application (or close and reopen) for these changes to take effect."
},

"comfyLifecycle": {
Expand Down Expand Up @@ -390,7 +393,13 @@
"about": "About",
"version": "Version",
"platform": "Platform",
"language": "Language"
"language": "Language",
"preferences": "Preferences",
"privacy": "Privacy",
"community": "Community",
"storageTab": "Storage",
"sharedDirectories": "Shared Directories",
"updatesTab": "Updates"
},

"zoom": {
Expand Down Expand Up @@ -421,7 +430,12 @@
"panelAvailableTitle": "Update {version} available",
"panelReadyTitle": "Update {version} ready to install",
"panelDownloadingTitle": "Downloading update {version}…",
"downloading": "Downloading…"
"downloading": "Downloading…",
"readyBadge": "Ready to restart",
"installedLabel": "Installed {version}",
"lastCheckedLabel": "Last checked {time}",
"latestLabel": "Latest {version}",
"systemManagedNote": "Updates for this install are delivered through your system package manager."
},

"modal": {
Expand Down Expand Up @@ -454,12 +468,19 @@
"telemetryHint": "Telemetry helps us improve the launcher. We never collect workflow contents, prompts, generated media, or personal information.",
"acceptTos": "Accept and continue",
"consentTosTitle": "Accept the terms",
"consentTosHintPrefix": "By continuing you agree to the",
"consentTosHintPrefix": "I agree to the",
"consentTosHintSep": "and",
"consentTosHintSuffix": ".",
"consentTelemetryTitle": "Help improve Comfy",
"consentTelemetryHint": "Send usage data to help us fix bugs and prioritize features.",
"consentTelemetryHint": "Help improve Comfy by sharing anonymous usage data.",
"consentGetStarted": "Get Started",
"startContinue": "Continue",
"startContinueBusy": "Preparing your install…",
"expressInstallLabel": "Express Install",
"expressInstallHint": "Use recommended settings — skip optional setup steps.",
"expressInstallLine": "Express Install with recommended settings",
"expressGpuHintPrefix": "Detected: ",
"expressGpuHintSuffix": " - if that's not your hardware, uncheck Express",
"termsModalTitle": "ComfyUI Desktop Terms",
"eulaModalTitle": "End-User License Agreement",
"tosModalTitle": "Terms of Service",
Expand Down Expand Up @@ -523,11 +544,11 @@
"copyInstallationConfirm": "Copy",
"copyingInstallation": "Copying Install",
"copyingFiles": "Copying files…",
"delete": "Delete Install",
"deleteConfirmTitle": "Delete Install",
"deleteConfirmMessage": "This will permanently delete the install and all its files. This cannot be undone.",
"untrack": "Untrack",
"untrackConfirmTitle": "Untrack Install",
"delete": "Uninstall",
"deleteConfirmTitle": "Uninstall",
"deleteConfirmMessage": "This will permanently uninstall ComfyUI and delete all its files. This cannot be undone.",
"untrack": "Forget",
"untrackConfirmTitle": "Forget Install",
"untrackConfirmMessage": "This will remove the install from the app. The files will not be deleted."
},

Expand Down Expand Up @@ -802,11 +823,22 @@
"added": "Added",
"removed": "Removed",
"changed": "Changed",
"timeJustNow": "just now",
"timeJustNow": "Just now",
"timeMinutesAgo": "{count}m ago",
"timeHoursAgo": "{count}h ago",
"timeDaysAgo": "{count}d ago",
"deleteConfirm": "Delete this snapshot?",
"deleteConfirmNamed": "Delete snapshot \"{name}\"?",
"deleteConfirmMessage": "This snapshot file will be permanently removed. Your installation and other snapshots stay as-is. This can't be undone.",
"delete": "Delete",
"saveErrorTitle": "Couldn't save snapshot",
"deleteErrorTitle": "Couldn't delete snapshot",
"restoreConfirmTitle": "Restore this snapshot?",
"restoreConfirmMessage": "Your current install state will be replaced with the contents of this snapshot. Make sure ComfyUI isn't running before you continue.",
"importConfirmTitle": "Import these snapshots?",
"importConfirmMessage": "These snapshots will be added to this installation. The newest one will replace your current state.",
"importConfirmLabel": "Import",
"importErrorTitle": "Couldn't import snapshots",
"copiedAs": "Copied as",
"copyUpdatedAs": "Copy & Updated as",
"releaseUpdatedAs": "Release Updated as",
Expand Down Expand Up @@ -871,10 +903,10 @@
"waiting": "Waiting for ComfyUI to be ready…",
"waitingTime": "Waiting for ComfyUI to be ready… ({secs}s)",
"portBusyUsing": "Port {old} is busy — using port {new} instead…",
"instanceRunningTitle": "Instance Already Running",
"instanceRunningMessage": "\"{name}\" is currently running. Running multiple local installs simultaneously may use significant system resources.",
"instanceRunningProceed": "Launch Alongside",
"instanceRunningReplace": "Close Running & Launch",
"instanceRunningTitle": "An instance is already running",
"instanceRunningMessage": "\"{name}\" is running. What would you like to do?",
"instanceRunningProceed": "Launch Anyway",
"instanceRunningReplace": "Close & Launch New",
"modelFolderRelaunchTitle": "Restarting ComfyUI",
"modelFolderRelaunchDesc": "New model folders were detected from custom nodes. Restarting so ComfyUI can use them right away.",
"steps": {
Expand Down Expand Up @@ -933,6 +965,7 @@
"startupArgs": "Command-line arguments passed to ComfyUI when it starts, such as --port or --lowvram.",
"browserPartition": "Controls whether this install shares browser cache (cookies, local storage) with other installs or keeps its own separate cache.",
"sharedDirs": "Directories shared across all installations for inputs and outputs.",
"sharedModels": "Folders shared across all installations so models aren't downloaded twice. Newly downloaded models go to the primary folder. The system default folder is always kept and can't be removed, and the primary folder can't be removed while it's in use — pick a different primary first.",
"modelsPrimary": "The primary directory is where ComfyUI saves newly downloaded models by default.",
"modelsDefault": "The system default directory. This path is created automatically and cannot be removed.",
"useSharedPaths": "When enabled, this install can access models, inputs, and outputs from the shared directories. Disable to use only this install's own local paths.",
Expand All @@ -952,6 +985,7 @@
"name": "Name",
"value": "Value",
"add": "Add Variable",
"remove": "Remove variable",
"namePlaceholder": "VARIABLE_NAME",
"valuePlaceholder": "value",
"securityWarning": "Environment variable values are stored unencrypted on disk. Do not add API keys, tokens, passwords, or other secrets."
Expand Down
33 changes: 29 additions & 4 deletions locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,13 @@
"about": "关于",
"version": "版本",
"platform": "平台",
"language": "语言"
"language": "语言",
"preferences": "偏好设置",
"privacy": "隐私",
"community": "社区",
"storageTab": "存储",
"sharedDirectories": "共享目录",
"updatesTab": "更新"
},

"update": {
Expand All @@ -291,7 +297,19 @@
"availableTitle": "桌面端更新可用",
"availableMessage": "有可用的桌面端更新({version})。是否立即下载?下载完成后将提示您重启。",
"download": "下载",
"errorTitle": "桌面端更新错误"
"later": "稍后",
"errorTitle": "桌面端更新错误",
"sectionTitle": "桌面端更新",
"panelIdleTitle": "ComfyUI Desktop 已是最新版本",
"panelAvailableTitle": "更新 {version} 可用",
"panelReadyTitle": "更新 {version} 可安装",
"panelDownloadingTitle": "正在下载更新 {version}…",
"downloading": "下载中…",
"readyBadge": "准备重启",
"installedLabel": "已安装 {version}",
"lastCheckedLabel": "最后检查于 {time}",
"latestLabel": "最新 {version}",
"systemManagedNote": "此安装的更新通过您的系统包管理器提供。"
},

"modal": {
Expand Down Expand Up @@ -324,12 +342,19 @@
"telemetryHint": "遥测数据帮助我们改进启动器。我们绝不收集工作流内容、提示词、生成的媒体或个人信息。",
"acceptTos": "接受并继续",
"consentTosTitle": "接受条款",
"consentTosHintPrefix": "继续即表示您同意",
"consentTosHintPrefix": "我同意",
"consentTosHintSep": "和",
"consentTosHintSuffix": "。",
"consentTelemetryTitle": "帮助改进 Comfy",
"consentTelemetryHint": "发送使用数据,帮助我们修复缺陷并确定功能优先级。",
"consentTelemetryHint": "分享匿名使用数据,帮助改进 Comfy。",
"consentGetStarted": "开始使用",
"startContinue": "继续",
"startContinueBusy": "正在准备安装…",
"expressInstallLabel": "快捷安装",
"expressInstallHint": "使用推荐设置——跳过可选的安装步骤。",
"expressInstallLine": "快捷安装——使用推荐设置",
"expressGpuHintPrefix": "已检测到:",
"expressGpuHintSuffix": "- 如果不是你的硬件,请取消勾选快捷安装",
"termsModalTitle": "ComfyUI Desktop 条款",
"eulaModalTitle": "最终用户许可协议",
"tosModalTitle": "服务条款",
Expand Down
59 changes: 55 additions & 4 deletions src/main/host/detach.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export async function confirmAndCloseAllHostWindows(
parentWindow: BrowserWindow | null,
): Promise<void> {
const entries = Array.from(comfyWindows.values()).filter((e) => !e.window.isDestroyed())
if (entries.length <= 1) {
if (entries.length < 1) {
closeAllHostWindows()
return
}
Expand Down Expand Up @@ -219,13 +219,16 @@ export async function confirmAndCloseAllHostWindows(
closeAllHostWindows()
return
}
const isSingle = entries.length === 1
const confirmed = await openSystemModalAsync({
parent: overlayParentEntry.window,
spec: {
title: 'Close All Windows',
message: `Close ${entries.length} open windows?`,
title: 'Exit All Windows',
message: isSingle
? 'Exit the open window?'
: `Exit ${entries.length} open windows?`,
details,
confirmLabel: 'Close All',
confirmLabel: isSingle ? 'Exit' : 'Exit All',
cancelLabel: 'Cancel',
confirmStyle: 'danger',
theme: overlayParentEntry.lastTheme,
Expand All @@ -242,6 +245,54 @@ export async function confirmAndCloseAllHostWindows(
}
}

/**
* Confirm + close a single host window. Mirrors
* `confirmAndCloseAllHostWindows` for the install-host menu's
* `Exit Window` entry — same `openSystemModalAsync` primitive, same
* pre-cleared close path so the per-window close handler doesn't
* double-prompt after the user already confirmed.
*/
export async function confirmAndCloseHostWindow(parentWindow: BrowserWindow): Promise<void> {
if (parentWindow.isDestroyed()) return
const entry = Array.from(comfyWindows.values()).find((e) => e.window === parentWindow)
if (!entry) {
parentWindow.close()
return
}
const details: SystemModalDetailGroup[] = []
if (ipc.hasActiveOperations()) {
try {
const items = await ipc.getActiveDetails()
const sessions = items.filter((i) => i.type === 'session').map((i) => i.name)
const operations = items.filter((i) => i.type === 'operation').map((i) => i.name)
const downloads = items.filter((i) => i.type === 'download').map((i) => i.name)
if (sessions.length > 0) details.push({ label: 'Running ComfyUI', items: sessions })
if (operations.length > 0) details.push({ label: 'In-progress operations', items: operations })
if (downloads.length > 0) details.push({ label: 'Active downloads', items: downloads })
} catch {
// Active-detail collection failure shouldn't block the prompt.
}
}
const confirmed = await openSystemModalAsync({
parent: entry.window,
spec: {
title: 'Exit Window',
message: 'Exit this window?',
details: details.length > 0 ? details : undefined,
confirmLabel: 'Exit',
cancelLabel: 'Cancel',
confirmStyle: 'danger',
theme: entry.lastTheme,
},
})
if (confirmed) {
// Skip the panel-renderer consult on the close handler — the user
// already confirmed via this prompt.
preClearedClose.add(entry.window)
entry.window.close()
}
}

/**
* Flip an install-backed host window in place to install-less
* (chooser) mode. The symmetric undo to `attachInstall()`. Bound
Expand Down
58 changes: 19 additions & 39 deletions src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ import { applyAttachHostPreview, clearAttachHostPreview } from './host/attachHos
import {
_detachInstallImpl,
confirmAndCloseAllHostWindows,
confirmAndCloseHostWindow,
consultPanelRendererClose,
detachOrphanedInstallHosts,
preClearedClose,
Expand Down Expand Up @@ -1103,6 +1104,7 @@ if (app.isPackaged && !app.requestSingleInstanceLock()) {
openChooserHostWindow,
returnToDashboard,
confirmAndCloseAllHostWindows,
confirmAndCloseHostWindow,
setActivePanel,
triggerOpenFeedback,
sendToPanelDeferred,
Expand Down Expand Up @@ -1164,6 +1166,23 @@ if (app.isPackaged && !app.requestSingleInstanceLock()) {
}
try {
await updateInstallation(installationId, { [fieldId]: value })
// Channel switch must kick a check-update; otherwise the new
// channel's available-update tag never appears until the user
// manually clicks "Check for updates".
if (fieldId === 'updateChannel') {
const next = await getInstallation(installationId)
if (next) {
const abort = new AbortController()
source.handleAction('check-update', next, undefined, {
update: (data) => updateInstallation(installationId, data).then(() => { }),
sendProgress: () => { },
sendOutput: () => { },
signal: abort.signal,
}).catch((err) => {
console.error(`Picker: check-update after channel switch failed for ${installationId}:`, err)
})
}
}
return { ok: true }
} catch (err) {
return { ok: false, message: err instanceof Error ? err.message : 'Update failed.' }
Expand Down Expand Up @@ -1197,45 +1216,6 @@ if (app.isPackaged && !app.requestSingleInstanceLock()) {
return { ok: false, message: err instanceof Error ? err.message : 'Action failed.' }
}
},
getChannelPickerFieldForInstall: async (installationId) => {
if (!installationId) return null
const inst = await getInstallation(installationId)
if (!inst) return null
const source = sourceMap[inst.sourceId]
if (!source) return null
const sections = source.getDetailSections(inst) as Array<{ tab?: string; fields?: Array<Record<string, unknown>> }>
for (const sec of sections) {
if (sec.tab && sec.tab !== 'update') continue
const f = sec.fields?.find((ff) => ff.editType === 'channel-cards')
if (f) return f
}
return null
},
runChannelPickerAction: async (installationId, actionId, actionData) => {
// Same dispatch as `pickerRunAction`. The IPC handler enforces
// the action allowlist (copy-update / release-update /
// switch-channel / update); this binding is a generic
// source-action runner.
try {
const inst = await getInstallation(installationId)
if (!inst) return { ok: false, message: 'Installation not found.' }
const source = sourceMap[inst.sourceId]
if (!source) return { ok: false, message: 'Unknown source.' }
const abort = new AbortController()
const result = await source.handleAction(actionId, inst, actionData, {
update: (data) => updateInstallation(installationId, data).then(() => { }),
sendProgress: () => { },
sendOutput: () => { },
signal: abort.signal,
})
return {
ok: result.ok !== false,
message: typeof result.message === 'string' ? result.message : undefined,
}
} catch (err) {
return { ok: false, message: err instanceof Error ? err.message : 'Action failed.' }
}
},
pickInstallFromPicker,
restartInstallFromPicker: async (installationId, parentEntryId) => {
// Restart: same install, same window. The session is stopped
Expand Down
Loading
Loading