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.

fix(preview): drop the duplicate title from the center header when nothing is selected

joshistoaste43458000796
diff --git a/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewWidgetChrome.tsx b/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewWidgetChrome.tsx
index 27238a8aaf..18b44b593c 100644
--- a/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewWidgetChrome.tsx
+++ b/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewWidgetChrome.tsx
@@ -9,13 +9,19 @@ import { usePreviewHeaderContext } from './previewHeaderStore';
/**
* The preview widget's header label: `[board] / [image]` for the current
* selection (published by the view via `previewHeaderStore`), falling back to
- * the static "Preview" title when nothing is selected.
+ * the static "Preview" title when nothing is selected — except in the center,
+ * whose view trigger already names the widget (the gallery label does the
+ * same).
*/
-export const PreviewWidgetLabel = (_props: WidgetLabelProps) => {
+export const PreviewWidgetLabel = ({ region }: WidgetLabelProps) => {
const { t } = useTranslation();
const { boardName, itemName } = usePreviewHeaderContext();
if (!itemName || !boardName) {
+ if (region === 'center') {
+ return null;
+ }
+
return (
<Text fontSize="xs" fontWeight="700">
{t('widgets.labels.preview')}