The GitHub Actions job "Required Checks" on 
texera.git/fix/8599-beforeunload-teardown has failed.
Run started by GitHub user yangzhang75 (triggered by yangzhang75).

Head commit for run:
7aa3c77cc1ed9bf5a079b5af973659849a89bcc7 / Yang Zhang <[email protected]>
fix(workflow): gate the share dialog on a loaded workflow, and drop a stale 
publish state

Addresses the review on #8600.

The in-page switch reaches the same symptom by a different route, and it
is the gesture #8599 actually reports. `ngAfterViewInit` calls
`resetAsNewWorkflow()`, so the metadata sits at DEFAULT_WORKFLOW (wid 0)
on every canvas load and the real id only arrives with the workflow. The
Share button carried no gate and the loading spinner is in its own
container, so a click in that window opened a dialog that asked
`GET /workflow/type/0` and came back without the Private/Public choice.
The button is now disabled until the id arrives, and the handler refuses
the same window.

`ShareAccessComponent.ngOnInit` doubles as a refresh after an access
change, so a value from the previous read is still in `isPublic` when the
second read fails. It is dropped now: keeping it left the buttons on
screen showing a state nothing had confirmed, while the toast said the
choice was not shown.

The workspace `beforeunload` test called the handler rather than
dispatching the event, so the host binding could have been removed
without a test noticing. It dispatches the real event now, as the form's
equivalent test already did.

Deletion-checked: removing the host binding, the `[disabled]`, the
handler guard, or the `isPublic` reset each turns exactly the intended
tests red.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FVvP3ttj22f9LB4p9u2anY

Report URL: https://github.com/apache/texera/actions/runs/35405440708

With regards,
GitHub Actions via GitBox

Reply via email to