Repository navigation
fix(app-shell): Studio's New similar notices for a flow and a permission set read in the console's language - #29861
Merged
Conversation
The flow and permission-set clone answers name their notice by a code; these pins ask a zh screen to show the sentence in zh, and the wire notice for an unknown or missing code. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jRCNECdyCZ6R9rvtF7
The flow and permission-set clone answers carry a noticeCode beside the English notice. Studio's Automations and Access strips and the permission matrix's clone notice map each known code to an en/zh studio key, naming the answer's package where the sentence does, and show the wire notice for an unknown or missing code. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jRCNECdyCZ6R9rvtF7
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jRCNECdyCZ6R9rvtF7
Contributor
Author
|
domain:ui#5 · zhuangjianguo · session_01QsR2jQjvWkZ7is6GXbC6DB 席位核对 — ACCEPT ·
|
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 Steedos · project thread
Fixes #29727
Clause-②: no
Metadata-protocol: none
维护者速读
noticeCode显示控制台自己的中英文句子(权限集三种落点各一句,带上应答里的软件包);权限矩阵编辑器里的克隆提示同样处理。notice。回滚即撤销本 PR。ui/packages/app-shell/src/views/metadata-admin/permission-set-clone.ts(三种落点的映射与回退)、ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx(两条提示条把码带过页面跳转)、ui/packages/i18n/src/namespaces/studio/zh.ts(新增四句中文)。ui/下运行pnpm exec vitest run packages/app-shell/src/views/studio-design/StudioDesignSurface.accessNewSimilar-28573.test.tsx,预期全绿,其中 zh 用例逐一看到三种落点的中文句子。What changes
Leg 2 (ui) of #29727. Leg 1 (#29823) made both clone answers carry a stable
noticeCodebeside the Englishnotice. The Console now maps each known code to its own studio-namespace sentence, in en and zh, and keeps the wirenoticefor anything else. It follows the existing code-to-key pattern (CloudConnectionPanel'stranslateFailureCode): one function per door with literal keys, no new mechanism, nothing imported frompackages/runtime.FlowItemMoreMenu.tsx):FlowCopiedgains an optionalnoticeCode, read as sent. NewflowCloneNoticeTextmapsFLOW_CLONE_DISABLED_COPYtoengine.studio.auto.newSimilar.noticeand returnsnoticefor any other code or none.permission-set-clone.ts):PermissionSetClonedgains an optionalnoticeCode, read as sent. NewpermissionSetCloneNoticeTextmapsPERMISSION_SET_CLONE_ENVIRONMENT_WIDE,_IN_PACKAGEand_IN_CREATED_PACKAGEtoperm.clone.notice.environmentWide,.inPackageand.inCreatedPackage. The two package landings name the answer'spackage. If that package is missing, the function returns the wirenoticeinstead of making a sentence up.StudioDesignSurface.tsx): the Automations and Access "New similar" strips keepnoticeCodein their state and in the navigation arrival that carries a copy to its package's pillar. They render the mapped sentence.PermissionMatrixEditor.tsx): the cloned-notice line renders the mapped sentence. The diff there is that line and its import.namespaces/studio/en.ts,zh.ts): four keys, added in both packs together. The en rows are the server's sentences, with{package}where the server names the package.@object-ui/app-shelland@object-ui/i18n, patch.Tests
New top-level describes in the existing harness files, each over the real component:
AutomationsPillar.newSimilar-28567.test.tsx: in zh,FLOW_CLONE_DISABLED_COPYshows the zh sentence on the copy's pillar, after the navigation to the pair. CONTROL: an unknown code shows the wirenotice, and so does a missing code.StudioDesignSurface.accessNewSimilar-28573.test.tsx: in zh, each of the three landings shows its zh sentence, and the two package landings name the answer's package. CONTROL: an unknown code shows the wirenotice, and so does a missing code.PermissionMatrixEditor.cloneToCustomize.test.tsx: in zh-CN, an embedded host's clone notice shows the zh sentence with the package. CONTROL: an unknown code shows the wirenotice.noticeverbatim. They pass unchanged.Acceptance notes
data.package(an id, as the strip's existing "Saved the copy NAME in package PACKAGE" line also shows).pnpm devshowcase backend with the Console under Vite. They show "New similar" on the read-onlycom.example.showcasepackage's flow and permission set, both landing in a newly createdcom.example.showcase.custom. The four PNGs are in the project folder underissue-29727/. In the before shots the second line is the server's English. In the after shots it is the zh sentence.Verification
Readings at
40f355ea/d2be8c2f(the code and changeset). After mergingorigin/mainat99c06965, the post-merge reruns are at headb4ee61da. Delta vs main: exactly the 10 files above.Premise on main: the five known-code zh pins red, the English sentence on screen
The new tests, with the six implementation files restored to
42ff86f6:Test Files 3 failed (3),Tests 5 failed | 48 passed (53). The five failures are the five known-code zh pins. The flow pin's failure prints the banner text as received, which is the English sentence: "The copy is switched off and does not run until you switch it on, and it still uses the same subflows, actions and objects as the original." The CONTROL pins pass on main, as they should.Fixed head: 53/53, then 69/69 after merging main
Test Files 3 passed (3),Tests 53 passed (53).b4ee61da, the three suites plus the two matrix suites main touched (columnHeaders-29729,badge):Test Files 5 passed (5),Tests 69 passed (69).turbo run type-check --filter=@object-ui/app-shell --filter=@object-ui/i18n: 66/66 tasks, before and after the merge.pnpm exec eslinton the nine touched source and test files: 0 errors.Ablation: four mutations through scripts/ablation-replace.mjs, each landed on disk, each red, each restored (blob hash equal to HEAD)
The ui vitest config aliases
@object-ui/i18nand app-shell tosrc, so no dist step is involved.Gates
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 35 families. Each was run with its exit code captured before any pipe, all exit 0, includingcheck-sdui-manifestand its self-test andpnpm --dir ui exec vitest run scripts/(Test Files 170 passed | 2 skipped (172)).--ran: 35 accounted, 35 run, 0 NOT-MEASURED.ui/scripts/check-i18n-en-drift.mjs: exit 0 (0 en values changed, 4 designer keys added).b4ee61da:check-sdui-manifest,check-changeset-no-major --base origin/main,check-empty-changeset --base origin/main,check:nul-bytesandcheck-i18n-en-driftall exit 0.Generated by Claude Code