Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

2.6 KB
Raw Blame

Intermediates

Paths are relative to the webv2 src/ directory.

Intermediates owns manager for temporary media behind @features/intermediates: transport mapping, account-fenced query keys, selection core, confirmation dialog, operation panel. It is a Settings section, contributed as metadata via settingsContribution so dialog's catalog never loads manager or its transport until section opens. Eligibility policy (safe, referenced, active, recent) is server-owned; manager requests a server preview, which fixes the instant recency is judged at and describes what a cleanup would delete and keep, and confirms it once. "All matching" selections travel as a matching scope carrying summary's filters and excluded rows, which server resolves; client never enumerates pages it has not loaded. Server does not persist operations: a manager that opens with nothing followed lists account's operations and follows newest unfinished one, so a reload picks a running cleanup back up; a settled operation that left failures behind offers to delete its scope again.

Client's one input to policy is a browser hold lease: holdLease (public entry, started by Workbench for provider's lifetime) keeps media open editors still need (live content from every open project plus undo state each live Canvas engine retains) classified as active. Workbench owns name set: workbench/projects/projectAssets scans each immutable project subtree once, and each Canvas engine registers its retained undo state with mounted Workbench, which re-reads it when history changes; an engine released by one Workbench is replaced, not reused, by the next, and one another Workbench still uses is refused. One lease per tab, holding up to server's per-kind limit of sorted unique names, which server replaces atomically. Lease skips unchanged sets without re-serialising them; forgets a send the server did not acknowledge so next change, heartbeat or return to foreground sends again while previous lease still stands; refreshes every five minutes and when a tab becomes visible after missing a refresh; releases with keepalive on dispose and pagehide. Server keeps at most eight leases per account and expires a lease after 15 minutes, bounding anything a crash leaves behind.

Realtime updates attach for section's mounted lifetime through Platform socket hub and invalidate account's summaries when an operation settles (by socket or polled record) or when socket reconnects. Workbench supplies entry points (Data & workspace link, project actions menu, Users page callback) and hands manager a one-shot focus intent (a project to preselect or an account to filter by), not route state.