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

Head commit for run:
b86bb8b8f268ee204241cc3f6b66769ae179f46d / Yang Zhang <[email protected]>
fix(workflow): stop the workspace destroying itself on beforeunload

Switching between the operator canvas and the Form View is a full-page
navigation, and both pages ran their entire teardown from a beforeunload host
binding: clear the graph, destroy the shared document, disconnect the computing
unit, reset the execution state and the results.

A browser does not always discard a document it navigates away from. Chrome may
keep it in the back/forward cache, and going back restores the JavaScript state
exactly as it was left, re-running nothing. What came back was the page these
methods had already gutted: an empty canvas that answered no clicks, a workflow
id reset to DEFAULT_WORKFLOW's, and an autosave still subscribed, which then
wrote that default out as a brand-new blank workflow. The share dialog asked
about the same id and got an error.

There was never anything to tear down there. A document that really is discarded
takes its websockets and its graph with it, and a document that comes back needs
them. So beforeunload now only saves, and the teardown stays in ngOnDestroy,
which runs when the page is genuinely replaced. Both views change the same way.

Two more, each of which turned this into a silent failure:

* `getWorkflowType` read `fetchOneByWid(wid)` and dereferenced it, so an id
  matching no row answered 500 with a stack trace instead of 404.
* The share dialog's publish-state subscription had no error handler, so a
  failed request left `isPublic` null, and the template hides the Private/Public
  choice on exactly that. The dialog looked complete while offering one control
  fewer, and the only way to find out was the network tab.

One behaviour changes deliberately: the shared document is no longer destroyed
on unload, so a co-editor is no longer told explicitly that you left; the room
notices when the socket closes with the document.

Closes #8599.

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

With regards,
GitHub Actions via GitBox

Reply via email to