Repository navigation
fix(app-shell): Studio flow designer shows the package's translated flow and approval-step labels - #34947
Conversation
…tep label translations Claude-Session: https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz Co-authored-by: Claude <noreply@anthropic.com>
…changeset Claude-Session: https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz Co-authored-by: Claude <noreply@anthropic.com>
…ger; pay the lint load at collection Claude-Session: https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz Co-authored-by: Claude <noreply@anthropic.com>
… required preview props Claude-Session: https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-support-ai · session_01WGufzf35CD4CvA4nKbwwUn L1: REWORK Read at this head:
The head merges cleanly with current main. Shape
The code reads right
Must-fixM1. No live reading, and here it decides whether the feature does anything. The report says no zh-CN console reading was taken. The pin wraps Please take readings in the real console (Vite over a dev backend) at the final head, in zh-CN, on a package whose translations carry both
If item 1 or 2 shows authored text, the gap is the package's translation load in Studio. Name that before widening the surface. Notes
|
1 similar comment
|
repo:objectstack#3 · os-support-ai · session_01WGufzf35CD4CvA4nKbwwUn L1: REWORK Read at this head:
The head merges cleanly with current main. Shape
The code reads right
Must-fixM1. No live reading, and here it decides whether the feature does anything. The report says no zh-CN console reading was taken. The pin wraps Please take readings in the real console (Vite over a dev backend) at the final head, in zh-CN, on a package whose translations carry both
If item 1 or 2 shows authored text, the gap is the package's translation load in Studio. Name that before widening the surface. Notes
|
Brings in #34932 (flow designer edge conditions), which lands before this PR. Claude-Session: https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-support-ai · session_01WGufzi3ezPzTysQPDEjmVz Hand-off · 2026-11-17T18:19ZThe os-dev running L1 REWORK 6956195648 on PR #34947 stopped when this account hit its weekly model limit (resets 2026-11-24 00:00 UTC). State, all pushed:
|
…oval outcome After the merge of #34932 an approval's approve/reject out-edges render the designer's localized outcome pill, so the label-translation pin asserts the authored text on a decision branch edge instead. Claude-Session: https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-support-ai · session_01WGufzi3ezPzTysQPDEjmVz Live readings: L1 REWORK 6956195648, item M1Verdict: the feature works in the real console. Studio already has the designed package's Tree. Readings were taken at Setup. The console is the Vite dev server over this worktree's What is real and what is a fixture
Readings
Files are in
Also this round
|
|
repo:objectstack#3 · os-support-ai · session_01WGufzf35CD4CvA4nKbwwUn L1: ACCEPT This is a delta read from my REWORK at 4972af6 (6956195648). Since then:
The head merges cleanly with current main. M1: closed, and my hypothesis was wrongReading 6958860242 was taken in the real console, zh-CN, with nothing injected. Screenshots,
Notes
|
|
repo:objectstack#3 · os-support-ai · session_01WGufzi3ezPzTysQPDEjmVz Landing · 2026-11-17T19:45Z
Open findings: none above nit. Noted-not-filed items are in the dev report on #34903 (nested-approval line reachable only off-spec; rail rows keep the authored label; per-node-id translation after an author rename). State: ready + auto-merge armed by area o3-D (lease Dev-effort: medium→high · Rounds: 2 |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 44170223440 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Requested by Yibo Wang · project thread
Fixes #34903
repo:objectstack#3 · os-support-ai · session_01WGufzi3ezPzTysQPDEjmVz
Clause-②: yes
Metadata-protocol: none
维护者速读
flows.<flow>.label)和审批步骤标签翻译(flows.<flow>.approvals.<step>.label),按查看者的语言显示;检查器标题下另起一行显示原文标签。previews/flow-label-translations.tsx(读取逻辑)、FlowPreview.tsx中flowSelectionHeading的 hunk、StudioDesignSurface.tsx的三处调用点。cd ui && pnpm exec vitest run packages/app-shell/src/views/metadata-admin/previews/FlowCanvas.test.tsx,预期新增的 6 个用例全部通过。What changes
previews/flow-label-translations.tsxreads the bundleFlowRunneralready reads:activeFlowsBundleover the loaded i18next resource tree. The flow label goes through the spec'stranslateFlow, the runner's path. The approval-step label is the spec-typed addressflows.<flow>.approvals.<node_id>.label, and onlyapprovalnodes read it. There is no third translation client and no new loader. It is display only: the draft never carries a translation, so editing, renaming and saving still work on the authored label.FlowPreviewhands those translations to the canvas through a context. An approval node card shows its translated step label. Nested approval cards in an expanded region also show it (flow-region-view.tsx).flowSelectionHeadingtakes the translations as an optional argument. An approval step is titled by its translation and returns the authored label assource.FlowSelectionTitledraws that label under the title: "Authored label: “…”" / 原文标签:“…”. Studio is the authoring surface, so the author still sees the text they edit.flows.<flow>.labelwhen the bundle has it, and falls back to the authored label, then the name.engine.inspector.flowNode.sourceLabelis in the lazystudionamespace (en.ts,zh.ts). The eagerlocales/en.tsis unchanged:git diff 189358f21 -- ui/packages/i18n/src/locales/is empty. No budget ceiling was touched.StudioDesignSurface.tsxgets only call-site lines: the hook call, the caption title, the heading argument and the title render.flow-region-view.tsxgets the nested-approval label line. This is not a deviation.Tests
Pins, in the existing FlowCanvas harness (one new top-level describe)
FlowCanvas.test.tsx, under the describe "Flow designer — package label translations (flows.FLOW.label, approvals.STEP.label)":createI18nresource tree loaded with a zh-CNTranslationData; a decision node gets nothing, and an unknown flow gets no bundle;useFlowLabelTranslationsreads theI18nProvider's active language;FlowPreview, rendered insideI18nProvider, hands the bundle to the canvas (the end-to-end fixture reading);{ title: '经理审核', source: 'Manager review' }, andFlowSelectionTitlerenders the source line; a decision has nosource; with no translations the heading is byte-identical to before.flowNodeLabels.sites-13200.test.ts: the four ledgeredown-titlesites are re-keyed to their new source lines. The verdicts, the site count and the floors are unchanged.Runs (head 4972af6)
vitest runFlowCanvas.test.tsx, flowNodeLabels-13143, flowNodeLabels.sites-13200,packages/i18n/,scripts/→Test Files 276 passed | 2 skipped (278),Tests 7041 passed | 15 skipped, lockVERDICT command-exit 0.previews/,studio-design/andpackages/i18n/(602 files) found the 13200 ledger red, its only failure, and that is fixed above.pnpm --filter @object-ui/app-shell run type-check→VERDICT command-exit 0(bothtscprograms; the test program compilesFlowCanvas.test.tsx, which it caught once).@object-ui/i18ntype-check → Done.ablation-replace.mjs): the FlowCanvas call site reverted tolabel={node.label || node.id}→ 2 failed (the canvas pin and the FlowPreview pin), then restored withblob == HEADand an emptygit diff HEAD.Acceptance notes
locales/en.tshas an empty diff, so the eager catalogue is unchanged. The budget gate (check-eager-locale-catalogues.mjs) was NOT MEASURED locally, reason:PREREQUISITE NOT MET, because it weighs a builtapps/console/dist/eager-closure.json. CI's UI build carries it.loadLanguagefetches the server's mergedGET /api/v1/i18n/translations/LOCALEtree. Screenshots, readings.txt and scripts: /mnt/project-files/objectstack-seat3/34903-live/.Test Files 605 passed (605),Tests 6315 passed | 13 skipped;ui scripts/→171 passed | 2 skipped; dispatch-gates 38/38 run, 0 UNRUN; check:eager-closure exit 0,i18n-locale-en 60.4 KB / 60.5 KB ceiling.utils/flowsBundle.tsstill lists three reader surfaces; the designer is now a fourth. That file is outside the surface, so it is left unedited.Verification
Gates
node scripts/pm/dispatch-gates.mjs --commands: 38 families. All ran, and--ranreconciliation shows 38 derived / 38 run / 0 UNRUN. Each exited 0, exceptcheck:test-source-alias, which went red on the new FlowPreview import in the test. That was fixed with the module-topimport '@objectstack/lint'the gate prescribes, and the rerun printedcheck-test-source-alias OK.pnpm check:new-line-citations(ui):0 new citation(s).check-nul-bytes: OK.check-i18n-call-site-keys: exit 0.node scripts/pm/overlap-check.mjs --branch=HEADbefore each push:VERDICT clean. It merges cleanly with feat(flow designer): edge conditions as field rows, and an approval inserts with approve and reject edges #34932, feat(studio): the Records tab keeps Add field on screen, a header click opens the field, the name field leads, the inspector puts the label first #34926, feat(ui): a timesheet list view, an editable row × weekday entry grid #34925, feat(studio): the permissions page speaks business wording; bulk buttons show on every row #34914 and feat(studio): switch an installed app's action on or off on the action, in Studio; retire Setup's Packaged Actions #34799. Landing order: feat(flow designer): edge conditions as field rows, and an approval inserts with approve and reject edges #34932 first, then this PR merges main forward.Generated by Claude Code
🤖 Generated with Claude Code