Skip to content

feat(flow): discover runtime shapes and add ui fallbacks - #32

Closed
google-labs-stitch[bot] wants to merge 1 commit into
mainfrom
stitch/runtime-shape-discovery-ui-fallbacks-jm0-23299e0b-1726-4cca-82c8-843018e712ea
Closed

google-labs-stitch[bot] wants to merge 1 commit into
mainfrom
stitch/runtime-shape-discovery-ui-fallbacks-jm0-23299e0b-1726-4cca-82c8-843018e712ea

Conversation

@google-labs-stitch

Copy link
Copy Markdown
Contributor

Summary

This change adds runtime shape discovery, live mutation shape inference with pre-write validation, bounded completion timeouts, virtual grid tile resolution without data-media-id, and workspace UI fallbacks across flow-mcp.

  • Structural runtime discovery: Discovers Angular project stores, "PROJECT_TILES" query caches, active lifecycle flags, mutation dispatchers, and character preview panels by runtime structure when minified class names change.
  • Mutation and object shape inference: Infers clip arrays, workflow history arrays, character protobuf notes, and mutation field keys (single_tile, set_display_name, set_character_personality_notes, set_video_trim_seconds, batch_move_to_collection, batch_set_tiles_trashed, create_scene, add_workflows_to_scene, create_entity, create_collection) from live objects and function signatures.
  • Pre-write validation: Validates store and mutation shapes before any write and blocks direct dispatch when probes find partial or multiple candidates. Removes blind multi-alias mutation keys.
  • Bounded callback timeouts: Enforces bounded completion timeouts on scene creation, scene clip insertion, video trims, character creation, and trash confirmation.
  • Virtual grid locator and library UI fallbacks: Locates media, character, scene, and collection tiles in the virtual grid without data-media-id, rejects ambiguous matches, and adds UI fallbacks for uploads, asset renames, asset trash, collection list/create/rename/add/remove/delete, and character personality notes and reference slots.
  • Workspace Agent panel UI fallbacks: Adds UI fallbacks for Agent sessions, prompts, attachments (assets, characters, and local files), user decisions (permission, question, and plan cards), turn stop/resume, and project settings (confirmation policy, image/video defaults, and memory cards).

Verification

  • Ran cargo xtask ci (cargo fmt, cargo xtask check, cargo clippy, cargo doc --document-private-items, cargo build, and cargo deny).
  • Ran strict release and documentation builds (RUSTFLAGS="-D warnings" cargo build --release --locked --bin flow-mcp and RUSTDOCFLAGS="-D warnings" cargo doc --locked --workspace --no-deps --document-private-items).
  • Ran end-to-end stdio MCP verification over Chrome DevTools Protocol across unknown minified builds and storeless UI-fallback workspaces.

Verification Screenshots

Runtime Shape Discovery on Unknown Minified Build

Runtime shape discovery workspace

Library Grid, Collections, and Character UI Fallbacks

Library UI fallback workspace

Workspace Agent Panel UI Fallbacks

Agent panel UI fallback workspace


Automated PR initiated by user @byteland-app via Stitch Loop.

- Discover project stores, tile caches, and preview panels at runtime.
- Infer clip lists, workflow history, and mutation field keys.
- Validate store and mutation shapes and block ambiguous writes.
- Enforce bounded timeouts on asynchronous completion callbacks.
- Locate virtual grid tiles without data-media-id attributes.
- Add UI fallbacks for uploads, renames, trash, collections, and bios.
- Add Agent panel UI fallbacks for chat, decisions, and settings.

Copy link
Copy Markdown
Contributor

This branch uses code shape to select mutation fields on unverified builds. A shape match does not establish the write contract for the active build. Keep inferred store and layout discovery read-only. Use a verified build and matching operation contract for native writes. Send independent UI fixes in small changes based on main, with checks that prove the project and asset before any write. Closing this broad, conflicting branch.

@byteland-app
byteland-app deleted the stitch/runtime-shape-discovery-ui-fallbacks-jm0-23299e0b-1726-4cca-82c8-843018e712ea branch November 25, 2026 07:47
@google-labs-stitch

Copy link
Copy Markdown
Contributor Author

Acknowledged, @byteland-app. I am leaving PR #32 closed as requested rather than pushing further commits to this broad, conflicting branch:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant