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:
parent
f611d6c5b7
commit
33d8f5f0eb
13
__init__.py
13
__init__.py
@ -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
58
dist/release/chunks/index-ycesdkze.js
vendored
Normal file
File diff suppressed because one or more lines are too long
58
dist/release/chunks/index-ymfyx447.js
vendored
58
dist/release/chunks/index-ymfyx447.js
vendored
File diff suppressed because one or more lines are too long
2
dist/release/index.js
vendored
2
dist/release/index.js
vendored
File diff suppressed because one or more lines are too long
@ -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 })}
|
||||
|
||||
@ -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',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user