From a007da5b59ebe9a54bbe4124fb6e6e34e579c07f Mon Sep 17 00:00:00 2001 From: Yang Zhang Date: Fri, 11 Sep 2026 11:03:26 -0700 Subject: [PATCH 1/5] feat(gui): add the Form View edit mode, with instruction and result authoring With write access, an Edit toggle turns the Form View page into in-place authoring: the author writes the instruction (markdown, write/preview), picks which extra results to feature, and opens a step on the embedded preview live (the property panel acts as an editor with its expose tick boxes on), so exposing a setting happens where it is chosen. Leaving edit mode returns the page to the reader state. Edit mode re-enables workflow modification for the panel, so the structure lock the embedded preview already carries is handed to the right-click menu as well (cut, paste, delete and disable stay off there). Open canvas saves first and hands over only once the save has completed, since the full-page load would abort a request still in flight. Renaming, hiding, reordering and removing the exposed inputs themselves follow in the next PR. Closes #8026. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01FVvP3ttj22f9LB4p9u2anY --- .../property-editor.component.ts | 17 +- .../context-menu/context-menu.component.html | 17 +- .../context-menu.component.spec.ts | 57 +++++ .../context-menu/context-menu.component.ts | 16 +- .../workflow-editor.component.html | 2 +- .../workflow-editor.component.spec.ts | 19 +- .../workflow-editor.component.ts | 8 +- .../workflow-form.component.html | 211 +++++++++++++++--- .../workflow-form.component.scss | 201 ++++++++++++++++- .../workflow-form.component.spec.ts | 185 ++++++++++++++- .../workflow-form/workflow-form.component.ts | 192 ++++++++++++++-- .../workflow-form.rendered.spec.ts | 53 ++++- .../workflow-form.spec-harness.ts | 4 + .../form-binding/form-binding.service.ts | 8 +- 14 files changed, 900 insertions(+), 90 deletions(-) diff --git a/frontend/src/app/workspace/component/property-editor/property-editor.component.ts b/frontend/src/app/workspace/component/property-editor/property-editor.component.ts index 5952b942101..63b97a71c7a 100644 --- a/frontend/src/app/workspace/component/property-editor/property-editor.component.ts +++ b/frontend/src/app/workspace/component/property-editor/property-editor.component.ts @@ -235,15 +235,16 @@ export class PropertyEditorComponent implements OnInit, OnDestroy, OnChanges { ngOnDestroy(): void { // The Form View's read-only copy (persistPlacement=false) must not persist geometry: it is not // the docked canvas panel, so writing these keys would overwrite the real panel's saved size. - if (!this.persistPlacement) { - return; - } - localStorage.setItem("right-panel-width", String(this.width)); - localStorage.setItem("right-panel-height", String(this.height)); + // Guarding the block rather than returning early keeps any teardown added below it running for + // both mounts. + if (this.persistPlacement) { + localStorage.setItem("right-panel-width", String(this.width)); + localStorage.setItem("right-panel-height", String(this.height)); - const rightContainer = document.getElementById("right-container"); - if (rightContainer) { - localStorage.setItem("right-panel-style", rightContainer.style.cssText); + const rightContainer = document.getElementById("right-container"); + if (rightContainer) { + localStorage.setItem("right-panel-style", rightContainer.style.cssText); + } } } diff --git a/frontend/src/app/workspace/component/workflow-editor/context-menu/context-menu/context-menu.component.html b/frontend/src/app/workspace/component/workflow-editor/context-menu/context-menu/context-menu.component.html index 4465d65cb27..7d423f58d52 100644 --- a/frontend/src/app/workspace/component/workflow-editor/context-menu/context-menu/context-menu.component.html +++ b/frontend/src/app/workspace/component/workflow-editor/context-menu/context-menu/context-menu.component.html @@ -17,6 +17,9 @@ under the License. --> +