content.js: auto-click "Try again" on Flow's transient error; fix 2 queue ratios
Flow throws "Something went wrong. Please try again" constantly under load; the driver treated it as terminal (task FAILED, moves on). Now it clicks the Try again button — same prompt re-runs — up to 3x with a 15s cooldown so a lingering banner doesn't burn all retries. Gives up only after 3 shots or an error banner with no retry button. queue.jsonl: retarget the 2 unsupported aspect ratios (16:5, 21:9) to 16:9 — Nano Banana 2 only supports 16:9/1:1/3:4/4:3/9:16, otherwise the agent asks a clarifying question and produces no asset (driver times out). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
501431bf59
commit
72a793932f
33
content.js
33
content.js
@ -192,13 +192,36 @@ function flowError() {
|
||||
(e.textContent || '').length < 90);
|
||||
}
|
||||
|
||||
// Poll for: a new asset (win), a Flow error banner (fast-fail), or timeout.
|
||||
// The grace period avoids catching a stale error banner from the previous turn.
|
||||
async function waitForResultOrError(baseCount, maxMs) {
|
||||
// Flow's "Try again" button, shown beside the "Something went wrong" banner.
|
||||
// Clicking it re-runs the SAME prompt (no re-injection needed) — the manual fix.
|
||||
function findTryAgain() {
|
||||
return [...document.querySelectorAll('button, [role="button"]')]
|
||||
.find(b => visible(b) && !b.disabled && /^\s*try again\s*$/i.test(b.innerText || ''));
|
||||
}
|
||||
|
||||
// Poll for: a new asset (win), or Flow's transient "Something went wrong". Flow
|
||||
// errors constantly under load, so instead of failing we AUTO-CLICK "Try again"
|
||||
// (what works by hand) up to maxRetries, with a cooldown so a lingering banner
|
||||
// doesn't burn all the retries at once. Returns 'asset' | 'error' | null(timeout).
|
||||
async function waitForResultOrError(baseCount, maxMs, maxRetries = 3) {
|
||||
const t0 = Date.now();
|
||||
let retries = 0, cooldownUntil = 0;
|
||||
while (Date.now() - t0 < maxMs) {
|
||||
if (snapshotAssets().size > baseCount) return 'asset';
|
||||
if (Date.now() - t0 > 8000 && flowError()) return 'error';
|
||||
const now = Date.now();
|
||||
if (now > cooldownUntil) {
|
||||
const btn = findTryAgain();
|
||||
if (btn) {
|
||||
if (retries >= maxRetries) return 'error'; // gave it maxRetries shots
|
||||
retries++;
|
||||
log('info', `Flow hiccup — clicking "Try again" (${retries}/${maxRetries}).`);
|
||||
btn.click();
|
||||
cooldownUntil = now + 15000; // let it re-generate before re-checking
|
||||
await sleep(4000);
|
||||
continue;
|
||||
}
|
||||
if (now - t0 > 8000 && flowError()) return 'error'; // errored, no retry offered
|
||||
}
|
||||
await sleep(2500);
|
||||
}
|
||||
return null;
|
||||
@ -251,7 +274,7 @@ async function executeTask(task) {
|
||||
// Wait for a new asset, a Flow error (fast-fail), or timeout. Images should be quick.
|
||||
const timeoutMs = task.kind === 'image' ? 3 * 60 * 1000 : settings.genTimeoutMs;
|
||||
const outcome = await waitForResultOrError(before.size, timeoutMs);
|
||||
if (outcome === 'error') throw new Error('Flow errored ("Something went wrong") — skipping.');
|
||||
if (outcome === 'error') throw new Error('Flow errored ("Something went wrong") after retries — skipping.');
|
||||
if (outcome !== 'asset') {
|
||||
const wall = [...document.querySelectorAll('*')].some(e => visible(e) &&
|
||||
/out of credits|no credits|insufficient|quota exceeded|run out of|daily limit|reached your limit/i.test(e.textContent || '') &&
|
||||
|
||||
@ -71,7 +71,7 @@
|
||||
{"id": "game_ui_items_070", "kind": "image", "model": "Nano Banana 2", "prompt": "An empty UI modal window frame for a 90s Australian DJ sim, designed to overlay a 3D game world, on a fully transparent background. A dark translucent near-black panel (rgba(6,6,12,0.8)) with slightly rounded corners and a crisp thin 1px hot-pink #ff5cad neon border with a faint outer glow. Across the top, a header bar with an uppercase wide-tracked Courier New monospace title placeholder and a small square close 'X' button in the corner. A subtle inner divider line in neon green #3dff8b beneath the header. Bottom edge has two dark block buttons with thin neon borders (one green-accented 'hover' state). Empty content area in the middle. Flat matte terminal aesthetic, CRT street-press feel, high contrast, sharp clean vector edges, no photorealism. Landscape 4:3.", "title": "Menu frame / modal window chrome", "category": "game_ui_items"}
|
||||
{"id": "game_ui_items_071", "kind": "image", "model": "Nano Banana 2", "prompt": "A single milk-crate full of vinyl records as a game inventory item icon for a 90s Australian DJ sim, three-quarter angle, centered on a transparent near-black background (#0a0a12). Low-poly flat-shaded plastic milk crate in a faded warm color, stuffed with a row of vertical record sleeves whose visible spines are a mix of hot pink #ff5cad, gold #ffd23d, neon green #3dff8b, cyan #4dd8ff and grimy brown card \u2014 a well-dug second-hand crate. Slightly sun-faded, dusty, one sleeve pulled up higher than the rest. Matte materials, no gloss, warm nostalgic op-shop grade, chunky readable silhouette. Sits in a dark translucent UI panel with a thin neon green border. Reads clearly at 64px, crisp edges, high contrast, no photorealism. Square 1:1.", "title": "Milk-crate record box item icon", "category": "game_ui_items"}
|
||||
{"id": "game_ui_items_072", "kind": "image", "model": "Nano Banana 2", "prompt": "A 2D flat back-panel diagram UI for a DJ signal-chain wiring puzzle in a 90s sim game, on a transparent dark background (#06060c) inside a dark translucent panel with a thin neon border. Head-on view of the rear of a brushed-aluminium hi-fi amp: a labelled row of sockets in uppercase Courier New mono \u2014 'PHONO L', 'PHONO R', 'LINE', and a 'GND' ground screw terminal. A red RCA plug and a white RCA plug (with a green ground wire) float nearby, mid-drag, one hovering over its matching hole with a neon-green #3dff8b snap-highlight ring. Flat schematic style, low-poly-friendly, period-correct 1990s connectors, matte silver and black, grimy CRT diagnostic aesthetic, thin neon accents, high contrast, crisp clean edges, no photorealism. Landscape 4:3.", "title": "Flip-the-rig back-panel connection view", "category": "game_ui_items"}
|
||||
{"id": "game_ui_items_073", "kind": "image", "model": "Nano Banana 2", "prompt": "A game HUD status cluster for a 90s Australian DJ life-sim, on a fully transparent background, meant to float over a 3D world. A horizontal dark translucent bar (rgba(6,6,12,0.8)) with a thin 1px neon green #3dff8b top border. Left: a small pixel-clock and calendar readout in uppercase Courier New mono ('THU ARVO'). Center: a segmented energy bar with a bright neon-green fill about two-thirds full over a dark track. Right: a nag chip in a thin hot-pink #ff5cad neon border reading 'NEXT GIG: FRI NIGHT \u2014 IN 3'. Along the very bottom, a thin scrolling street-press ticker strip with faint marquee text. Flat matte terminal aesthetic, tight letter-spacing, CRT feel, high contrast, crisp edges, no photorealism. Wide 16:5 banner layout.", "title": "HUD status bar cluster (clock + energy + gig nag)", "category": "game_ui_items"}
|
||||
{"id": "game_ui_items_073", "kind": "image", "model": "Nano Banana 2", "prompt": "A game HUD status cluster for a 90s Australian DJ life-sim, on a fully transparent background, meant to float over a 3D world. A horizontal dark translucent bar (rgba(6,6,12,0.8)) with a thin 1px neon green #3dff8b top border. Left: a small pixel-clock and calendar readout in uppercase Courier New mono ('THU ARVO'). Center: a segmented energy bar with a bright neon-green fill about two-thirds full over a dark track. Right: a nag chip in a thin hot-pink #ff5cad neon border reading 'NEXT GIG: FRI NIGHT \u2014 IN 3'. Along the very bottom, a thin scrolling street-press ticker strip with faint marquee text. Flat matte terminal aesthetic, tight letter-spacing, CRT feel, high contrast, crisp edges, no photorealism. Wide 16:9 banner layout.", "title": "HUD status bar cluster (clock + energy + gig nag)", "category": "game_ui_items"}
|
||||
{"id": "game_ui_items_074", "kind": "image", "model": "Nano Banana 2", "prompt": "A weekly cinema movie-poster card as UI item art for a 90s Australian DJ sim's Regent second-run cinema, centered on a transparent dark background (#06060c). A portrait poster inside a chunky low-poly marquee frame with small round bulb lights around the edge, a few unlit to feel worn. The poster art is a garish invented 90s B-movie in gold #ffd23d, hot pink #ff5cad and cyan #4dd8ff \u2014 bold hand-painted comedy movie lettering (abstract, no readable studio name), sun-faded and slightly torn at one corner. A small 'NOW SHOWING' banner in uppercase Courier New mono across the bottom. Sticky-carpet grimy nostalgic grade, matte flat materials, warm point-light glow from the marquee bulbs, high contrast, crisp edges, readable at 80px, no photorealism. Portrait 3:4.", "title": "Movie marquee / weekly poster card", "category": "game_ui_items"}
|
||||
{"id": "game_ui_items_075", "kind": "image", "model": "Nano Banana 2", "prompt": "A single black DJ flight case as a game inventory item icon for a 90s Australian DJ sim, three-quarter closed view, centered on a transparent near-black background (#0a0a12). Low-poly flat-shaded rugged road case: matte black textured panels, chunky metal corner protectors, and two silver butterfly latches on the front, a recessed handle on top. Worn stickers and a strip of peeling gaffer tape on the lid (heavily gigged, second-hand feel), a small VG grade chip decal in gold #ffd23d on the corner. Faint neon green #3dff8b rim light on the near edge. Warm grimy nostalgic grade, matte materials, no gloss, chunky readable silhouette. Sits in a dark translucent UI panel with a thin hot-pink neon border. Reads clearly at 64px, crisp edges, high contrast, no photorealism. Square 1:1.", "title": "Flight-case gear item icon", "category": "game_ui_items"}
|
||||
{"id": "game_keyart_076", "kind": "image", "model": "Nano Banana 2", "prompt": "Marketing key art / title-screen composition for a 90s Australian DJ life-sim video game. Low-poly, flat-shaded 3D diorama style (Schedule 1 / THRIFTGOD lineage): blocky chunky geometry, flat matte materials (roughness ~0.85, almost no gloss on world surfaces), readable silhouettes over detail, deliberately un-photoreal early-3D console look. Center: a scruffy broke bedroom DJ character (battle-DJ street lean, baggy tee, cap, worn cargo pants) hunched over twin silver Technics-style turntables and a black 2-channel battle mixer on a dark walnut DJ table, one hand on the platter mid-scratch. Flanking him as a duo: on the left a short round furry PURPLE monster mascot, squat and huggable; on the right a glossy CHROME BLUE robot mascot with a clean shiny toy sheen \u2014 both mascots rendered noticeably shinier and cuter than the matte grimy world around them. Night lighting: deep blue-black sky gradient from #ff7848 at top down into #28285c, neon signs igniting. Neon accent trio dominant \u2014 neon green #3dff8b, hot pink #ff5cad, gold #ffd23d \u2014 as club-neon glow rimming the characters. Warm point lights #ffd9a0 on faces. Grimy nostalgic warm grade, sticky-carpet texture, dust in the air. Big empty upper region reserved for a game title. Eye-catching, poster-grade, still on-brand low-fi. 16:9.", "title": "Hero Trio Title Screen", "category": "game_keyart"}
|
||||
@ -88,4 +88,4 @@
|
||||
{"id": "game_keyart_087", "kind": "image", "model": "Nano Banana 2", "prompt": "Collector-focused key art for a 90s DJ life-sim: the battle-tape grail. Low-poly flat-shaded 3D diorama, blocky matte props, un-photoreal, warm nostalgic grade. Hero subject: a single worn VHS tape resting on a TELLY + VCR combo, its skinnable cover art reading like a bootleg battle-tape ('X-MEN in X-ERCIZE #1' style hand-drawn sleeve), with faint tracking lines suggesting a low-generation dub. Around it: a collection wall / 'Pok\u00e9dex' archive of twelve VHS spines in a shelf, some greyed-out as unowned, black DJ headphones, a milk-crate of vinyl, a scruffy DJ character reaching for the tape. Setting: the home-hub bedroom, sticky carpet, cozy clutter. Lighting: warm LATE-night TV glow \u2014 the telly casting cold #8090ff blue light plus a warm #ffc880 lamp, deep blue-black room. Neon-green #3dff8b accent from a small sign, hot pink #ff5cad UI-panel glow floating with Courier-mono labels. Nostalgic, obsessive-collector mood, grimy and warm. Three-quarter angle, title space upper-right. 16:9 store still.", "title": "VHS Battle-Tape Grail", "category": "game_keyart"}
|
||||
{"id": "game_keyart_088", "kind": "image", "model": "Nano Banana 2", "prompt": "Character-driven key art for a 90s Australian DJ life-sim: the mentor moment. Low-poly flat-shaded 3D diorama, blocky matte characters, un-photoreal, warm nostalgic grade. Scene: Deckhand Dave \u2014 a warm, mate-ish, street-lean older DJ NPC (worn tee, stubble, cap) \u2014 grabs the young player DJ's wrist and guides it across the platter of a silver Technics-style turntable, teaching a scratch ('nah, like THIS'), the black battle mixer between them, a comic speech bubble in Courier-mono. Setting: a cramped bedroom-DJ corner, milk-crate of vinyl, black bookshelf speakers with exposed woofers, closed-back headphones on the table, poster-of-the-week on the brick wall. Lighting: warm evening lamplight, warm point light #ffd9a0 over the decks, deep blue dusk outside (sky #ff7848 to #28285c), a soft neon-green #3dff8b glow from a window sign. Genuine, funny, human, second-hand grimy. Intimate two-shot, over-the-decks angle. Space at top for title. 16:9 promo still.", "title": "Deckhand Dave Mentor", "category": "game_keyart"}
|
||||
{"id": "game_keyart_089", "kind": "image", "model": "Nano Banana 2", "prompt": "Serene key art for the CHILL precinct of a 90s Australian DJ life-sim. Low-poly flat-shaded 3D diorama, blocky matte geometry, un-photoreal, warm sun-bleached textures. Scene: THE ESPY, an old seaside suburb at golden hour \u2014 salt-bleached weatherboard cottages, tall Norfolk pines, a retro milk bar with a hand-painted sign (Gull's Milk Bar), a low seawall, a calm flat ocean horizon, an unmarked arcade stairwell hinting at a specialist DJ import shop below. A relaxed chill-lean DJ character sits on the seawall with headphones on and a milk-crate of vinyl beside them, watching the water. ARVO golden-hour lighting: warm sky gradient #ffd890 at top to #88a8d0 at bottom, long warm shadows, hazy sun flare, gulls. Palette: warm cream, faded blue-grey, weathered timber, a single gold #ffd23d neon accent on the milk bar starting to glow. Nostalgic, calm, wistful, warm Australian 90s summer. Wide, tranquil, low horizon. Big sky for logo. 16:9 store-page still.", "title": "Espy Golden-Hour Chill", "category": "game_keyart"}
|
||||
{"id": "game_keyart_090", "kind": "image", "model": "Nano Banana 2", "prompt": "Wide hero banner / store-page header key art for a 90s Australian DJ life-sim by MonsterRobot Games. Low-poly flat-shaded 3D diorama, blocky matte geometry, un-photoreal early-3D look, Courier-mono CRT aesthetic. Composition built as a wide horizontal banner with a strong empty central zone for the game logo. Left third: the scruffy player DJ mid-scratch on twin silver Technics-style decks, black battle mixer, milk-crate of vinyl, warehouse grime. Right third: the two studio mascots as a duo \u2014 a round furry PURPLE monster and a glossy CHROME BLUE robot, both bright, shiny and cute against the matte world, waving. Connecting them across the middle: a wall of gig flyers, a cinema marquee, a BUS 96 sign, and floating low-poly 90s icons (vinyl, Concorde cartridge, headphones, VHS tape). NIGHT lighting, deep blue-black sky #ff7848 into #28285c, neon signs blazing \u2014 neon green #3dff8b, hot pink #ff5cad, gold #ffd23d, cyan #4dd8ff \u2014 reflecting on wet pavement. Thin neon border framing, Courier-mono street-press ticker along the bottom edge. Warm grimy nostalgic, one shiny mascot exception. Ultra-wide 21:9 banner, generous center margin for title.", "title": "Neon Logo Wide Banner", "category": "game_keyart"}
|
||||
{"id": "game_keyart_090", "kind": "image", "model": "Nano Banana 2", "prompt": "Wide hero banner / store-page header key art for a 90s Australian DJ life-sim by MonsterRobot Games. Low-poly flat-shaded 3D diorama, blocky matte geometry, un-photoreal early-3D look, Courier-mono CRT aesthetic. Composition built as a wide horizontal banner with a strong empty central zone for the game logo. Left third: the scruffy player DJ mid-scratch on twin silver Technics-style decks, black battle mixer, milk-crate of vinyl, warehouse grime. Right third: the two studio mascots as a duo \u2014 a round furry PURPLE monster and a glossy CHROME BLUE robot, both bright, shiny and cute against the matte world, waving. Connecting them across the middle: a wall of gig flyers, a cinema marquee, a BUS 96 sign, and floating low-poly 90s icons (vinyl, Concorde cartridge, headphones, VHS tape). NIGHT lighting, deep blue-black sky #ff7848 into #28285c, neon signs blazing \u2014 neon green #3dff8b, hot pink #ff5cad, gold #ffd23d, cyan #4dd8ff \u2014 reflecting on wet pavement. Thin neon border framing, Courier-mono street-press ticker along the bottom edge. Warm grimy nostalgic, one shiny mascot exception. Ultra-wide 16:9 banner, generous center margin for title.", "title": "Neon Logo Wide Banner", "category": "game_keyart"}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user