Repository navigation
feat(studio): an open flow in Studio can be deleted from its ⋯ menu - #28126
Merged
Merged
Conversation
An open flow of a writable package gets a ⋯ menu with Delete flow: an in-app confirm naming the flow by label and flow/NAME, the pending draft's discard and the flow's delete through client.reset at the drafts' package, then a re-read rail with the pillar left on its empty state. A refusal shows the door's sentence and keeps the flow open; a read-only package draws no menu. Claude-Session: https://claude.ai/code/session_01Utp6CZrsFMFmWFsxTaq2Bu Co-authored-by: Claude <noreply@anthropic.com>
…R, not an unmerged ADR number check:adr-anchors refuses a citation of ADR-0146 while no record of that number is under docs/adr/; the record is still the draft #28045. Claude-Session: https://claude.ai/code/session_01Utp6CZrsFMFmWFsxTaq2Bu Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:ui#3 · os-bill · session_01Utp6CaJoinvGQSbHeDaWBe 席位核对ACCEPT · head
Generated by Claude Code |
9 tasks done
This was referenced Oct 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Bill · project thread
维护者速读
flow/名字),确认后先丢弃这个流程的待发布草稿,再删除流程;左栏重新读取,页面回到空状态,提示「已删除流程「…」」。只读包(代码包、已安装包)的流程不画这个菜单。<base>.customizepackage #28045)再做。DELETE /meta/flow/:name,带上 Studio 写草稿用的同一个包;服务端拒绝时显示服务端原话,流程保持打开。回滚就是 revert 本 PR。StudioDesignSurface.tsx里AutomationsPillar的deleteOpenFlow(#27356 row 19注释处),以及新文件FlowItemMoreMenu.tsx。pnpm --dir ui exec vitest run packages/app-shell/src/views/studio-design/AutomationsPillar.deleteFlow-27356.test.tsx,应见 4 passed。Part of #27356 (row 19, hotcrm#2320 Studio S8: Studio can delete a flow; maintainer-ruled A1, comment 6520616687)
Clause-②: no
Metadata-protocol: none
What changes
auto-item-more, aria 「More」, the header's icon-button token) after the Enabled switch. Its one item is 「Delete flow」 (auto-item-delete, Trash icon, destructive colour). It is disabled while a save is in flight, so the delete never races the autosave. Before this, a flow could be deleted only from Setup › Metadata (objectui#12725).AlertDialog(objectui#13333; never the browser'sconfirm()) reuses Setup's own keys,engine.edit.deleteConfirm/engine.edit.deleteConfirmBody/engine.edit.delete, with the same variables Setup'sResourceEditPagepasses: the flow's label,flow/NAMEand the type's label. Cancel closes it with nothing sent.deleteOpenFlowdisarms the autosave (setAutoDirty(false)). When the flow has a pending draft, it first discards it withclient.reset('flow', name, { state: 'draft', packageId }), so no draft is left to publish the flow back. It then deletes the flow withclient.reset('flow', name, { packageId }), which isDELETE /meta/flow/:name, the door Setup's delete uses.packageIdis the package Studio writes the flow's drafts to (objectui#12335's binding).flowListNonce). A one-shot ref keeps that re-read from opening another flow, so the pillar lands on its empty state.onDraftSavedis called so the shell's pending-drafts count re-reads, and a toast names the flow: 「Deleted flow "LABEL"」.409 RESOURCE_CONFLICT) shows the door's own sentence in the pillar's refusal strip, the sameplainRefusalpath every other refused write here uses, and the flow stays open.<base>.customizepackage #28045), not here.engine.studio.auto.deleteFlow(en 「Delete flow」, zh 「删除流程」) andengine.studio.auto.flowDeleted(en 「Deleted flow "{item}"」, zh 「已删除流程「{item}」」). Other locales fall back to en, as the namespace allows. No key renamed, no en value changed.Tests
AutomationsPillar.deleteFlow-27356.test.tsx(4 tests) on the realAutomationsPillar, the server doubled at the metadata client (the harness ofAutomationsPillar.showMeFocus-26730). The rail serves two flows, so that opening the second one after the delete would show.flow/approval; nothing is sent before Delete; then the two calls are the draft discard and the delete, in that order, at the package; the list is re-read; "Approval" leaves the rail, "Escalate" stays and is NOT opened (nolayeredread of it, no canvas caption); the toast names the flow.409): the refusal strip shows the server's sentence, the flow stays open, no toast.Readings (head c090d58, branch rebuilt from origin/main 6b125a7 after #28076 merged; install and app-shell closure rebuilt)
StudioDesignSurface,AutomationsPillarorFlowItemMoreMenu(209 files): 209 passed, 1561 passed.pnpm --filter @object-ui/app-shell run type-checkandpnpm --filter @object-ui/i18n run type-check: exit 0 (lock VERDICT command-exit 0).scripts/ablation-replace.mjs: the draft discardawait client.reset('flow', flow.name, { state: 'draft', packageId });to/* ABLATED */: 1 failed / 3 passed (the pending-draft case red: one call, not two); restored blob = HEAD blob95e9a7fd2a3e,git diff HEADempty.(keepEmpty ? c : (c ??to(/* ABLATED */ (c ??(the re-read opens the next flow): 1 failed / 3 passed (the pending-draft case red: "Escalate" opens, so its name shows twice); restored,git diff HEADempty.@object-ui/*to source, so neither ablation needed a rebuild.pnpm --dir ui run check:i18n-drift: no en value changed.Acceptance notes
Part of, notFixes.409sentence is the test's, and whether the server refuses a flow other items reference was not measured here.Verification
On head
c090d582:dispatch-gates --commandsderived 34 families for this diff; all 34 were run locally, each exit 0, and--ranreconciled 34 run, 0 NOT-MEASURED, 0 UNRUN.check:new-line-citations: 0 new. CI check-runs were in progress when this was opened.The harness's after-PR assign and review-request step is skipped on the order's word.
Generated by Claude Code