fix: bulletproof the editor bundle delivery and continuity combo availability

- TaskSegmentEditor continuity (Shot/Context) combo, ref image size combo and
  MiniMax prompt placeholder now use isMoxieEditorFormat: they stay available
  even when the format widget value is missing or unrecognized (the pack ships
  exactly one video format)
- __init__.py now serves dist/release/index.js with Cache-Control: no-cache:
  the entry file keeps a stable URL while chunk names rotate every build, so a
  stale cached entry file used to request deleted chunks (404) and silently
  break the editor; hashed chunks remain cacheable
- bundle marker bumped to 2026-09-28.1; release rebuilt; vitest 566/567 (same
  pre-existing URL.revokeObjectURL env failure)
This commit is contained in:
Z User 2026-09-27 20:19:50 +00:00
parent f611d6c5b7
commit 33d8f5f0eb
6 changed files with 79 additions and 65 deletions

View File

@ -44,8 +44,19 @@ if not os.path.exists(os.path.join(root_path, dist_path)):
dist_path = os.path.join(root_path, dist_path)
if os.path.exists(dist_path):
# Add the routes for the extension
# The editor entry file (index.js) keeps a stable URL across releases, so a
# browser may hold an old cached copy that imports chunk files which no
# longer exist (chunk names are content-hashed and rotated on every build).
# Serve index.js with no-cache so it is always revalidated (304 when
# unchanged); hashed chunks stay cacheable forever.
async def _serve_editor_index(request: web.Request) -> web.StreamResponse:
return web.FileResponse(
os.path.join(dist_path, 'index.js'),
headers={'Cache-Control': 'no-cache, must-revalidate'},
)
server.PromptServer.instance.app.add_routes([
web.get(f"/{project_name}/index.js", _serve_editor_index),
web.static(f"/{project_name}/", dist_path),
])

58
dist/release/chunks/index-ycesdkze.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -42,7 +42,7 @@ import {
parseMultiTrackDurationTimecode,
segmentDuration,
} from '@/lib/multitrack-utils'
import { normalizeFormatValue } from '@/lib/multitrack-utils'
import { isMoxieEditorFormat, normalizeFormatValue } from '@/lib/multitrack-utils'
import { cn } from '@/lib/utils'
import {
createTaskImage,
@ -240,6 +240,9 @@ export function TaskSegmentEditor({
onOpenImagePreview,
}: Readonly<TaskSegmentEditorProps>) {
const format = normalizeFormatValue(rawFormat)
// The pack ships exactly one video format, so editor features must stay
// available even when the format widget value is missing or unrecognized.
const isMoxieFormat = isMoxieEditorFormat(rawFormat)
const t = useT()
const draggedImageIdRef = useRef<string | null>(null)
const [promptTab, setPromptTab] = useState<PromptTab>('user')
@ -279,7 +282,7 @@ export function TaskSegmentEditor({
const promptValue = editMode === 'combined'
? combinedPromptInput
: getSelectedTaskUserPrompt(segment.content)
const usesMiniMaxPromptPlaceholder = format === 'MiniMax'
const usesMiniMaxPromptPlaceholder = isMoxieFormat
const promptPlaceholder = usesMiniMaxPromptPlaceholder
? t('multitrack.minimaxPromptPlaceholder')
: t('multitrack.promptPlaceholder')
@ -1229,7 +1232,7 @@ export function TaskSegmentEditor({
</div>
<div className="flex items-center gap-2">
{format === 'MiniMax' && (taskIndex > 0 || hasSelectedContinuityTargets) && (
{isMoxieFormat && (taskIndex > 0 || hasSelectedContinuityTargets) && (
<Select
value={continuityMode}
onValueChange={(value) => handleDropdownContentChange({
@ -1257,7 +1260,7 @@ export function TaskSegmentEditor({
</SelectContent>
</Select>
)}
{format === 'MiniMax' && ['ref','edit'].includes(mode) && (
{isMoxieFormat && ['ref','edit'].includes(mode) && (
<Select
value={refImageSize}
onValueChange={(value) => handleDropdownContentChange({ ref_image_size: value as MultiTrackRefImageSize })}

View File

@ -46,7 +46,7 @@ const comfyApp = globalThis.comfyAPI!.app.app
// Bump on every rebuilt release bundle so users can verify the served editor
// build in the browser console (stale-cache debugging).
const FRONTEND_BUNDLE_VERSION = '2026-09-27.2'
const FRONTEND_BUNDLE_VERSION = '2026-09-28.1'
comfyApp.registerExtension({
name: 'Comfy.EasyMedia.widgets',