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

   ### What changes were proposed in this PR?
   
   Everything so far has been machinery with nothing to drive it. This is the 
control: in the share
   dialog, a published workflow gets a two-way switch for what the public sees.
   
   - **Two states, so the control is a switch.** *Follow latest* is what Texera 
does today — the
     public sees the author's latest, updated on every save. *Pinned* holds the 
version they froze.
     Both choices stay on screen, so the author reads what the options are 
instead of inferring one
     from the label of the other.
   - **Everything under the switch describes the side it is on** — a fact, not 
a warning: keeping an
     older version public is a legitimate choice. Green while the public has 
everything, amber once a
     pin is holding a version back.
   - **Only the pinned side has more to say.** Behind, that is the one decision 
the state leaves
     open, so it gets a card: which version is out there, what it costs, and 
the act that ends it.
   - **The panel describes the saved copy**, and the editor saves on a 
debounce, so it re-reads when
     a save lands. Deliberately it does not force a save first: the canvas is 
not always the workflow
     — it is empty while one loads, and stays empty if the collaborative model 
never arrives — so a
     save nobody asked for could write that emptiness over every operator the 
workflow had.
   
   **Behind a flag, off.** `gui.workflow-workspace.version-pinning-enabled` 
defaults to `false`, so
   merging this changes nothing anyone can see: the dialog is exactly what it 
is today and does not
   even ask the server about a state it cannot show. The last PR of the series 
turns it on, so the
   feature appears only once every surface that has to agree with a pin is in 
place.
   
   ### Any related issues, documentation, discussions?
   
   Closes #7942
   Part of #7828. Design discussion: #7128. Stacked on #7853, #8575, #8576 and 
#8577; until those
   merge this PR shows their commits too, and the review here is the last one.
   
   ### How was this PR tested?
   
   Frontend: the share-access spec covers the panel end to end — each of the 
three states and the
   sentence it shows, the switch calling pin and unpin and doing nothing when 
the side already in
   force is picked, "Update to current" asking for a re-pin, the date the card 
names, failures
   surfacing as a notification, the panel staying hidden for a workflow that is 
not published and
   for a user who cannot publish, and the re-read when a save lands. One case 
covers the flag being
   off: nothing renders and the status endpoint is not called. The persist spec 
covers the new
   pin/unpin/status calls and that a save is announced when it lands rather 
than when it is sent.
   Full suite passes (5983), production (AOT) build passes, prettier clean.
   
   Backend: `GuiConfigSpec` pins the flag's default to off (72 tests); the 
dashboard package passes
   (567); scalafmt 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]

Reply via email to