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.
Settings contributions
Paths are relative to the webv2 src/ directory.
Owners declare settings; Workbench presents them. Platform UI owns domain-neutral field metadata and controls, not setting values or persistence. Widget manifest exposes a settings contribution: localized field metadata, ordered quick subset, deferred field binding loader. Full dialog includes every declared field. Bindings keep owner's normalization and command path, including Gallery's size/density conversion and project/instance fencing. Gallery's field metadata lives in the feature (features/gallery/settingsContribution.ts); its contribution and binding live in workbench/widgets/gallery/, like Canvas, Preview and Image Map, because the binding edits defaults without a Gallery UI provider (the Launchpad has none).
Workbench composes widget and application contributions into a metadata-only catalog, shared by search, dialog navigation, quick popovers, and command-palette destinations. Features publish contribution metadata through registered public entries; loading metadata must not load their UI or start data queries. Application-owned additions can join a widget section without changing owner of their values. Deferred resources cache code only; field subscriptions exist only while their controls are mounted.
Each field declares a scope: preference (account, or install when nobody is signed in), project (layered, below), server (server configuration, admins only), or none (actions, not values). Section placement does not determine storage lifetime. Every surface lists every section this account can edit; only Server needs canManageAppConfig.
Account preferences (WorkbenchPreferences), the saved lists among them (aspect ratios, Generate presets, rebalance presets), are stored as one blob: each write sends the whole of it, and the last writer wins. An older build, or a tab still holding an older snapshot, drops the keys it does not know, or the list as it last read it, on its next preference write.
A project field resolves as the project's pin, then the user's default, then the owner's built-in. Pins are the keys present in the widget instance's state.values, or the optional generation flags in ProjectSettings; persistence keeps them raw. The generation flags (CPU noise, NSFW checker, watermark) are the Generate widget's settings, behind its cog, but they are project settings: every generation in the project reads them, and they pin on the project whichever widgets it has. Defaults live in WorkbenchPreferences.scopedDefaults, keyed by widget type id (gallery, canvas, preview, image-map, and generate, whose record layers over ProjectSettings, never over the Generate widget's values), each holding only keys the user chose (a default equal to the built-in is removed). getLayeredSettings in projectSettings.ts is the one list of layerable keys: resolution merges only those, the settings store drops any other, and the document codec reads its frozen built-ins (see projects/README.md). The workbench store seeds the mirror of the defaults when it is created and the runtime keeps it current; reads resolve at the generic seams (getResolvedProjectWidgetValues, getEffectiveProjectSettings), a project without the widget reading the defaults alone. Resolved reads return ResolvedValues, and readers of layerable keys accept only that type, so stored pins fail to compile there; getProjectWidgetValues stays raw for writes and persistence. Exception: stripInfiniteWindowAnchor reads the pinned paginationMode raw, because a project document has no account defaults. A widget's runtime getSnapshot returns resolved values while set replaces raw pins, so widgets write with patch. Inside a project the dialog and gear popover edit pins. A widget owner's pins live on the project's instance of its type (getProjectWidgetInstance), the one every reader resolves, since layered widgets allow one instance and aliases such as gallery:center share it; a requested instance target only fences, staying editable while it exists with the owner's type. Without one (the Launchpad, or a project lacking that widget) the same field edits the default (never for the Generate section, which pins on the project), and its section says "Defaults for every project. A project can pin its own value." There is no unavailable state: search results are always editable. useLayeredSetting(ownerId, key, target, read, builtIn, field) is the one binding seam for layered fields: it returns value, layer, setter and disabled state, fences pin writes against stale account/project/instance, and disables a requested target that is no longer current. Shell disposes target-bound editing when projects change.
Settings host owns dialog's presence lifecycle and keeps its root mounted through closing. Body deferred until first opening, stays present during exit, unmounts afterward. Quick-popover handoff carries both instance target and original gear for focus restoration.
Before section navigation becomes available, deferred dialog prepares binding/editor code without mounting editors or starting their queries. Section and scroll position survive closing within account lifetime. A row with a value of its own shows a dot after its label (SettingLayerIndicator, given a SettingLayer by the binding). Pinned: "Use as my default" copies the pin to the default and clears it; "Follow my default" clears it, its hint naming the value that follows. Default (a layered default or plain preference changed from the built-in): "Reset to Invoke default". On a layered row (useLayeredSetting) each of these three reports itself with an Undo (notify.undoable), naming the value the setting now takes. A later action withdraws an earlier Undo for the same key: account-wide (settings-layer:<owner>:<key>) for the two that change the default, per project for "Follow my default", whose Undo "Use as my default" also withdraws in its project (re-pinning would leave the new default nothing to restore). Undo may run long after, while another project is active, so it restores only while the setting still holds what the action left (the key unpinned, the default as written), and does nothing for another account. It re-pins by project id (the project's own instance of the owner's type, whatever instance the row targeted, or the project's settings for the Generate flags). The dot is a 24px button opening a menu, inline with fixed positioning so the modal dialog's focus scope keeps it and the gear popover's scroll area does not clip it (a click inside it does not reach a boolean row's label); a change whose row has its own way back is a plain glyph. Its accessible name is the setting's name and state; menu item hints are descriptions. An action that removes the dot moves focus to the row's control. Quick settings use shared arrowed popover with inner scroll area; dialog selects keep their bounded scroll areas inside modal focus scope.
Production chunking keeps catalog and manifest metadata separate from editor boot UI. Build gate checks that Launchpad’s palette and settings dialog do not statically include editor application or widget renderer. Shared settings controls stay in common UI chunk; owner field bindings and custom editors stay deferred.
Data & workspace keeps everyday actions (revert layout, intermediates, database and gallery maintenance) apart from "Clear saved data", which has its own warning-toned area: it deletes every server project of the account (or install) and all settings, then reloads. Its confirmation names the project count, says media is kept (boards go to the Library, inbox items to Uncategorized), links to Projects for exporting first, and needs a typed word. There is no project trash: the backend deletes projects permanently.
Language availability
The saved language is a requested preference, preserved through aliases and imports even when its content is unavailable. Build metadata derives coverage from locale catalogs. Readiness is an explicit declaration: English is ready; English regional choices inherit it. Empty catalogs are unavailable and nonempty undeclared catalogs are incomplete. Both show explained English content while retaining the saved choice. The startup hint and i18n controller apply the effective content language and direction, so English fallback is English/LTR even for an Arabic preference. Catalog coverage alone never declares a translation ready.
Gallery Maintenance requests belong to the captured account, not the visibility of the settings view. Activity hide releases view registrations while previews and confirmed executions settle retained state, including results/errors and running state. Account changes fence every completion and refresh; hiding never reauthorizes or repeats a mutation.