mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-07-15 03:37:48 +00:00
*PR Created by the Glary-Bot Agent* --- ## Summary Registers a new nightly feature survey for the Queue Progress Overlay using the existing feature-survey registry (same pattern as the merged node-search survey, PRs #8175/#8355/#9934). - New registry entry `queue-progress-overlay` → Typeform `HZ5saxry`, threshold **16**, 5s display delay. - `trackFeatureUsed()` wired at the major user-initiated handlers inside the overlay so the survey triggers regardless of panel location (floating-right v1 or docked-left v2). - Run button and other ActionBar items that the overlay pops over from are deliberately **not** tracked — tracking is scoped to interactions that originate inside the job panel / queue progress overlay itself. ## Tracked interactions Both variants share most sub-components, so tracking is instrumented once at each logical surface: - **`QueueProgressOverlay.vue`** (v1 container): `viewAllJobs`, `interruptAll`, `cancelQueuedWorkflows`, `onClearHistoryFromMenu`, `toggleAssetsSidebar`, `onCancelItem`, `onDeleteItem`, `inspectJobAsset` - **`QueueOverlayExpanded.vue`**: job tab switches - **`JobHistorySidebarTab.vue`** (v2 docked): job tab switches, `clearQueuedWorkflows`, `onClearHistory`, `onCancelItem`, `onDeleteItem`, `onViewItem` - **`JobFilterActions.vue`** (shared): workflow filter + sort mode selections - **`JobHistoryActionsMenu.vue`** (shared): docked-history toggle + run-progress-bar toggle Deliberately **not tracked** to keep the signal clean: - Hover handlers (ambient preview behaviour) - Search-box keystrokes (debounced typing) - Context menu open and menu-item dispatch — menu actions either bubble through already-tracked terminal handlers (e.g. inspect-asset → `onViewItem`) or are secondary operations (copy-id, open-workflow, download). Avoids double-counting per code review feedback. ## How it works (inherits from existing infrastructure) 1. `surveyRegistry.ts` drives `NightlySurveyController` → `NightlySurveyPopover`, which handles the Typeform embed. 2. Eligibility already gated on `isNightly && !isCloud && !isDesktop`, once-per-user, 4-day global cooldown across all surveys, and opt-out. 3. Typeform response routing to #C0ALLT6Q3SQ is handled on the Typeform side. ## Verification - `pnpm typecheck` ✅ - `pnpm lint` ✅ (no new warnings) - `pnpm knip` ✅ - `pnpm test:unit` on `src/components/queue`, `src/components/sidebar/tabs/JobHistorySidebarTab`, `src/platform/surveys` → **123/123 passing** - Pre-commit hooks (stylelint, oxfmt, oxlint, eslint, typecheck) all pass - Manual: dev server + backend boot cleanly, app loads without new runtime errors, `localStorage['Comfy.FeatureUsage']` layout verified to match what `useFeatureUsageTracker` writes ## Notes - Survey key `queue-progress-overlay` covers both v1 (floating-right) and v2 (docked-sidebar) per product guidance: _"This should trigger regardless of the location of the panel (docked from left or floating on right)."_ Both surfaces are the same product feature — the survey is intentionally scoped to the whole job-panel experience. ## Screenshots  ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-11560-feat-add-queue-progress-overlay-feature-survey-34b6d73d3650819a9a50fd67fd9b5941) by [Unito](https://www.unito.io) --------- Co-authored-by: Glary-Bot <glary-bot@users.noreply.github.com>
151 lines
5.0 KiB
Vue
151 lines
5.0 KiB
Vue
<template>
|
|
<div class="flex items-center gap-1">
|
|
<Popover :show-arrow="false">
|
|
<template #button>
|
|
<Button
|
|
v-tooltip.top="moreTooltipConfig"
|
|
variant="textonly"
|
|
size="icon"
|
|
:aria-label="t('sideToolbar.queueProgressOverlay.moreOptions')"
|
|
>
|
|
<i
|
|
class="icon-[lucide--more-horizontal] block size-4 leading-none text-text-secondary"
|
|
/>
|
|
</Button>
|
|
</template>
|
|
<template #default="{ close }">
|
|
<div class="flex min-w-56 flex-col items-stretch font-inter">
|
|
<Button
|
|
data-testid="docked-job-history-action"
|
|
class="w-full justify-between text-sm font-light"
|
|
variant="textonly"
|
|
size="md"
|
|
@click="onToggleDockedJobHistory(close)"
|
|
>
|
|
<span class="flex items-center gap-2">
|
|
<i
|
|
class="icon-[lucide--panel-left-close] size-4 text-text-secondary"
|
|
/>
|
|
<span>{{
|
|
t('sideToolbar.queueProgressOverlay.dockedJobHistory')
|
|
}}</span>
|
|
</span>
|
|
<i
|
|
v-if="isQueuePanelV2Enabled"
|
|
class="icon-[lucide--check] size-4"
|
|
/>
|
|
</Button>
|
|
<Button
|
|
data-testid="show-run-progress-bar-action"
|
|
class="w-full justify-between text-sm font-light"
|
|
variant="textonly"
|
|
size="md"
|
|
@click="onToggleRunProgressBar"
|
|
>
|
|
<span class="flex items-center gap-2">
|
|
<i class="icon-[lucide--hourglass] size-4 text-text-secondary" />
|
|
<span>{{
|
|
t('sideToolbar.queueProgressOverlay.showRunProgressBar')
|
|
}}</span>
|
|
</span>
|
|
<i
|
|
v-if="isRunProgressBarEnabled"
|
|
class="icon-[lucide--check] size-4"
|
|
/>
|
|
</Button>
|
|
<!-- TODO: Bug in assets sidebar panel derives assets from history, so despite this not deleting the assets, it still effectively shows to the user as deleted -->
|
|
<template v-if="showClearHistoryAction">
|
|
<div class="my-1 border-t border-interface-stroke" />
|
|
<Button
|
|
data-testid="clear-history-action"
|
|
class="h-auto min-h-8 w-full items-start justify-start whitespace-normal"
|
|
variant="textonly"
|
|
size="md"
|
|
@click="onClearHistoryFromMenu(close)"
|
|
>
|
|
<i
|
|
class="icon-[lucide--trash-2] size-4 shrink-0 self-center text-destructive-background"
|
|
/>
|
|
<span
|
|
class="flex flex-col items-start text-left leading-tight wrap-break-word"
|
|
>
|
|
<span class="text-sm font-light">
|
|
{{ t('sideToolbar.queueProgressOverlay.clearHistory') }}
|
|
</span>
|
|
<span class="text-xs font-light text-text-secondary">
|
|
{{
|
|
t(
|
|
'sideToolbar.queueProgressOverlay.clearHistoryMenuAssetsNote'
|
|
)
|
|
}}
|
|
</span>
|
|
</span>
|
|
</Button>
|
|
</template>
|
|
</div>
|
|
</template>
|
|
</Popover>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { computed } from 'vue'
|
|
import { useI18n } from 'vue-i18n'
|
|
|
|
import Popover from '@/components/ui/Popover.vue'
|
|
import Button from '@/components/ui/button/Button.vue'
|
|
import { useQueueFeatureFlags } from '@/composables/queue/useQueueFeatureFlags'
|
|
import { buildTooltipConfig } from '@/composables/useTooltipConfig'
|
|
import { isCloud } from '@/platform/distribution/types'
|
|
import { useSettingStore } from '@/platform/settings/settingStore'
|
|
import { useSurveyFeatureTracking } from '@/platform/surveys/useSurveyFeatureTracking'
|
|
import { useSidebarTabStore } from '@/stores/workspace/sidebarTabStore'
|
|
|
|
const emit = defineEmits<{
|
|
(e: 'clearHistory'): void
|
|
}>()
|
|
|
|
const { t } = useI18n()
|
|
const settingStore = useSettingStore()
|
|
const sidebarTabStore = useSidebarTabStore()
|
|
const { trackFeatureUsed } = useSurveyFeatureTracking('queue-progress-overlay')
|
|
|
|
const moreTooltipConfig = computed(() => buildTooltipConfig(t('g.more')))
|
|
const { isQueuePanelV2Enabled, isRunProgressBarEnabled } =
|
|
useQueueFeatureFlags()
|
|
const showClearHistoryAction = computed(() => !isCloud)
|
|
|
|
const onClearHistoryFromMenu = (close: () => void) => {
|
|
close()
|
|
emit('clearHistory')
|
|
}
|
|
|
|
const onToggleDockedJobHistory = async (close: () => void) => {
|
|
trackFeatureUsed()
|
|
close()
|
|
|
|
try {
|
|
if (isQueuePanelV2Enabled.value) {
|
|
await settingStore.setMany({
|
|
'Comfy.Queue.QPOV2': false,
|
|
'Comfy.Queue.History.Expanded': true
|
|
})
|
|
return
|
|
}
|
|
|
|
sidebarTabStore.activeSidebarTabId = 'job-history'
|
|
await settingStore.set('Comfy.Queue.QPOV2', true)
|
|
} catch {
|
|
return
|
|
}
|
|
}
|
|
|
|
const onToggleRunProgressBar = async () => {
|
|
trackFeatureUsed()
|
|
await settingStore.set(
|
|
'Comfy.Queue.ShowRunProgressBar',
|
|
!isRunProgressBarEnabled.value
|
|
)
|
|
}
|
|
</script>
|