Skip to content

Conversation

@lmac-1
Copy link
Collaborator

@lmac-1 lmac-1 commented Dec 8, 2025

Description

When Y.Doc updates a field value (e.g., via undo/redo or collaborative edits), trigger validation to clear stale errors. This fixes the issue where pressing Ctrl+Z to restore a valid value didn't clear the validation error message.

Previously, field values updated but validation state persisted, leaving error messages visible even when values became valid again.

Addresses point 2 of #4138

Validation steps

  1. Type something in the workflow name field in workflow settings panel in collab editor
  2. Click Cmd + delete to delete all text from that field (or windows equivalent)
  3. Click Save
  4. Validation message should appear saying that the field shouldn't be blank
  5. Click Ctrl Z on your keyboard so that the previous workflow name is put back
  6. Validation message should disappear as the field is now valid AND settings icon in header should be grey (valid).

You can also test this in reverse -> ie using Ctrl + Z to make it so that field is blank to make sure the validation message appears + settings icon is red.

Additional notes for the reviewer

n/a

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to know!):

  • Code generation (copilot but not intellisense)
  • Learning or fact checking
  • Strategy / design
  • Optimisation / refactoring
  • Translation / spellchecking / doc gen
  • Other
  • I have not used AI

You can read more details in our Responsible AI Policy

Pre-submission checklist

  • I have performed a self-review of my code.
  • I have implemented and tested all related authorization policies. (e.g., :owner, :admin, :editor, :viewer)
  • I have updated the changelog.
  • I have ticked a box in "AI usage" in this PR

When Y.Doc updates a field value (e.g., via undo/redo or collaborative
edits), trigger validation to clear stale errors. This fixes the issue
where pressing Ctrl+Z to restore a valid value didn't clear the
validation error message.

Previously, field values updated but validation state persisted,
leaving error messages visible even when values became valid again.
@codecov
Copy link

codecov bot commented Dec 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.02%. Comparing base (96f7ef9) to head (ab97228).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4157   +/-   ##
=======================================
  Coverage   89.02%   89.02%           
=======================================
  Files         425      425           
  Lines       19605    19605           
=======================================
+ Hits        17453    17454    +1     
+ Misses       2152     2151    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@theroinaochieng theroinaochieng moved this from New Issues to In review in v2 Dec 9, 2025
Copy link
Contributor

@doc-han doc-han left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just created an issue that defines this. updating the changelog

@midigofrank midigofrank merged commit ccc3ce3 into main Dec 11, 2025
8 checks passed
@midigofrank midigofrank deleted the 4138-ctrl-z-validation-message branch December 11, 2025 11:37
@github-project-automation github-project-automation bot moved this from In review to Done in v2 Dec 11, 2025
@lmac-1
Copy link
Collaborator Author

lmac-1 commented Dec 11, 2025

Thansk @doc-han, much more organised! And thanks @midigofrank for the review.

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

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants