Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

feat(flow): add canvas descriptions and align full-bleed layout

Steven Enamakelae897c167e1c
diff --git a/app/src/lib/i18n/de.ts b/app/src/lib/i18n/de.ts
index 9e8bdc7a28..a75f2b14d2 100644
--- a/app/src/lib/i18n/de.ts
+++ b/app/src/lib/i18n/de.ts
@@ -3867,7 +3867,8 @@ const messages: TranslationMap = {
'Dieser Workflow konnte nicht importiert werden. Überprüfe die Datei und versuche es erneut.',
'flows.import.warningTitle': 'Importwarnung',
'flows.canvas.title': 'Workflow',
- 'flows.canvas.description': 'Erstellen Sie diese Automatisierung Schritt für Schritt, speichern Sie sie und führen Sie sie aus.',
+ 'flows.canvas.description':
+ 'Erstellen Sie diese Automatisierung Schritt für Schritt, speichern Sie sie und führen Sie sie aus.',
'flows.canvas.loading': 'Workflow wird geladen…',
'flows.canvas.loadError':
'Dieser Workflow konnte nicht geladen werden. Bitte versuche es erneut.',
diff --git a/app/src/lib/i18n/fr.ts b/app/src/lib/i18n/fr.ts
index d49528e7ce..a51446a04a 100644
--- a/app/src/lib/i18n/fr.ts
+++ b/app/src/lib/i18n/fr.ts
@@ -3852,7 +3852,8 @@ const messages: TranslationMap = {
'flows.import.error': "Impossible d'importer ce workflow. Vérifiez le fichier et réessayez.",
'flows.import.warningTitle': "Avertissement d'importation",
'flows.canvas.title': 'Workflow',
- 'flows.canvas.description': 'Créez cette automatisation étape par étape, puis enregistrez-la et exécutez-la.',
+ 'flows.canvas.description':
+ 'Créez cette automatisation étape par étape, puis enregistrez-la et exécutez-la.',
'flows.canvas.loading': 'Chargement du workflow…',
'flows.canvas.loadError': 'Impossible de charger ce workflow. Veuillez réessayer.',
'flows.canvas.notFound': 'Ce workflow est introuvable.',
diff --git a/app/src/lib/i18n/id.ts b/app/src/lib/i18n/id.ts
index 200a85446c..d02578f0da 100644
--- a/app/src/lib/i18n/id.ts
+++ b/app/src/lib/i18n/id.ts
@@ -3776,7 +3776,8 @@ const messages: TranslationMap = {
'flows.import.error': 'Tidak dapat mengimpor alur kerja ini. Periksa file dan coba lagi.',
'flows.import.warningTitle': 'Peringatan impor',
'flows.canvas.title': 'Alur kerja',
- 'flows.canvas.description': 'Bangun otomatisasi ini langkah demi langkah, lalu simpan dan jalankan.',
+ 'flows.canvas.description':
+ 'Bangun otomatisasi ini langkah demi langkah, lalu simpan dan jalankan.',
'flows.canvas.loading': 'Memuat alur kerja…',
'flows.canvas.loadError': 'Alur kerja ini tidak dapat dimuat. Silakan coba lagi.',
'flows.canvas.notFound': 'Alur kerja ini tidak ditemukan.',
diff --git a/app/src/lib/i18n/pl.ts b/app/src/lib/i18n/pl.ts
index cfd076d13a..50563bdca0 100644
--- a/app/src/lib/i18n/pl.ts
+++ b/app/src/lib/i18n/pl.ts
@@ -3813,7 +3813,8 @@ const messages: TranslationMap = {
'Nie udało się zaimportować tego przepływu pracy. Sprawdź plik i spróbuj ponownie.',
'flows.import.warningTitle': 'Ostrzeżenie importu',
'flows.canvas.title': 'Przepływ pracy',
- 'flows.canvas.description': 'Zbuduj tę automatyzację krok po kroku, a następnie zapisz ją i uruchom.',
+ 'flows.canvas.description':
+ 'Zbuduj tę automatyzację krok po kroku, a następnie zapisz ją i uruchom.',
'flows.canvas.loading': 'Wczytywanie przepływu pracy…',
'flows.canvas.loadError': 'Nie można wczytać tego przepływu pracy. Spróbuj ponownie.',
'flows.canvas.notFound': 'Nie znaleziono tego przepływu pracy.',
diff --git a/app/src/lib/i18n/ru.ts b/app/src/lib/i18n/ru.ts
index 7b40e850b4..033d6cd8bb 100644
--- a/app/src/lib/i18n/ru.ts
+++ b/app/src/lib/i18n/ru.ts
@@ -3797,7 +3797,8 @@ const messages: TranslationMap = {
'Не удалось импортировать этот рабочий процесс. Проверьте файл и попробуйте снова.',
'flows.import.warningTitle': 'Предупреждение импорта',
'flows.canvas.title': 'Рабочий процесс',
- 'flows.canvas.description': 'Соберите этот сценарий шаг за шагом, затем сохраните и запустите его.',
+ 'flows.canvas.description':
+ 'Соберите этот сценарий шаг за шагом, затем сохраните и запустите его.',
'flows.canvas.loading': 'Загрузка рабочего процесса…',
'flows.canvas.loadError': 'Не удалось загрузить этот рабочий процесс. Повторите попытку.',
'flows.canvas.notFound': 'Этот рабочий процесс не найден.',
diff --git a/app/src/pages/FlowCanvasPage.tsx b/app/src/pages/FlowCanvasPage.tsx
index 502e3f29b2..2dd0f25302 100644
--- a/app/src/pages/FlowCanvasPage.tsx
+++ b/app/src/pages/FlowCanvasPage.tsx
@@ -221,7 +221,7 @@ export function isPlaceholderTitle(title: string, placeholder: string): boolean
function BackIcon() {
return (
<svg
- className="h-4 w-4"
+ className="h-5 w-5"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
@@ -285,10 +285,17 @@ function CanvasBackButton({ onBack }: { onBack: () => void }) {
<Button
type="button"
variant="tertiary"
- size="xs"
+ size="sm"
iconOnly
data-testid="flow-canvas-back"
aria-label={t('flows.canvas.backToList')}
+ // The header row is `items-start`, so a control shorter than the heading
+ // sits high against it rather than centred. `text-2xl`'s line box is
+ // exactly 2rem, so an `h-8` button fills it and lands on the title's
+ // optical centre; `w-8` keeps it square. The default `size="sm"` metrics
+ // (30px) miss by 2px, which is enough to read as misaligned next to a
+ // 24px heading.
+ className="h-8 w-8"
onClick={onBack}>
<BackIcon />
</Button>
@@ -309,6 +316,7 @@ function CanvasStatePage({ onBack, children }: { onBack: () => void; children: R
<div className="h-full p-4" data-testid="flow-canvas-page">
<SettingsTabbedPage
title={t('flows.canvas.title')}
+ description={t('flows.canvas.description')}
leading={<CanvasBackButton onBack={onBack} />}
scrollable={false}>
{children}
@@ -1236,9 +1244,15 @@ function FlowEditor({
)}
<SettingsTabbedPage
title={titleNode}
+ description={t('flows.canvas.description')}
leading={backButton}
headerAction={headerActions}
- scrollable={false}>
+ scrollable={false}
+ // The canvas is a single full-bleed surface, so it cancels the page
+ // gutter and runs to the content card's edges instead of floating as an
+ // inset rectangle inside it. The header keeps the gutter, so the title
+ // still lines up with every other page's.
+ bodyClassName="-mx-4 -mb-4 h-full min-h-0">
<div className="flex h-full w-full">
<div className={`relative h-full flex-1 ${hideGraph ? 'hidden' : ''}`}>
<FlowCanvas