Skip to content

fix: stabilize case step editor state#4

Open
makoto-soracom wants to merge 1 commit intomainfrom
fix-step-editor-state-regression
Open

fix: stabilize case step editor state#4
makoto-soracom wants to merge 1 commit intomainfrom
fix-step-editor-state-regression

Conversation

@makoto-soracom
Copy link

Summary

  • extract only the case step editor fix from merge-upstream-v1.0.0-beta.28
  • prevent inserted, deleted, and edited steps from overwriting adjacent step state
  • refresh fetched case data after save so the editor returns to a stable server-backed state

Key changes

  • move step insertion, deletion, replacement, and fetched-step normalization into frontend/utils/stepEditorState.ts
  • switch the rendered step row key in CaseStepsEditor from an index-based key to a stable uid
  • keep idCounter aligned with fetched steps and add focused tests for the step editor state helper

Tests

  • npm test -- --run frontend/utils/stepEditorState.test.ts (fails in this environment: vitest: not found)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant