[ZEPPELIN-6718] Carry every persisted field into a personalized user note - #5494
Merged
Merged
Conversation
…note
Reading a personalized note returns Note.getUserNote(user) rather than the
note itself, and that copy carried only name, id, config and angularObjects.
path, defaultInterpreterGroup, version, info, noteParams and noteForms were
left null, Gson omits null fields, and so those keys vanished from every
response for a personalized note, over REST and WebSocket alike.
path is the one that breaks the UI. It is excluded from the note file and
reattached by NoteManager after load, so a copy that loses it cannot recover
it from anywhere, and the front end reads it to detect the trash folder:
note.path.split('/') throws on undefined, which aborts change detection and
leaves the action bar unrendered -- including the button that turns
personalized mode back off.
The reflection test fails on any future field added to Note and not copied
here, which is how this one was introduced.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Assisted-By: Claude <noreply@anthropic.com>
tbonelee
force-pushed
the
ZEPPELIN-6718
branch
from
September 20, 2026 13:59
3479f4d to
7c0de8a
Compare
ParkGyeongTae
approved these changes
Sep 21, 2026
ParkGyeongTae
left a comment
Member
There was a problem hiding this comment.
Tested locally. Personalized notes now preserve path and other persisted fields after reload. LGTM!
Contributor
Author
|
Merged into master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this PR for?
Reading a personalized note does not return the note itself.
NotebookService.getNotehands back a per-user copy built byNote.getUserNote(user), and that copy is assembled by moving fields across one at a time, covering 5 of the 11 persisted fields.path,defaultInterpreterGroup,version,info,noteParamsandnoteFormsare left null. Gson omits null fields, so those keys disappear from every response for a personalized note, over REST and WebSocket alike.pathis the one that breaks the UI. It is not stored in the note file: the path comes from where the file sits and is reattached byNoteManagerafter load, so a copy that loses it has nowhere to recover it from. The front end reads it to detect the trash folder,note.path.split('/')throws on undefined, and the exception aborts change detection so the notebook action bar is never rendered. That includes the button that turns personalized mode back off, which means a note switched to personalized mode cannot be switched back from the UI.The server defect has been there since
getUserNotewas introduced in ZEPPELIN-1594. The classic UI guarded against the missing value:The Angular UI carries the same check without that guard, which is what finally exposed the server side.
This PR copies the six missing fields. Because the copy is still written field by field, it also adds a regression test that walks every persisted field of
Noteby reflection and compares the copy against the original, so a field added toNotelater and not copied here fails by name.The front end is left alone on purpose.
pathis a value the server must always send; typing it as optional or guarding at the call site would let the same class of server defect pass unnoticed again, which is exactly why this one went unnoticed for so long.What type of PR is it?
Bug Fix
Todos
getUserNotewas droppingWhat is the Jira issue?
How should this be tested?
10 tests pass. Reverting the change to
Note.javawhile keeping the tests makes the two new ones fail and name the cause:Checked by hand as well. Create a note, switch it to personal mode, and open it. Before the change,
GET /api/notebook/{noteId}comes back withoutpathand the console repeats thespliterror while the action bar never renders. After it,pathis back, no errors are logged, the action bar renders, andSwitch to collaboration modecompletes the switch (personalizedMode: false).Screenshots (if appropriate)
N/A
Questions: