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

   Part of #7828. Stacked on #7858 — the review here is the last commit, 
`feat(frontend): choose between following and pinning in the share dialog`. 
**This is the first PR in the series a user can see.**
   
   The share dialog said whether a workflow was public and nothing about which 
copy the public was getting. With pinning that is a choice, so the dialog 
carries it.
   
   ## What the author sees
   
   Under the Public tile, a two-option control:
   
   | | |
   |---|---|
   | **Follow latest** | the default, and exactly what publishing does today — 
the public sees your latest, updated on every save |
   | **Pinned** | the version you have now is frozen; your later edits stay 
private until you pin again |
   
   While a pin is in place and the working copy has moved on, the panel says 
*The public is on an older version*, names the pinned one by the date it went 
public, and offers **Update to current** — which is the only way those edits 
reach the public.
   
   Private workflows show none of this. A user without write access cannot 
reach it: the status endpoint is guarded on write access, because whether edits 
are being held back is nobody else's business.
   
   ## Why the panel re-reads on save rather than on open
   
   `WorkflowPersistService` now emits when a save, a rename or a re-description 
lands. That is what makes "your edits are not public yet" appear as soon as the 
autosave does, rather than the next time the dialog is opened — the write is 
what changes the saved copy, not the keystroke.
   
   Publishing returns the state it produced, so the panel does not have to ask 
again.
   
   Forcing a save when the dialog opens was tried and reverted: the canvas is 
not always the workflow — it is empty while one loads, and stays empty if the 
collaborative model never arrives — so that save could write the emptiness over 
every operator the workflow had.
   
   ## Tests
   
   +24 frontend cases: the three states and their wording, the control 
switching between them, pinning and unpinning through the service, the panel 
re-reading when a save lands, the panel staying away on a private workflow and 
for a user without write access, and the dialog's existing access list 
untouched.
   


-- 
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