yangzhang75 opened a new pull request, #8577:
URL: https://github.com/apache/texera/pull/8577
### What changes were proposed in this PR?
Which version is the public one should be answerable, and the answer should
be a row the author
can already see — the version panel is where they go to look at, and
restore, an earlier version.
- **A pin leaves an anchor in the revision history.** Its delta is the
identity patch, so replaying
that row returns what was published however many edits pile up later. An
existing version row
cannot stand in: one replays to the content as it was *before* the change
it records, so it
names the wrong thing by exactly one save. Pinning again with nothing
changed reuses the anchor
rather than adding a twin, and `workflow.published_version_id` names it.
- **The anchor is a marker, not an edit.** It is always shown, so the author
can find and restore
what the public has, but it must not start the panel's aggregation window
— the save it was
pinned from is seconds older and would otherwise be folded into it and
disappear.
- **The public view is dated by the version on show**, not by the author's
most recent private
edit, and the share dialog names the same date from the same row, so the
two cannot disagree.
- **Pinning takes the row's lock first.** Two pins racing would otherwise
both read before either
wrote, and both insert an anchor.
### Any related issues, documentation, discussions?
Closes #7941
Part of #7828. Design discussion: #7128. Stacked on #7853, #8575 and #8576;
until those merge
this PR shows their commits too, and the review here is the last one.
### How was this PR tested?
8 new cases in `WorkflowPublishSpec` and `WorkflowVersionResourceSpec` (567
in the dashboard
package):
- an anchor the author can identify in the panel, and the save it was pinned
from still visible
beside it rather than folded into it;
- pinning again unchanged reusing the anchor instead of adding a second one;
- the version the pin was taken from surviving after the pin is dropped;
- the public view dated by the pinned version, and the same date reported by
the share dialog;
- a workflow that is following carrying no anchor at all.
`scalafmtCheckAll` clean.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 5)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]