• …k, stale-task recovery, pagination
    
    Person reference photos (any subset of full-body/face x front/side/back) +
    one garment image -> async background task generating front/side/view
    composites of that person wearing the garment, via either GPT Image 2
    (万界方舟) or wavespeed.ai's Seedream v4. Split into three pages
    (admin-dressgen.html create / admin-dressgenlist.html list /
    admin-dressgendetail.html detail) since the combined page's operations
    column was easy to lose off-screen; the list page's action column is now
    sticky and every thumbnail opens a click-to-zoom preview.
    
    Default provider (image2) auto-falls-back to wavespeed per view on any
    failure — an explicit, later product decision overriding this session's
    earlier "no auto-switching around moderation" stance, recorded in the code
    comment above WAVESPEED_API_KEY. A crashed/restarted process no longer
    leaves a task stuck in "generating" forever (resumeDressgenTasks(), same
    idea as T8's resumeDressupGenerations()). GET /api/admin/dressgen is now
    paginated (?page=&pageSize=, defaults 20) instead of returning the whole
    file as a bare array.
    
    19 tests in dressgen-generate.test.js, including a real crash-and-restart
    scenario (SIGKILL against a hanging mock, second process reading the same
    on-disk store) and the auto-fallback path.
    
    Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01Px7XHxSdWfd5b3vfNMwQjd
    yibo authored
     
    Browse File »