Workflow · workflow
Grammarly engineering: how editor suggestions are represented and applied using operational transformation and the Delta format
Grammarly needed to keep editor suggestions correct and relevant as users edited text in real time, and to support accepting multiple suggestions at once without causing the editor to freeze or produce garbled text.
How it works
Common implementation structure
How this type of workflow is generally built, generalized across documented cases — not tied to any one vendor's stack. Click any stage to read what happens there. Specific products that implement these stages appear in “Tools commonly seen” below.
Stage 1 · User edit sent to backend
A text change is communicated to the back-end, which scans for mistakes and sends suggestions to the client.
Tools used
Delta formatQuill
Outcome
By composing all suggestion deltas together and rebasing each against prior ones before composition, Grammarly achieved a feature that applies multiple suggestions at once correctly and instantly, eliminating the UI freeze.
What failed first
Applying individual suggestion deltas sequentially caused the editor to freeze for a noticeable period, and composing multiple suggestion deltas without rebasing caused the resulting text to appear broken with mixed-up characters.
Results
Volume30 million people
Grounding & classification
Source type: technical build writeup
9 fields verified against source quotes.
failure mode describedproduction runtime claimedtools describedworkflow describedsoftwaretechnical build writeup