[ZEPPELIN-6661] Cover notebook editor save timing #5483
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 288 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.339
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #5483"
general
weight: 0.35
tbonelee
What is this PR for?
When a paragraph save response arrives late,
ParagraphBasetreats it as a remote update and replaces the editor text, losing edits typed in the meantime.This PR tracks pending saves by
msgId. A response to one of the user's own saves no longer replaces the editor text when a newer edit or save followed it; otherwise the response is the server copy and is applied as before. Other paragraph fields in that response always apply.Related behavior changes in
ParagraphBase:A remote edit that differs from the local unsaved text now replaces it and resets the saved baseline, so the discarded local text is not re-committed later.
An empty local edit (all text deleted) is now treated as a local edit and protected like any other.
A broadcast that does not match a pending local save and repeats the saved text no longer rewinds the editor while the user is typing.
This PR adds the E2E scenarios for ZEPPELIN-6661 (idle autosave, edit during an in-flight save). The in-flight scenario fails without this fix, so the fix is included here.
ParagraphBasereads the save acknowledgementmsgIdfrom the message envelope (@MessageEnvelopeListener(OP.PARAGRAPH)). The SDKcommitParagraph(),insertParagraph()andcopyParagraph()now return the sentmsgId, andMessageServicerecords the insert/copymsgIdused for editor focus from that return value instead of subscribing tosent().What type of PR is it?
Bug Fix
Todos
[x] Match save responses to pending saves by
msgId[x] Add unit tests and browser scenarios for save timing
[x] Register the scenarios in the notebook parity inventory
What is the Jira issue?
ZEPPELIN-6661
How should this be tested?
Screenshots (if appropriate)
N/A
Questions:
Does the license files need to update? No
Is there breaking changes for older versions? No