yangzhang75 opened a new pull request, #7858:
URL: https://github.com/apache/texera/pull/7858

   Part of #7828. Stacked on #7857 — the review here is the last commit, 
`feat(workflow): mark the pinned version in the revision history`.
   
   The author pins a version and their working copy moves on. This gives them 
the way back: pinning leaves an anchor in the revision history they already 
use, and the panel marks it as the one currently public. Restoring the 
published version is then the restore they already know — no second list of 
publications to learn.
   
   ## The anchor
   
   A version row whose delta is the identity patch, so replaying it returns 
exactly what was pinned however many edits pile up after.
   
   An existing version row cannot stand in: a version row replays to the 
content as it was *before* the change it records. Pinning content that is 
already the pinned one reuses its anchor rather than adding a twin, and the 
read that decides takes a row lock, so two pins arriving together cannot both 
insert.
   
   ## Two consequences the anchor forces
   
   - **It must not start the panel's aggregation window.** It lands seconds 
after the save it freezes, and the panel folds close-together versions into the 
newest of them — which would hide the author's own save behind a row they never 
made.
   - **The revision history is now readable only with granted access, or while 
nothing is pinned.** Replaying a version folds deltas back from the author's 
*current* content, so listing the versions of a pinned workflow would hand a 
public viewer exactly the edits the pin is holding back. While following there 
is nothing to hold back, and the history stays open as it is today.
   
   `publish-status` carries the pinned version's date, read from the version 
row so the dialog and the panel print one value rather than two clocks'. The 
public view of a workflow is dated by the version on show rather than by an 
edit the viewer cannot see.
   
   ## Tests
   
   +11 backend cases: the anchor is left, marked, and important enough that 
neither collapsing rule hides it; the save it was taken from stays visible; the 
mark moves when the pin moves; the anchor replays to exactly what was published 
after two further edits; pinning again unchanged adds no second row; a stranger 
gets an empty history for a pinned workflow but a full one while it follows; a 
collaborator keeps theirs.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to