Repository navigation
Commit b92329c
fix(app-shell,i18n): the Organization flows page says each draft publishes by itself, and a deep-link miss shows no false "no designers" notice (objectui#11591) (#11606)
Fixes #11591
Clause-②: no
Implemented by an os-dev run of the PM claim on the card (branch
`claude/issue-11591-org-flows-copy`, session
`https://claude.ai/code/session_01FjqrwXPfSMkSfkKYDSRkN2`).
## What changed
### 1. The package-less sheet no longer claims atomicity
- `DraftChangesPanel`'s confirm note reads `preview.changes.confirmNote`
when the panel has a `packageId` (unchanged, byte for byte, in all ten
packs) and the new `preview.changes.confirmNoteSeparate` when it has
none.
- Why `packageId` decides: only a package has a batch door (`POST
/packages/:id/publish-drafts`). The package-less page's Publish (the
`packageId === null` branch of `doPublish` in `StudioDesignSurface`)
calls `publishDraft` once per draft and keeps going past a failure, so a
partial publish is possible there.
- The new family is in all ten packs, with each pack's own CLDR
categories plus the base key and the en parity slots: en/de one+other,
es/fr/pt one+many+other, ru one+few+many+other, ar zero through other,
ja/ko/zh other. en reads:
- one: "Publishing releases the 1 pending draft on its own: if it fails,
it stays pending."
- other: "Publishing releases the 2 pending drafts one at a time: a
draft that fails stays pending while the others go live."
- The panel's other host, the draft-preview bar, passes neither
`packageId` nor `onPublish`. It renders no confirm footer and does not
change.
### 2. A deep-link miss and an empty list show no false "no designers"
notice
- `AutomationsPillar` read `getMetadataPreview(current?.type ?? '')`.
With no flow open, that read is for the type `''`, which returns
undefined. `isEditable` was then false, and the canvas chip rendered
`engine.studio.auto.designersMissing` ("No metadata designers are
registered in this session…") next to the correct miss sentence.
- It now reads `getMetadataPreview('flow')`, the pillar's one type, the
same way the `getMetadataInspector('flow')` read beside it already
worked. Nothing changes with a flow open, because every rail entry of
this pillar has the type `flow`.
- The notice still keys on the registry: where no designer is
registered, it still shows with no flow open (pinned below).
- `views/metadata-admin/**` is not edited (objectui#10202 holds it). The
copy keys already existed.
## Measured
All at `67dcfcb` unless said otherwise.
**Red before the fix** (tests written first, run on the unfixed tree):
15 failed, 41 passed across the 4 pin files. The received strings were:
- package-less sheet, 1 draft: "Publishing releases the 1 pending draft
of this package atomically."
- package-less sheet, 2 drafts: "Publishing releases all 2 pending
drafts of this package atomically."
- `/studio/~org/automations?surface=flow:showcase_urgent_task_alert`
(the card's measured URL): the page text held "No metadata designers are
registered in this session, so this flow cannot be designed here."
beside "The link names flow “showcase_urgent_task_alert”, which is not
here."
- The same on a package page's miss.
- An empty package-less list: the measurement the card predicted. The
rail's "No flows outside a package yet. …" sat beside the same false
notice.
- ten packs: no `confirmNoteSeparate` family.
**Green after the fix**: `pnpm exec vitest run` on the 4 pin files gave
4 files, 56 of 56 tests passed.
**Ablations.** Each one went through `ablation-replace.mjs`, which
checks that the anchor hit once and that the blob changed. Each was
restored by blob hash with `git diff HEAD` empty:
- The atomic sentence back on the package-less path (the note's
condition forced to `true`): 2 failed, 2 passed. The two package-less
cases failed and received the atomic sentence. The two package-sheet
controls stayed green.
- The notice keyed on the selection again
(`getMetadataPreview(current?.type ?? '')`): 3 failed, 18 passed. The
failures were the measured miss, the package page's miss and the empty
list. The control with a flow open stayed green. So did the
empty-registry case, because with no designer registered the notice
shows either way, which is the direction expected.
- The ja package-less form given the package sentence's "まとめて(アトミックに)":
1 failed, 30 passed. Only ja failed.
**Wider runs.**
- `packages/app-shell/src/views/studio-design/` and
`packages/app-shell/src/preview/`: 103 files, 653 tests passed.
- `packages/i18n/`, plus every test that reads a changed file as source
text: 117 files, 2663 passed and 13 skipped. These tests were found by
grepping test sources for `readFileSync` and `?raw`, and for the names
`StudioDesignSurface.tsx`, `DraftChangesPanel.tsx` and `locales/*.ts`.
They are `packages/app-shell/src/__tests__/`,
`ObjectView.viewConfigGate`, the metadata-admin i18n tests,
`HomeItemTypeLabel.parity`, `apiErrorEnvelope` and the
`scripts/__tests__` suites for the i18n gates, node-esm-load,
eager-closure, eager-locale-catalogues, spec-symbol ledger and
derivation, one-authority, vi-mock-inherit, side-effects, self-import
and turbo build outputs.
**Type-check.** `pnpm --filter @object-ui/app-shell type-check` and
`pnpm --filter @object-ui/i18n type-check` both exited 0. They ran after
`pnpm turbo run build --filter='@object-ui/app-shell^...'` (28 of 28
tasks). Both test tsconfigs list the new test files; this was checked
with `--listFilesOnly`.
**Gates, all exit 0.** The gates run were:
- the i18n gates: `check:i18n-keys`, `check:i18n-drift` ("No en value
changed in this range"), `check:i18n-dead-keys` (the new keys are not
candidates) and `check:i18n-designer-parity`;
- the named file gates: `check:control-bytes`,
`check:new-line-citations` (0 new) and `check:changeset-claims`;
- the test and mock gates: `check:pending-changeset-literals`,
`check:test-path-roots`, `check:vi-mock-inherit`,
`check:vi-mock-override-shape` and `check:vi-mock-specifiers`;
- the source gates: `check:spec-symbols`, `check:metadata-write-doors`,
`check:handler-key-reads`, `check:esm-specifiers`,
`check:unreferenced-sources`, `check:self-import` and
`check:phantom-deps`;
- the changeset gates: `scripts/check-changeset-presence.mjs` and
`changeset:check`.
**Lint (narrowed, not the repo-wide run).**
- `eslint --format json` ran on the 16 changed `.ts`/`.tsx` files; the
JSON output has 16 results. It reported 0 errors.
- The two changed sources carry 2 and 17 warnings. The rule multisets
are identical to those of the same two files at the base `2e818d0`. The
base files were linted in place and then restored by blob hash.
- `eslint.config.js` sets no `parserOptions.project` and no
`projectService`, so linting is not type-aware. This diff therefore
cannot move a verdict in a file it does not touch.
**NOT MEASURED** (left to CI):
- `check:eager-closure` / `check:eager-locale-catalogues`: they need a
console build. The en pack is in the eager closure, and this adds three
en strings.
- `pnpm test` (all 8 shards).
- `pnpm lint`.
## Acceptance notes
- With no flow open, the pillar's other text is unchanged. The chip now
reads its standing "Visual orchestration · click a node to configure".
The canvas reads "Select an automation" on an empty list. The
configuration panel reads "Click a node on the canvas, and its
configuration appears here." The card's pin is the false notice. These
are observations, and nothing was filed for them.
- In en, de, es, fr and pt, the single-draft form does not mention "the
others", because a partial publish needs at least two drafts. ru's `one`
category also covers 21, 31 and so on, so its one-form avoids "the
others" too. ar, ja, ko and zh use one sentence for every count, as
their `confirmNote` does.
- Changeset `.changeset/11591-org-flows-copy.md`: `@object-ui/app-shell`
patch, `@object-ui/i18n` patch.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01FjqrwXPfSMkSfkKYDSRkN2)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent 902ebab commit b92329c
17 files changed
Lines changed: 417 additions & 8 deletions
File tree
- .changeset
- packages
- app-shell/src
- preview
- __tests__
- views/studio-design
- i18n/src
- __tests__
- locales
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | | - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
339 | 344 | | |
340 | 345 | | |
341 | 346 | | |
| |||
627 | 632 | | |
628 | 633 | | |
629 | 634 | | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
635 | 651 | | |
636 | 652 | | |
637 | 653 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
317 | 343 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4584 | 4584 | | |
4585 | 4585 | | |
4586 | 4586 | | |
4587 | | - | |
| 4587 | + | |
| 4588 | + | |
| 4589 | + | |
| 4590 | + | |
| 4591 | + | |
| 4592 | + | |
4588 | 4593 | | |
4589 | 4594 | | |
4590 | 4595 | | |
| |||
0 commit comments