Skip to content

fix(app-shell): the validation preview names a state machine's empty target as May be cleared - #37876

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-kc69mi
Nov 27, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-kc69mi

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Tesla · project thread
Fixes #36734

Clause-②: no
Metadata-protocol: none

维护者速读

  • 管理员在 Studio 元数据管理里预览状态机校验规则时,"可清空"的状态以前显示成结尾多一根竖线或一整行空白,现在明确写出"可清空"(中英文都有)。
  • 替 Studio 状态机规则编辑解决:规则面板已能勾选"可清空",预览却把它画成坏行或空行。
  • 只影响预览显示,规则的保存与执行不变;出错最多是预览文字不对,可直接撤回。
  • 无

What changes

  • ValidationPreview (state_machine branch): a '' target is no longer joined as a state name. Named targets still render joined by |; when '' is present a muted marker reads May be cleared (zh-CN 可清空). A row whose only target is '' shows only the marker; an empty list still reads as the dead-end text.
  • The marker reuses the existing catalogue row engine.studio.rules.transitionClearable (the Studio rules panel's checkbox label for the same '' target), so no catalogue entry was added.
  • Patch changeset for @object-ui/app-shell.

Read first (by risk):

  1. ValidationPreview.tsx, the state_machine entries.map hunk (the only behaviour change).
  2. ValidationPreview.test.tsx, its last top-level describe (the objectstack#36734 pin).

Two-minute check: pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/previews/ValidationPreview.test.tsx — expect 17 passed, two of them the en-US and zh-CN clearable-target cases.

Tests

  • New pin (one top-level describe in the existing ValidationPreview.test.tsx harness file, per ruling record 6583487846) renders transitions: { paused: ['open', ''], closed: [''], archived: [] } in en-US and zh-CN and asserts every row: paused = open + the marker, closed = the marker alone, archived = the dead-end text.
  • Ablation: with the original render restored on disk, both cases go red (paused: 'open | ', closed: ''); restored from HEAD, green.
Readings (head f80c352, pin folded into the harness file)
  • vitest run of ValidationPreview.test.tsx + dataPreviews.i18n-10862-s3.test.tsx: Test Files 2 passed (2), Tests 71 passed (71); lock VERDICT command-exit 0.
  • Ablation on f80c352 (original render on disk): Tests 2 failed, 15 passed (17); the two failures are the en-US and zh-CN pin cases, received paused: 'open | ', closed: ''.

Earlier readings (head 15ad181, before the fold):

  • vitest run of the pin + ValidationPreview.test.tsx + dataPreviews.i18n-10862-s3.test.tsx: Test Files 3 passed (3), Tests 71 passed (71); lock VERDICT command-exit 0.
  • Ablation run: Tests 2 failed (2), the expected/received diff above.
  • pnpm --filter @object-ui/app-shell run type-check (after building its dependency closure): lock VERDICT command-exit 0 (taken on 799f150, before the main merge).
  • dispatch-gates.mjs --commands: 38 derived commands plus check:changeset-fixed, all exit 0 on 799f150; --ran reconciliation 38 derived, 38 run, 0 NOT-MEASURED.
  • overlap-check.mjs --branch=HEAD: VERDICT clean exit 0.

Acceptance notes

  • The pin lives in the existing ValidationPreview.test.tsx as one top-level describe (root AGENTS.md, ruling record 6583487846); the separate pin file of the first push was folded in and deleted.
  • The first head (15ad181) shows red Lint & Repo Gates, TypeScript Type Check and Test UI: each is an aggregator reporting lanes that concluded cancelled, because the fold push superseded that run (PR concurrency cancel-in-progress). No test or gate failed there.

Verification

Local readings above; every CI family is read from this PR's check runs.


Generated by Claude Code

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 27, 2026
…view harness file

Claude-Session: https://claude.ai/code/session_01L9qibzpqH1nQTsbGckLspg
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-tesla · session_01L9qibzpqH1nQTsbGckLspg

Final green head for L1 · zone o3-build · #36734
Head-sha: f80c352

  • CI on this head: 40 success, 15 skipped, 0 failed or running. The three reds on the earlier head 15ad181 (Test UI, Lint & Repo Gates, TypeScript Type Check) were cancellations by the push of this head (ci.yml concurrency), per os-dev report delta 7214200546.
  • check-governed-merges.mjs --pr 37876: NOT governed; +97 / -9, 3 files.
  • The pin sits in the shared ValidationPreview.test.tsx as a top-level describe (AGENTS.md, ruling record 6583487846); it was first dispatched as a new file, which the PM corrected.
  • os-dev reports on Studio validation preview: a state machine row's '' (may be cleared) target shows as a trailing separator or a blank #36734: 7213645317, delta 7214200546. No L2 owed (Clause-②: no, Metadata-protocol: none, no contract face).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1

L1-a, the seat's L1 thread · 2026-11-27T09:04Z

席位核对 — L1 ACCEPT @ f80c352a24d32eeb20355adb1616d580963ef681

Verdict: ACCEPT. No L2 is owed: the diff has no spec or governed face, Clause-②: no and Metadata-protocol: none, and the only shipping file is a console preview.

Read at this head

  • Shape (l1-face.mjs --pr 37876): open, draft, base main, first line Fixes #36734. No closing keyword names another card, and no releases path is in the diff.
  • Fixes is right. Both of the card's "Done when" lines are delivered:
    • The preview names a '' target in words, in en and zh.
    • A row whose only target is '' no longer reads blank.
    • The en-US and zh-CN pins assert both rows' text. The os-dev delta report 7214200546 records one ablation: the original render reds exactly those two cases, with 'open | ' and '' received.
  • Code: ValidationPreview.tsx filters '' out of the joined names. It draws engine.studio.rules.transitionClearable when the list held one, and keeps the dead-end text only for an empty (or non-array) list, as before. The key resolves in both locales: studio/en.ts:3798 reads "May be cleared", studio/zh.ts:3351 reads 「可清空」. The pin also asserts the key is not echoed and that zh differs from en.
  • Changeset sentences, read in person against the tree, all true:
    • The before text: a trailing separator, or a blank row when '' is the only target.
    • "May be cleared" (zh-CN 「可清空」) is the same key ObjectValidationsPanel.tsx:637 puts on the row's checkbox.
    • A state with no targets is still a dead end.
    • The change is display only.
    • @object-ui/app-shell at patch is the right package and level.
  • Checks: 40 success, 15 expected skip, 0 failed, 0 pending. The floor checks (Lint & Repo Gates, TypeScript Type Check) are green, and mergeable_state is clean. The three reds on 15ad181f were cancellations superseded by the later push, and they are not on this head.

No nits.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-tesla · session_01L9qibzpqH1nQTsbGckLspg

Landing · zone o3-build · #36734 · Head-sha: f80c352

  • L1 ACCEPT at this head: L1-a comment 7214251354. No L2 owed (Clause-②: no, Metadata-protocol: none, no contract face).
  • check-governed-merges.mjs --pr 37876: NOT governed, 106 changed lines ⇒ the zone lands it (area-lease.md 落地).
  • CI at this head: 40 success, 15 expected skip, 0 failed or pending; mergeable clean.
  • K: landing-k.mjs cannot answer (no Test Core shard ran on this ui-only head); read by hand: merge-base e86bf99 → origin/main b620c4b = 9 first-parent commits (< 15), none touching this PR's 3 files.
  • Action: pr_ready + automerge_enable through the relay.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 27, 2026 09:05
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 27, 2026
Merged via the queue into main with commit 2a4ad30 Nov 27, 2026
56 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-kc69mi branch November 27, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Studio validation preview: a state machine row's '' (may be cleared) target shows as a trailing separator or a blank

2 participants