From 67dcfcb68a30062a4637da96754bbba2d2e57165 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 4 Oct 2026 09:17:27 +0000 Subject: [PATCH] fix(app-shell,i18n): the Organization flows page states how its drafts publish, and a deep-link miss shows no false "no designers" notice (objectui#11591) The package-less sheet's confirm note reads a new `preview.changes.confirmNoteSeparate` family (all ten packs): each draft publishes by itself and one that fails stays pending. A package's sheet keeps `preview.changes.confirmNote` unchanged. The Automations pillar reads the preview registry for `flow`, its one type, instead of the open flow's type, so with no flow open the canvas chip no longer says no designers are registered. Claude-Session: https://claude.ai/code/session_01FjqrwXPfSMkSfkKYDSRkN2 Co-authored-by: Claude --- .changeset/11591-org-flows-copy.md | 10 ++ .../src/preview/DraftChangesPanel.tsx | 28 ++++- ...hangesPanel.packageLessNote-11591.test.tsx | 116 ++++++++++++++++++ ...gnSurface.designerRegistryMissing.test.tsx | 26 ++++ ...ignSurface.packageLessFlows-11553.test.tsx | 64 +++++++++- .../studio-design/StudioDesignSurface.tsx | 7 +- .../confirmNoteSeparate-11591.test.ts | 115 +++++++++++++++++ packages/i18n/src/locales/ar.ts | 9 ++ packages/i18n/src/locales/de.ts | 5 + packages/i18n/src/locales/en.ts | 5 + packages/i18n/src/locales/es.ts | 6 + packages/i18n/src/locales/fr.ts | 6 + packages/i18n/src/locales/ja.ts | 5 + packages/i18n/src/locales/ko.ts | 5 + packages/i18n/src/locales/pt.ts | 6 + packages/i18n/src/locales/ru.ts | 7 ++ packages/i18n/src/locales/zh.ts | 5 + 17 files changed, 417 insertions(+), 8 deletions(-) create mode 100644 .changeset/11591-org-flows-copy.md create mode 100644 packages/app-shell/src/preview/__tests__/DraftChangesPanel.packageLessNote-11591.test.tsx create mode 100644 packages/i18n/src/__tests__/confirmNoteSeparate-11591.test.ts diff --git a/.changeset/11591-org-flows-copy.md b/.changeset/11591-org-flows-copy.md new file mode 100644 index 0000000000..cacd51d0b6 --- /dev/null +++ b/.changeset/11591-org-flows-copy.md @@ -0,0 +1,10 @@ +--- +'@object-ui/app-shell': patch +'@object-ui/i18n': patch +--- + +Studio's "Organization flows" page no longer says its drafts publish atomically, and a deep link to a flow that is not on the page no longer says no metadata designers are registered (objectui#11591). + +On the package-less page (`/studio/~org/automations`), the pending-changes sheet read "Publishing releases the 1 pending draft of this package atomically." That page has no package, and its Publish promotes each draft by itself: a draft that fails stays pending while the others go live. The sheet now says so there, through a new `preview.changes.confirmNoteSeparate` plural family in all ten language packs. A package's sheet keeps its sentence unchanged. `DraftChangesPanel` picks the sentence from its `packageId` prop: with a package, the atomic sentence; without one, the per-draft sentence. + +On the Automations pillar, the canvas chip read the designer registry for the open flow's type. With no flow open (a deep link naming a flow the list does not hold, or an empty list), it found none and showed "No metadata designers are registered in this session…" beside the right message, on a page whose flow designer is registered. The chip now reads the registry for the pillar's own type, `flow`, as the configuration panel beside it already did. The notice still shows when no designer is registered, whether or not a flow is open. diff --git a/packages/app-shell/src/preview/DraftChangesPanel.tsx b/packages/app-shell/src/preview/DraftChangesPanel.tsx index 56532f29f8..26054d525a 100644 --- a/packages/app-shell/src/preview/DraftChangesPanel.tsx +++ b/packages/app-shell/src/preview/DraftChangesPanel.tsx @@ -335,7 +335,12 @@ function EntryDetail({ entry }: { entry: DraftChangeEntry }) { export interface DraftChangesPanelProps { open: boolean; onOpenChange: (open: boolean) => void; - /** When set, list only pending drafts belonging to this package (Studio is package-scoped). */ + /** + * When set, list only pending drafts belonging to this package (Studio is + * package-scoped), and the confirm note says they publish as one atomic + * batch. Without one, the note says each draft publishes by itself + * (objectui#11591). + */ packageId?: string | null; /** * Narrows the listed drafts further, for a host whose scope the `_drafts` @@ -627,11 +632,22 @@ export function DraftChangesPanel({ {onPublish && (entries?.length ?? 0) > 0 && !error && (

- {t('preview.changes.confirmNote', { - count: entries!.length, - defaultValue: - 'Publishing releases all {{count}} pending drafts of this package atomically.', - })} + {/* objectui#11591 — the note states what THIS scope's Publish + does. Only a package publishes as one atomic batch (`POST + /packages/:id/publish-drafts`); with no package there is no + batch door, so the caller promotes each draft by itself and a + draft that fails stays pending while the others go live. */} + {packageId + ? t('preview.changes.confirmNote', { + count: entries!.length, + defaultValue: + 'Publishing releases all {{count}} pending drafts of this package atomically.', + }) + : t('preview.changes.confirmNoteSeparate', { + count: entries!.length, + defaultValue: + 'Publishing releases the {{count}} pending drafts one at a time: a draft that fails stays pending while the others go live.', + })}