Repository navigation
fix(app-shell): a state machine row's Next states box in Studio keeps a typed comma - #37837
Conversation
…omma Claude-Session: https://claude.ai/code/session_01L9qibzpqH1nQTsbGckLspg Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-tesla · session_01L9qibzpqH1nQTsbGckLspg Final green head for L1 · zone
|
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 L1-a, the seat's L1 thread · 2026-11-27T06:40Z 席位核对 — L1 REWORK @
|
Claude-Session: https://claude.ai/code/session_01L9qibzpqH1nQTsbGckLspg Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-tesla · session_01L9qibzpqH1nQTsbGckLspg Final green head for L1 delta · zone
|
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 L1-a, the seat's L1 thread · 2026-11-27T07:05Z 席位核对 — L1 ACCEPT @
|
|
repo:objectstack#3 · os-tesla · session_01L9qibzpqH1nQTsbGckLspg Landing · zone
|
Requested by Tesla · project thread
Fixes #36733
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
TransitionsFieldinObjectValidationsPanel.tsx: the row's "Next states" box keeps its own typed text while it is being edited (per-roweditingstate: row index + text). Each change still writes the parsed targets, so autosave behaviour is unchanged; the box is no longer re-derived from those targets on every key, so a typed,and the following space survive. On blur the box shows the targets again. Deleting a row clears the held text, since the rows below move up an index.''target stays the row's "May be cleared" checkbox, and editing the box keeps it (rowTargets(..., to.includes(''))unchanged).@object-ui/app-shell.Tests
ObjectValidationsPanel.typedComma-36733.test.tsx: typesdone, closedone key at a time (fireEvent.changeper key, value read back from the element) and asserts the box text and the written targets['done', 'closed'](fullValidationRuleSchema.safeParsegreen on the written rule), then blur; a second case types, closedinto a clearable row and asserts['open', 'closed', ''].valuerestored toto.filter((s) => s !== '').join(', ')on disk; the pin goes red (2 failed;expected [ 'openclosed', '' ] to deeply equal [ 'open', 'closed', '' ]); restored withgit checkout HEAD.clearableState-36567andnewRuleComplete-26731unchanged and green.Readings at acfbb9d
pnpm exec vitest run --maxWorkers=2 packages/app-shell/src/views/studio-design/ObjectValidationsPanel(fromui/, under the verify lock):Test Files 14 passed (14),Tests 122 passed (122), VERDICT command-exit 0.pnpm --filter @object-ui/app-shell type-check(includestsconfig.test.json): VERDICT command-exit 0.dispatch-gates.mjs --commandsderived 38 commands; all 38 exit 0;--ranreconciliation: 38 run, 0 NOT-MEASURED (derived zero).react-hooks/set-state-in-effectinJsonField, not in this diff).Acceptance notes
Harness).Verification
Read first:
ObjectValidationsPanel.tsx(theTransitionsFieldhunk: thevalue/onChange/onBlurof the next-states input and the delete button). Two-minute check: fromui/,pnpm exec vitest run packages/app-shell/src/views/studio-design/ObjectValidationsPanel.typedComma-36733.test.tsxshows 2 passed.Generated by Claude Code