Repository navigation
fix(flow): verify generation controls and composer state - #39
google-labs-stitch[bot] wants to merge 3 commits into
Conversation
- Default video_type to ingredients and reject invalid video options - Map veo-3.1-fast and legacy slugs to live model family labels - Match model family labels and Wqa entries with anchored patterns - Verify active Qa model and SKb aspect ratio after UI selection - Clear stale prompt text and ingredient chips before new runs - Reject all 11 Rp disable codes before generation submission
byteland-app
left a comment
There was a problem hiding this comment.
src/generation.rs:105–127 turns an explicit Veo 3.1 Fast request into Veo 3.1 Lite. Preserve the explicit family on builds that still offer it. If it is unavailable, return that result before submission. Keep any default model change separate. Verify explicit Fast and Lite selections on both legacy and current builds, together with the omitted-model path. Also require a readable matching aspect ratio and model state before you submit. ts/setup_generation.ts:735–781 currently accepts absent state after the click.
- Separate default model candidates from explicit model normalization - Preserve explicit Veo 3.1 Fast and reject unavailable model families - Require readable aspect ratio and model state before submission - Update flow_generate model documentation for legacy and live builds
|
Addressed in commit
|
|
Changes requested.
This PR overlaps with #43 and #50 (same ts files, |
- Enforce the 10-code Rp disable list and allow single start frames. - Fall back cleanly when Flow omits Qa aspectRatio or model signals. - Keep aspect and model unset for run_edit and preserve inline edits. - Ignore blank character or asset IDs and skip redundant mode clicks. - Share composer readers, agent selectors, and TS-only model aliases.
|
Addressed all 7 review items in
|
|
Closing this pull request. It conflicts with |
Summary
Fixes silent model substitution, redundant video mode toggles, stale composer chip leakage, and false-ready disabled attachments across
src/generation.rsandts/:Preserve explicit model families and support ordered default fallbacks (
src/generation.rs,ts/generation_state.ts,ts/setup_generation.ts,ts/submit_generation.ts)ts/generation_state.ts), mapping explicit model inputs ("veo-3.1-fast","Veo 3.1 Fast","Veo 3.1 Lite","Veo 3.1 Quality","Veo 2 Fast","Veo 2 Quality","Nano Banana","Nano Banana 2","Nano Banana Pro","Imagen 4") to anchored^...$matchers and exactQa.modelfamily IDs without cross-family rewriting.default_models(["Veo 3.1 Lite", "Veo 3.1 Fast"]forvideo,["Nano Banana 2"]forimage) only on standard non-editflow_generatecalls whenmodelis omitted, while leavingaspectandmodelunset duringrun_edit(edit: true/inline_edit: true) so image edit fallbacks work on any aspect ratio and active model.aspect: "1:1"(and"square") invideomode, ignores blank strings incharacters/asset_ids(such ascharacters: [""]), and rejects non-emptycharacterswhenvideo_typeis"frames".flow-menu-item-actions(UpgradeCTAs) when clicking menu items insideflow-menu-item.Verify exposed
Qasignals with best-effort fallback when unexposed (ts/generation_state.ts,ts/setup_generation.ts,ts/submit_generation.ts,ts/types.ts)Qa.config.aspectRatio()(SKb:LANDSCAPE,PORTRAIT,SQUARE,LANDSCAPE_4_3,PORTRAIT_3_4) and activeQa.modelsignals (ala/cla/videoModelFamilyId/imageModelFamilyId/family) whenever Google Flow exposes them, returningunsupported_modelorunsupported_aspect_ratiobeforeclick_pointon clamped or unavailable options.Qa,Qa.config.aspectRatio(), orQa.modelsignals."Video type"when an explicitvideo_typeis requested or whenQa.config.mode()/ frame upload slots show the composer is inVIDEO_FRAMESand needs to return toVIDEO_REFERENCES.Deduplicate composer helpers, clear stale items, and enforce the 10-code
Rpdisable allow-list (ts/composer.ts,ts/attach_ingredients.ts,ts/submit_generation.ts)AGENT_COMPOSER_SELECTOR,readComposerItems,isPromptItemLoading,promptItemDisabledReason,inspectPromptAttachments, and the 10-codeLIVE_RP_DISABLE_CODESallow-list ints/composer.ts.MISSING_PAIRED_FRAMEfromLIVE_RP_DISABLE_CODESand checksLIVE_RP_DISABLE_CODES.has(code)so a single first frame invideo_type: "frames"and unlistedRpstrings succeed while the 10 terminal ingredient disable codes fail fast.ingredientTargets.length === 0) while preserving composer state on/edit/routes andinline_editcalls.Update tool documentation (
docs/en/tools-reference.md,docs/zh-CN/tools-reference.md,docs/ja/tools-reference.md)flow_generatemodel,aspect,characters, andvideo_typedefaults and constraints in English, Simplified Chinese, and Japanese.Verification
cargo fmt --all -- --checkcargo xtask ci(SPDX headers, 800-line file limit, doc-example fence check, forbidden patterns,tsc --noEmit, live Flow contract check,clippy -- -D warnings,rustdoc -D warnings, workspace build,cargo deny)cargo xtask collect-licenses&cargo build --release --locked --bin flow-mcpflow-mcpMCP stdio E2E verification suite (8/8 checks passing):