Repository navigation
fix(app-shell): word the flow closure refusal on the Problems list in the Console's language - #30721
Merged
Merged
Conversation
Claude-Session: https://claude.ai/code/session_01L6bhgU6Ui5Bf4TtimeCqH2 Co-authored-by: Claude <noreply@anthropic.com>
…re refusal Claude-Session: https://claude.ai/code/session_01L6bhgU6Ui5Bf4TtimeCqH2 Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:ui#1 · os-sales · session_01L6bhgWn6zhNa4LL7VB1rtL 维护者速读
席位核对 — ACCEPT · head 1f90512
|
This was referenced Nov 6, 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 Sales · project thread
Fixes #30038
Clause-②: no
Metadata-protocol: none
维护者速读
previews/flow-closure-refusal.ts(新渲染模块),previews/flow-problems.ts(接入点一行),draftVerdict.ts(保留code)。pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/previews/flow-problems.closureRefusal-30038.test.ts,预期 7/7 通过。What changes
ui/packages/app-shell/src/views/metadata-admin/previews/flow-closure-refusal.ts:closureRefusalMessage(entry, flow, locale)words the publish refusal from the served entry'scodeand item-relativepath, and only at the ruling's three positions:flow-trigger-unknown-objectatnodes.N.config.objectNameandnodes.N.config.timeRelative.object,flow-input-unknown-objectatvariables.N.objectName. The object name is read from the flow on screen at that path. Any other code, any other position, or no name at the path answersundefined.codethreaded through the three ui-internal positions (ruling item 3):previews/flow-problems.ts:ServerDiagnosticgainscode?: string;buildFlowProblemsuses the new module for an error-level server entry and falls back to the servedmessage(ruling item 4).draftVerdict.ts:verdictPreviewEntries(andverdictEntriesStillShown, which wraps it) keeps an error'scode. Studio's Automations pillar reaches the Problems list through this function, and its existing{ ...entry }spread carries the code on, soStudioDesignSurface.tsxis unchanged.ResourceEditPage.tsx:previewDiagnosticskeeps a served error'scodeon the entries it hands the canvas (it used to drop it).engine.flowProblems.closureRefusal.{triggerObject,scanObject,inputObject}inui/packages/i18n/src/namespaces/studio/en.tsandzh.ts. Those two are every catalogue thestudionamespace has. The wording reuses the Console's existing package vocabulary (engine.inspector.objectPicker.outsideReason). The eager language packsui/packages/i18n/src/locales/*.tsare not touched, so the first-screen English pack carries no new bytes. The studioencatalogue is its own chunk (i18n-ns-studio-en), andui/scripts/check-eager-closure-budget.mjsdoes not budget it.@object-ui/app-shell+@object-ui/i18npatch.The wire shape does not move: no
packages/**file changes (ruling A).Tests
previews/flow-problems.closureRefusal-30038.test.ts(7 cases). zh-CN renders Chinese naming the object, at the trigger position. en renders the studio sentence, not the packaging one. The scan and input positions render too. An unknown code, or no code, passes through unchanged. A known code at a position it does not word, at a node with no name, or under the other rule id passes through. A warning under the same id passes through.verdictPreviewEntrieskeepscodeend to end.ResourceEditPage.draftPublishVerdict-26707.test.tsxgains a top-level describe that pins the canvas entry carrying the draft verdict'scode. The file's harness already serves a coded refusal.Acceptance notes
buildFlowProblems, a pure function whose host (FlowPreview, throughMetadataPreviewProps) receives no package. Threading one in would widen past the claim's file surface (preview-registry.ts,FlowPreview.tsx,StudioDesignSurface.tsx), and the package is the one the Studio page is already showing. If the seat wants the id printed, that is a follow-up throughMetadataPreviewProps._diagnosticscarries only the publish's refusals inerrors[](withPublishVerdict), so the module rewords error entries only.ResourceEditPage's diagnostics banner and the SchemaForm inline issues still show the served English for these entries.MetadataPreviewProps.diagnostics(preview-registry.ts) does not declarecodein its element type. The value passes structurally, and both new pins hold the runtime behaviour. The type line is outside the file surface.Verification
All readings are on head
1f905121unless noted.Tests (lock VERDICT command-exit 0)
pnpm --dir ui exec vitest run --maxWorkers=2overpreviews/flow-problems.closureRefusal-30038.test.ts,ResourceEditPage.draftPublishVerdict-26707.test.tsx,draftVerdict.test.ts,previews/flow-problems.test.tsandpackages/i18n/src/__tests__/studio-namespace.test.ts:Test Files 5 passed (5),Tests 52 passed (52).Ablation, three legs (scripts/ablation-replace.mjs, each restored: blob == HEAD, git diff HEAD empty)
The tests import
srcdirectly, so nodist/is involved.flow-problems.ts,closureRefusalMessage(diag, { nodes, variables }, locale)→(undefined as string | undefined). Result:Tests 4 failed | 3 passed (7). All four rendering cases went red. The three pass-through cases stayed green.draftVerdict.ts, deleted thecodespread. Result:Tests 1 failed | 6 passed (7), the end-to-endverdictPreviewEntriescase.ResourceEditPage.tsx, deleted thecodespread. Result:Tests 1 failed | 3 passed (4), the new canvas-codecase.--delete(B, C).Type check
pnpm exec turbo run type-check --concurrency=2 --filter=./ui/packages/app-shell --filter=./ui/packages/i18n:Tasks: 68 successful, 68 total. Both packages rantsc --noEmit && tsc -p tsconfig.test.json. Lock VERDICT command-exit 0.Derived gates
node scripts/pm/dispatch-gates.mjs --commands(merge base4bf9a2d7e, 9 paths, head1f905121): 35 families, each run with its exit code captured before any pipe, all 35 exit 0. They includepnpm --dir ui exec vitest run scripts/(lock VERDICT command-exit 0),check:type-check-debt(0 raw tsc errors over the ledger),check:type-check-coverage,check:nul-bytes,check:published-files,check:cross-package-test-inputs,check:test-source-alias,check-adr-0087-registration,check-empty-changesetandcheck-sdui-manifest.--ranreconciliation: "35 derived famil(ies) accounted for, 35 run, 0 NOT-MEASURED (a DERIVED zero, all 35 recorded an exit code and none of them is 3)". The tests, ablation and type check ran onac42ace6.1f905121only adds the changeset, and every source blob is unchanged. CI check-runs were not awaited.Lint (per file, CI owns the repo sweep)
npx eslint --no-inline-configover the 8 changed source files: 3 errors, all inResourceEditPage.tsxat L3444/3577/3600 (react-hooks/static-components). The same file onorigin/main, through--stdin, gives the same 3. None is in this diff's hunks.Human Minimum
packages/specholds no runtime logic. (Not touched.)pnpm lintpasses. (Per-file reading above; the repo sweep is CI's.)main, one pull request. (Harness-pinned card-thread branch.)packages/spectouched: n/a.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgU6Ui5Bf4TtimeCqH2
Generated by Claude Code