Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,8 @@
"playwright/no-eval": "error",
"playwright/no-focused-test": "error",
"playwright/no-force-option": "error",
"playwright/no-identical-title": "error",
"playwright/no-export": "error",
"playwright/no-networkidle": "error",
"playwright/no-page-pause": "error",
"playwright/no-skipped-test": "error",
Expand All @@ -796,6 +798,7 @@
"playwright/prefer-to-have-length": "error",
"playwright/prefer-web-first-assertions": "error",
"playwright/prefer-native-locators": "error",
"playwright/require-annotation-reason": "error",
"playwright/require-to-pass-timeout": "error",
"playwright/valid-expect": "error",
"playwright/valid-expect-in-promise": "error",
Expand Down
1 change: 1 addition & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"shorthand-property-no-redundant-values": true,
"selector-pseudo-element-colon-notation": "double",
"no-duplicate-selectors": true,
"selector-no-unmatchable": true,
"font-weight-notation": "numeric",
"length-zero-no-unit": true,
"color-no-invalid-hex": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ test.describe(
)

exhaustedRetryTest.describe(
'Agent doc subscribe refused by the host',
'Agent doc subscribe retries exhausted',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Answer: Both sibling describe blocks originally used the same title, which the newly enabled playwright/no-identical-title rule rejects. This second suite exercises exhausted subscription retries and reconnect, so the new title distinguishes that case. Restoring the old title reproduces the lint error; the current title passes. The tests and fixtures are unchanged.

{ tag: ['@cloud', '@agent', '@vue-nodes'] },
() => {
exhaustedRetryTest.describe.configure({ timeout: 90_000 })
Expand Down
2 changes: 2 additions & 0 deletions eslint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,8 @@ export default defineConfig([
'vue/multi-word-component-names': 'off', // TODO: fix
'vue/no-template-shadow': 'off', // TODO: fix
'vue/match-component-import-name': 'error',
'vue/no-content-outside-block': 'error',
'vue/no-props-shadow': 'error',
'vue/no-unused-properties': 'error',
'vue/no-unused-refs': 'error',
'vue/no-useless-mustaches': 'error',
Expand Down
16 changes: 10 additions & 6 deletions src/components/dialog/content/ConfirmationDialogContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,26 @@
<i class="icon-[lucide--undo-2]" />
{{ $t('g.cancel') }}
</Button>
<Button v-if="type === 'default'" variant="primary" @click="onConfirm">
<Button
v-if="type === 'default'"
variant="primary"
@click="handleConfirm"
>
<i class="icon-[lucide--check]" />
{{ $t('g.confirm') }}
</Button>
<Button
v-else-if="type === 'delete'"
variant="destructive"
@click="onConfirm"
@click="handleConfirm"
>
<i class="icon-[lucide--trash-2]" />
{{ $t('g.delete') }}
</Button>
<Button
v-else-if="type === 'overwrite' || type === 'overwriteBlueprint'"
variant="destructive"
@click="onConfirm"
@click="handleConfirm"
>
<i class="icon-[lucide--save]" />
{{ $t('g.overwrite') }}
Expand All @@ -83,15 +87,15 @@
<i class="icon-[lucide--x]" />
{{ denyLabel ?? $t('g.no') }}
</Button>
<Button autofocus @click="onConfirm">
<Button autofocus @click="handleConfirm">
<i class="icon-[lucide--save]" />
{{ confirmLabel ?? $t('g.save') }}
</Button>
</template>
<Button
v-else-if="type === 'reinstall'"
variant="destructive"
@click="onConfirm"
@click="handleConfirm"
>
<i class="icon-[lucide--eraser]" />
{{ $t('desktopMenu.reinstall') }}
Expand Down Expand Up @@ -145,7 +149,7 @@ const onDeny = () => {
useDialogStore().closeDialog()
}

const onConfirm = () => {
const handleConfirm = () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this that use handleX for handler and onX as prop. It's great to keep them consistent

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Answer: Kept handleConfirm for the local click handler and onConfirm for the callback prop. The handler still calls props.onConfirm with the same value and closes the dialog.

if (props.type === 'overwriteBlueprint' && doNotAskAgain.value)
void useSettingStore().set('Comfy.Workflow.WarnBlueprintOverwrite', false)
props.onConfirm(true)
Expand Down
18 changes: 10 additions & 8 deletions src/components/rightSidePanel/parameters/SectionWidgets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ const emit = defineEmits<{
const widgetsContainer = ref<HTMLElement>()
const rootElement = ref<HTMLElement>()

const widgets = shallowRef(widgetsProp)
watchEffect(() => (widgets.value = widgetsProp))
const localWidgets = shallowRef(widgetsProp)
watchEffect(() => (localWidgets.value = widgetsProp))

const draggableList = ref<DraggableList | undefined>()

Expand Down Expand Up @@ -106,7 +106,7 @@ function setDraggableState() {
}

watchDebounced(
[widgets, () => isDraggable, collapse],
[localWidgets, () => isDraggable, collapse],
() => setDraggableState(),
{ debounce: 100 }
)
Expand All @@ -124,7 +124,7 @@ const { t } = useI18n()

const getNodeParentGroup = inject(GetNodeParentGroupKey, null)

const isEmpty = computed(() => widgets.value.length === 0)
const isEmpty = computed(() => localWidgets.value.length === 0)

const displayLabel = computed(
() => label ?? (node ? node.title : t('rightSidePanel.inputs'))
Expand All @@ -134,10 +134,12 @@ const targetNode = computed<LGraphNode | null>(() => {
if (node) return node
if (isEmpty.value) return null

const firstNodeId = widgets.value[0].node.id
const allSameNode = widgets.value.every(({ node }) => node.id === firstNodeId)
const firstNodeId = localWidgets.value[0].node.id
const allSameNode = localWidgets.value.every(
({ node }) => node.id === firstNodeId
)

return allSameNode ? widgets.value[0].node : null
return allSameNode ? localWidgets.value[0].node : null
})

const hasDirectError = computed(() => {
Expand Down Expand Up @@ -355,7 +357,7 @@ defineExpose({
class="relative space-y-2 rounded-lg px-4 pt-1"
>
<WidgetItem
v-for="{ widget, node } in widgets"
v-for="{ widget, node } in localWidgets"
:key="getStableWidgetRenderKey(widget)"
:widget
:node
Expand Down
36 changes: 21 additions & 15 deletions src/components/sidebar/tabs/modelLibrary/ModelPreview.vue
Original file line number Diff line number Diff line change
@@ -1,35 +1,41 @@
<template>
<div class="model_preview">
<div class="model_preview_title">
{{ modelDef.title }}
{{ initialModelDef.title }}
</div>
<div class="model_preview_top_container">
<div class="model_preview_filename">
{{ modelDef.file_name }}
{{ initialModelDef.file_name }}
</div>
<div v-if="modelDef.architecture_id" class="model_preview_architecture">
<div
v-if="initialModelDef.architecture_id"
class="model_preview_architecture"
>
<span class="model_preview_prefix">{{ $t('g.architecture') }}: </span>
{{ modelDef.architecture_id }}
{{ initialModelDef.architecture_id }}
</div>
<div v-if="modelDef.author" class="model_preview_author">
<div v-if="initialModelDef.author" class="model_preview_author">
<span class="model_preview_prefix">{{ $t('g.author') }}: </span>
{{ modelDef.author }}
{{ initialModelDef.author }}
</div>
</div>
<div v-if="modelDef.image" class="model_preview_image">
<img :src="modelDef.image" />
<div v-if="initialModelDef.image" class="model_preview_image">
<img :src="initialModelDef.image" />
</div>
<div v-if="modelDef.usage_hint" class="model_preview_usage_hint">
<div v-if="initialModelDef.usage_hint" class="model_preview_usage_hint">
<span class="model_preview_prefix">{{ $t('g.usageHint') }}: </span>
{{ modelDef.usage_hint }}
{{ initialModelDef.usage_hint }}
</div>
<div v-if="modelDef.trigger_phrase" class="model_preview_trigger_phrase">
<div
v-if="initialModelDef.trigger_phrase"
class="model_preview_trigger_phrase"
>
<span class="model_preview_prefix">{{ $t('g.triggerPhrase') }}: </span>
{{ modelDef.trigger_phrase }}
{{ initialModelDef.trigger_phrase }}
</div>
<div v-if="modelDef.description" class="model_preview_description">
<div v-if="initialModelDef.description" class="model_preview_description">
<span class="model_preview_prefix">{{ $t('g.description') }}: </span>
{{ modelDef.description }}
{{ initialModelDef.description }}
</div>
</div>
</template>
Expand All @@ -44,7 +50,7 @@ const props = defineProps({
}
})

const modelDef = props.modelDef
const initialModelDef = props.modelDef
</script>
<style scoped>
.model_preview {
Expand Down
3 changes: 1 addition & 2 deletions src/components/topbar/WorkflowTabPopover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { useTimeoutFn } from '@vueuse/core'
import { PopoverAnchor, PopoverRoot } from 'reka-ui'
import type { FocusOutsideEvent, PointerDownOutsideEvent } from 'reka-ui'
import PopoverContent from '@comfyorg/design-system/popover/PopoverContent'
import { ref, toRefs, watch } from 'vue'
import { ref, watch } from 'vue'

import { usePopoverViewportDismiss } from '@comfyorg/design-system/lib/popover/usePopoverViewportDismiss'

Expand All @@ -53,7 +53,6 @@ interface Props {
}

const props = defineProps<Props>()
const { thumbnailUrl, isActiveTab } = toRefs(props)
const open = defineModel<boolean>('open', { default: false })
const clicked = defineModel<boolean>('clicked', { default: false })
const outside = ref(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
content-padding="none"
size="md"
close-button-variant="textonly"
@close="onClose"
@close="handleClose"
>
<template #leftPanelHeaderTitle>
<i class="icon-[comfy--template]" />
Expand Down Expand Up @@ -542,8 +542,7 @@ onMounted(() => {
sessionStartTime.value = Date.now()
})

// Wrap onClose to track session end
const onClose = () => {
const handleClose = () => {
activeDetail.value?.modelSetup.rowDownloads.dispose()
invalidateDetailWork()
const timeSpentSeconds = Math.floor(
Expand Down Expand Up @@ -1244,7 +1243,7 @@ async function openPreparedTemplate(
if (result === 'not-started') return

templateWasSelected.value = result === 'loaded'
onClose()
handleClose()
} finally {
openPending.value = false
}
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/extensions/vueNodes/components/InputSlot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
cn(
'lg-slot lg-slot--input group m-0 flex items-center rounded-r-lg',
'cursor-crosshair',
dotOnly ? 'lg-slot--dot-only' : 'h-5 pr-2',
effectiveDotOnly ? 'lg-slot--dot-only' : 'h-5 pr-2',
{
'lg-slot--connected': props.connected,
'lg-slot--compatible': props.compatible,
Expand Down Expand Up @@ -105,7 +105,7 @@ const hasNoLabel = computed(
!props.slotData.localized_name &&
props.slotData.name === ''
)
const dotOnly = computed(() => props.dotOnly || hasNoLabel.value)
const effectiveDotOnly = computed(() => props.dotOnly || hasNoLabel.value)
const accessibleName = computed(
() =>
props.slotData.label ||
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/extensions/vueNodes/components/OutputSlot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const props = defineProps<OutputSlotProps>()
const hasNoLabel = computed(
() => !props.slotData.localized_name && props.slotData.name === ''
)
const dotOnly = computed(() => props.dotOnly || hasNoLabel.value)
const effectiveDotOnly = computed(() => props.dotOnly || hasNoLabel.value)
// Error boundary implementation
const renderError = ref<string | null>(null)

Expand Down Expand Up @@ -101,7 +101,7 @@ const slotWrapperClass = computed(() =>
cn(
'lg-slot lg-slot--output group flex h-5 items-center justify-end rounded-l-lg',
'cursor-crosshair',
dotOnly.value ? 'lg-slot--dot-only justify-center' : 'pl-2',
effectiveDotOnly.value ? 'lg-slot--dot-only justify-center' : 'pl-2',
{
'lg-slot--connected': props.connected,
'lg-slot--compatible': props.compatible,
Expand Down
Loading