Compare commits

..

2 Commits

Author SHA1 Message Date
CodeRabbit Fixer
4b51823da3 fix: Remove deprecated error getters from ComfyApp (app.ts) (#9066)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 19:36:31 +01:00
AustinMroz
55b8236c8d Fix localization on share and hide entry (#9395)
A placeholder share entry was added in #9368, but the localization for
this share label was then removed in #9361.

This localization is re-added in a location that is less likely to be
overwritten and the menu item is set to hidden. I'll manually connect it
to the workflow sharing feature flag in a followup PR after that has
been merged.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-9395-Fix-localization-on-share-and-hide-entry-3196d73d36508146a343f625a5327bdd)
by [Unito](https://www.unito.io)
2026-03-06 09:35:18 -08:00
7 changed files with 22 additions and 20 deletions

View File

@@ -12,7 +12,6 @@ interface UseCurveEditorOptions {
export function useCurveEditor({ svgRef, modelValue }: UseCurveEditorOptions) {
const dragIndex = ref(-1)
let cleanupDrag: (() => void) | null = null
let cachedInverseCTM: DOMMatrix | null = null
const curvePath = computed(() => {
const points = modelValue.value
@@ -32,14 +31,16 @@ export function useCurveEditor({ svgRef, modelValue }: UseCurveEditorOptions) {
return parts.join('')
})
function svgCoords(
e: PointerEvent,
inverseCTM?: DOMMatrix | null
): [number, number] {
const inv = inverseCTM ?? svgRef.value?.getScreenCTM()?.inverse()
if (!inv) return [0, 0]
function svgCoords(e: PointerEvent): [number, number] {
const svg = svgRef.value
if (!svg) return [0, 0]
const svgPt = new DOMPoint(e.clientX, e.clientY).matrixTransform(inv)
const ctm = svg.getScreenCTM()
if (!ctm) return [0, 0]
const svgPt = new DOMPoint(e.clientX, e.clientY).matrixTransform(
ctm.inverse()
)
return [
Math.max(0, Math.min(1, svgPt.x)),
Math.max(0, Math.min(1, 1 - svgPt.y))
@@ -99,12 +100,11 @@ export function useCurveEditor({ svgRef, modelValue }: UseCurveEditorOptions) {
const svg = svgRef.value
if (!svg) return
cachedInverseCTM = svg.getScreenCTM()?.inverse() ?? null
svg.setPointerCapture(e.pointerId)
const onMove = (ev: PointerEvent) => {
if (dragIndex.value < 0) return
const [x, y] = svgCoords(ev, cachedInverseCTM)
const [x, y] = svgCoords(ev)
const movedPoint: CurvePoint = [x, y]
const newPoints = [...modelValue.value]
newPoints[dragIndex.value] = movedPoint
@@ -116,7 +116,6 @@ export function useCurveEditor({ svgRef, modelValue }: UseCurveEditorOptions) {
const endDrag = () => {
if (dragIndex.value < 0) return
dragIndex.value = -1
cachedInverseCTM = null
svg.removeEventListener('pointermove', onMove)
svg.removeEventListener('pointerup', endDrag)
svg.removeEventListener('lostpointercapture', endDrag)

View File

@@ -189,11 +189,10 @@ export function useWorkflowActionsMenu(
addItem({
id: 'share',
label: t('menuLabels.Share'),
label: t('breadcrumbsMenu.share'),
icon: 'icon-[comfy--send]',
command: async () => {},
disabled: true,
visible: isRoot
visible: false
})
addItem({

View File

@@ -2604,7 +2604,8 @@
"deleteWorkflow": "Delete Workflow",
"deleteBlueprint": "Delete Blueprint",
"enterNewName": "Enter new name",
"missingNodesWarning": "Workflow contains unsupported nodes (highlighted red)."
"missingNodesWarning": "Workflow contains unsupported nodes (highlighted red).",
"share": "Share"
},
"shortcuts": {
"shortcuts": "Shortcuts",

View File

@@ -236,7 +236,7 @@ export class ComfyApp {
/**
* The node errors from the previous execution.
* @deprecated Use app.extensionManager.lastNodeErrors instead
* @deprecated Use useExecutionErrorStore().lastNodeErrors instead
*/
get lastNodeErrors(): Record<NodeId, NodeError> | null {
return useExecutionErrorStore().lastNodeErrors
@@ -244,7 +244,7 @@ export class ComfyApp {
/**
* The error from the previous execution.
* @deprecated Use app.extensionManager.lastExecutionError instead
* @deprecated Use useExecutionErrorStore().lastExecutionError instead
*/
get lastExecutionError(): ExecutionErrorWsMessage | null {
return useExecutionErrorStore().lastExecutionError

View File

@@ -8,6 +8,7 @@ import type { JobListItem } from '@/platform/remote/comfyui/jobs/jobTypes'
import { useTelemetry } from '@/platform/telemetry'
import { useLitegraphService } from '@/services/litegraphService'
import { useCommandStore } from '@/stores/commandStore'
import { useExecutionErrorStore } from '@/stores/executionErrorStore'
import { useWorkspaceStore } from '@/stores/workspaceStore'
import { api } from './api'
@@ -707,7 +708,7 @@ export class ComfyUI {
status.exec_info.queue_remaining == 0 &&
this.autoQueueEnabled &&
(this.autoQueueMode === 'instant' || this.graphHasChanged) &&
!app.lastExecutionError
!useExecutionErrorStore().lastExecutionError
) {
app.queuePrompt(0, this.batchCount)
status.exec_info.queue_remaining += this.batchCount

View File

@@ -1,5 +1,6 @@
import { api } from '@/scripts/api'
import { app } from '@/scripts/app'
import { useExecutionErrorStore } from '@/stores/executionErrorStore'
import {
isInstantRunningMode,
useQueuePendingTaskCountStore,
@@ -28,7 +29,7 @@ export function setupAutoQueueHandler() {
queueCountStore.$subscribe(
async () => {
internalCount = queueCountStore.count
if (!internalCount && !app.lastExecutionError) {
if (!internalCount && !useExecutionErrorStore().lastExecutionError) {
if (
isInstantRunningMode(queueSettingsStore.mode) ||
(queueSettingsStore.mode === 'change' && graphHasChanged)

View File

@@ -54,6 +54,7 @@ import { ComfyApp, app } from '@/scripts/app'
import { isComponentWidget, isDOMWidget } from '@/scripts/domWidget'
import { $el } from '@/scripts/ui'
import { useDomWidgetStore } from '@/stores/domWidgetStore'
import { useExecutionErrorStore } from '@/stores/executionErrorStore'
import { useExecutionStore } from '@/stores/executionStore'
import { useNodeOutputStore } from '@/stores/nodeOutputStore'
import { ComfyNodeDefImpl } from '@/stores/nodeDefStore'
@@ -205,7 +206,7 @@ export const useLitegraphService = () => {
}
}
node.strokeStyles['executionError'] = function (this: LGraphNode) {
if (app.lastExecutionError?.node_id == this.id) {
if (useExecutionErrorStore().lastExecutionError?.node_id == this.id) {
return { color: '#f0f', lineWidth: 3 }
}
}