You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "yangzhang75 (via GitHub)" <gi...@apache.org> on 2026/09/03 04:58:04 UTC

[PR] feat(workflow-form): Form View page shell, load, and the shared spec harness [texera]

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

   ### What changes were proposed in this PR?
   
   Part of the Form View feature stack (parent issue #8011). It builds on PR5 (#8318); until that merges the diff also shows PR5's files, and PR6's own change is the Form View page shell plus the shared spec harness (5 files under `workspace/component/workflow-form/`).
   
   The read-only shell of the Form View page:
   
   * Behind the `formViewEnabled` flag it loads the workflow the URL names, and redirects to the operator canvas when the workflow does not open in the form (its `default_view` is not `FORM`) or the flag is off.
   * Shows the workflow read-only (the graph and its properties are not edited here) and offers a switch back to the operator canvas via a full page load.
   * Releases the shared singleton services (graph, shared model, computing-unit connection, console, results) on destroy, so nothing left bound here follows the user to the next page.
   
   It also adds `workflow-form.spec-harness.ts`, the shared mock/factory these specs build the component from; later slices extend it with the dependencies they introduce. The title bar's rename/save, the read-only workflow preview, the inputs, running and the results are added on top by later PRs of the stack.
   
   ### Any related issues, documentation, discussions?
   
   Closes #8018.
   
   Part of the Form View feature (parent issue #8011); builds on PR5 (#8318).
   
   ### How was this PR tested?
   
   Unit tests (vitest): `workflow-form.component.spec.ts` (7 tests). The page component injects ~16 services and heavy child components, so its spec constructs it directly with the shared harness's mocks rather than through TestBed; template rendering is therefore not exercised, but the component and the harness are at 100% of the TypeScript lines this PR adds. The template compiles cleanly under `ng build`.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Yes. Co-authored with Claude (Anthropic), reviewed line by line by the author before submission.


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(workflow-form): Form View page shell, load, and the shared spec harness [texera]

Posted by "yangzhang75 (via GitHub)" <gi...@apache.org>.
yangzhang75 commented on code in PR #8376:
URL: https://github.com/apache/texera/pull/8376#discussion_r3930687683


##########
frontend/src/app/workspace/component/workflow-form/workflow-form.component.html:
##########
@@ -0,0 +1,65 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<!-- The operator canvas's title row, rebuilt here to the same measurements: same
+     height, same rule underneath, same full-bleed width, and the view switch pinned to
+     the same right inset ahead of the same user icon. The name is shown here; making it
+     editable (with the same rename/save the canvas gives) is the next PR. -->
+<div class="pc-topbar">

Review Comment:
   Added a screenshot of the read-only shell to the PR description. Since the spec deliberately skips template rendering, this is the rendered-page evidence for the view.



-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(workflow-form): Form View page shell, load, and the shared spec harness [texera]

Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 merged PR #8376:
URL: https://github.com/apache/texera/pull/8376


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(workflow-form): Form View page shell, load, and the shared spec harness [texera]

Posted by "yangzhang75 (via GitHub)" <gi...@apache.org>.
yangzhang75 commented on PR #8376:
URL: https://github.com/apache/texera/pull/8376#issuecomment-5544335657

   @mengw15 on the coverage ask: added `workflow-form.rendered.spec.ts`, a TestBed-rendered spec that stands the real template up (only the two child icons are blanked -- their ng-zorro dropdown/menu needs a host context this page does not set up -- so the page's own template renders as shipped). It covers the name/avatar row, the Canvas control firing the switch, the loading/body swap, the co-editor row, and the beforeunload teardown. Patch is now 100% locally on both the component (61/61) and the template (31/31); it takes over from the screenshot as the rendering evidence going forward. fcafb53.


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(workflow-form): Form View page shell, load, and the shared spec harness [texera]

Posted by "yangzhang75 (via GitHub)" <gi...@apache.org>.
yangzhang75 commented on PR #8376:
URL: https://github.com/apache/texera/pull/8376#issuecomment-5535344161

   Thanks @mengw15. Both addressed in a3ed02c:
   
   1. Registered the `workflow/:id/form` route above `workflow/:id` in `app-routing.module.ts`, so the trailing segment is not swallowed. As you noted, the page guards itself (flag off, or a non-form-default workflow, redirects to the canvas), so it exposes nothing while making this and every later slice testable at the real URL.
   2. Added a screenshot of the read-only shell to the description; since the spec skips template rendering, it is the rendered-page evidence for this view.


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(workflow-form): Form View page shell, load, and the shared spec harness [texera]

Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 commented on code in PR #8376:
URL: https://github.com/apache/texera/pull/8376#discussion_r3931823408


##########
frontend/src/app/workspace/component/workflow-form/workflow-form.component.ts:
##########
@@ -0,0 +1,163 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { ChangeDetectorRef, Component, HostListener, OnDestroy, OnInit } from "@angular/core";
+import { CommonModule } from "@angular/common";
+import { ActivatedRoute, Router } from "@angular/router";
+import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
+import { NzAvatarModule } from "ng-zorro-antd/avatar";
+import { UserIconComponent } from "../../../dashboard/component/user/user-icon/user-icon.component";
+import { forkJoin } from "rxjs";
+
+import { USER_WORKFLOW, USER_WORKSPACE } from "../../../app-routing.constant";
+import { ComputingUnitStatusService } from "../../../common/service/computing-unit/computing-unit-status/computing-unit-status.service";
+import { WorkflowPersistService } from "../../../common/service/workflow-persist/workflow-persist.service";
+import { NotificationService } from "../../../common/service/notification/notification.service";
+import { UserService } from "../../../common/service/user/user.service";
+import { ExecuteWorkflowService } from "../../service/execute-workflow/execute-workflow.service";
+import { OperatorMetadataService } from "../../service/operator-metadata/operator-metadata.service";
+import { WorkflowActionService } from "../../service/workflow-graph/model/workflow-action.service";
+import { GuiConfigService } from "../../../common/service/gui-config.service";
+import { WorkflowConsoleService } from "../../service/workflow-console/workflow-console.service";
+import { WorkflowResultService } from "../../service/workflow-result/workflow-result.service";
+import { DefaultView } from "../../../dashboard/type/workflow-metadata.interface";
+import { CoeditorUserIconComponent } from "../menu/coeditor-user-icon/coeditor-user-icon.component";
+import { CoeditorPresenceService } from "../../service/workflow-graph/model/coeditor-presence.service";
+
+/**
+ * The Form View: a second way to use a workflow. This PR lays down the page shell -- behind
+ * the feature flag it loads the workflow the URL names, shows it read-only, and hands back to
+ * the operator canvas. The title bar's rename/save, the read-only preview, the inputs, running
+ * and results are added on top by later PRs. A view, not a new object: it opens the same
+ * workflow the canvas does.
+ */
+@UntilDestroy()
+@Component({
+  selector: "texera-workflow-form",
+  templateUrl: "./workflow-form.component.html",
+  styleUrls: ["./workflow-form.component.scss"],
+  imports: [CommonModule, NzAvatarModule, UserIconComponent, CoeditorUserIconComponent],
+})
+export class WorkflowFormComponent implements OnInit, OnDestroy {
+  public wid?: number;
+  public workflowName = "";
+  public loading = true;
+
+  constructor(
+    // Public for the template: shows the same live collaborator avatars as the canvas.
+    public coeditorPresenceService: CoeditorPresenceService,
+    private route: ActivatedRoute,
+    private router: Router,
+    private workflowActionService: WorkflowActionService,
+    private workflowPersistService: WorkflowPersistService,
+    private operatorMetadataService: OperatorMetadataService,
+    private executeWorkflowService: ExecuteWorkflowService,
+    private workflowResultService: WorkflowResultService,
+    private notificationService: NotificationService,
+    private userService: UserService,
+    private cdr: ChangeDetectorRef,
+    private computingUnitStatusService: ComputingUnitStatusService,
+    private workflowConsoleService: WorkflowConsoleService,
+    private config: GuiConfigService
+  ) {}
+
+  ngOnInit(): void {
+    const wid = Number(this.route.snapshot.params.id);
+    if (!Number.isFinite(wid)) {
+      void this.router.navigate([USER_WORKFLOW]);
+      return;
+    }
+    this.wid = wid;
+    this.load(wid);
+  }
+
+  private load(wid: number): void {
+    // With the feature off the form does not exist: hand straight to the operator canvas
+    // without loading anything, so a request that then fails cannot strand the visitor on
+    // an error instead of the page they would have gotten.
+    if (!this.config.env.formViewEnabled) {
+      void this.router.navigate([USER_WORKSPACE, String(wid)], { replaceUrl: true });
+      return;
+    }
+    this.workflowActionService.resetAsNewWorkflow();
+    forkJoin({
+      metadata: this.operatorMetadataService.getOperatorMetadata(),
+      workflow: this.workflowPersistService.retrieveWorkflow(wid),
+    })
+      .pipe(untilDestroyed(this))
+      .subscribe({
+        next: ({ workflow }) => {
+          // Even with the flag on, a workflow that opens on the operator canvas is sent
+          // there: reaching this URL for it lands on the canvas, not an empty page.
+          if (workflow.defaultView !== DefaultView.FORM) {

Review Comment:
   The #8011 closing note settled that the form renders for any workflow while the flag is on ("nothing redirects away from the form" — the default_view bit only picks the landing), yet this condition redirects a canvas-default workflow (undefined included) away, which quietly reintroduces the per-workflow gate: pr11's view switch would bounce straight back for any workflow whose default is the canvas. If it's temporary scaffolding while the body is empty, worth a comment saying which slice removes it; if it's meant to stay, it contradicts the settled model.



-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(workflow-form): Form View page shell, load, and the shared spec harness [texera]

Posted by "yangzhang75 (via GitHub)" <gi...@apache.org>.
yangzhang75 commented on code in PR #8376:
URL: https://github.com/apache/texera/pull/8376#discussion_r3936541937


##########
frontend/src/app/workspace/component/workflow-form/workflow-form.component.ts:
##########
@@ -0,0 +1,163 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { ChangeDetectorRef, Component, HostListener, OnDestroy, OnInit } from "@angular/core";
+import { CommonModule } from "@angular/common";
+import { ActivatedRoute, Router } from "@angular/router";
+import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
+import { NzAvatarModule } from "ng-zorro-antd/avatar";
+import { UserIconComponent } from "../../../dashboard/component/user/user-icon/user-icon.component";
+import { forkJoin } from "rxjs";
+
+import { USER_WORKFLOW, USER_WORKSPACE } from "../../../app-routing.constant";
+import { ComputingUnitStatusService } from "../../../common/service/computing-unit/computing-unit-status/computing-unit-status.service";
+import { WorkflowPersistService } from "../../../common/service/workflow-persist/workflow-persist.service";
+import { NotificationService } from "../../../common/service/notification/notification.service";
+import { UserService } from "../../../common/service/user/user.service";
+import { ExecuteWorkflowService } from "../../service/execute-workflow/execute-workflow.service";
+import { OperatorMetadataService } from "../../service/operator-metadata/operator-metadata.service";
+import { WorkflowActionService } from "../../service/workflow-graph/model/workflow-action.service";
+import { GuiConfigService } from "../../../common/service/gui-config.service";
+import { WorkflowConsoleService } from "../../service/workflow-console/workflow-console.service";
+import { WorkflowResultService } from "../../service/workflow-result/workflow-result.service";
+import { DefaultView } from "../../../dashboard/type/workflow-metadata.interface";
+import { CoeditorUserIconComponent } from "../menu/coeditor-user-icon/coeditor-user-icon.component";
+import { CoeditorPresenceService } from "../../service/workflow-graph/model/coeditor-presence.service";
+
+/**
+ * The Form View: a second way to use a workflow. This PR lays down the page shell -- behind
+ * the feature flag it loads the workflow the URL names, shows it read-only, and hands back to
+ * the operator canvas. The title bar's rename/save, the read-only preview, the inputs, running
+ * and results are added on top by later PRs. A view, not a new object: it opens the same
+ * workflow the canvas does.
+ */
+@UntilDestroy()
+@Component({
+  selector: "texera-workflow-form",
+  templateUrl: "./workflow-form.component.html",
+  styleUrls: ["./workflow-form.component.scss"],
+  imports: [CommonModule, NzAvatarModule, UserIconComponent, CoeditorUserIconComponent],
+})
+export class WorkflowFormComponent implements OnInit, OnDestroy {
+  public wid?: number;
+  public workflowName = "";
+  public loading = true;
+
+  constructor(
+    // Public for the template: shows the same live collaborator avatars as the canvas.
+    public coeditorPresenceService: CoeditorPresenceService,
+    private route: ActivatedRoute,
+    private router: Router,
+    private workflowActionService: WorkflowActionService,
+    private workflowPersistService: WorkflowPersistService,
+    private operatorMetadataService: OperatorMetadataService,
+    private executeWorkflowService: ExecuteWorkflowService,
+    private workflowResultService: WorkflowResultService,
+    private notificationService: NotificationService,
+    private userService: UserService,
+    private cdr: ChangeDetectorRef,
+    private computingUnitStatusService: ComputingUnitStatusService,
+    private workflowConsoleService: WorkflowConsoleService,
+    private config: GuiConfigService
+  ) {}
+
+  ngOnInit(): void {
+    const wid = Number(this.route.snapshot.params.id);
+    if (!Number.isFinite(wid)) {
+      void this.router.navigate([USER_WORKFLOW]);
+      return;
+    }
+    this.wid = wid;
+    this.load(wid);
+  }
+
+  private load(wid: number): void {
+    // With the feature off the form does not exist: hand straight to the operator canvas
+    // without loading anything, so a request that then fails cannot strand the visitor on
+    // an error instead of the page they would have gotten.
+    if (!this.config.env.formViewEnabled) {
+      void this.router.navigate([USER_WORKSPACE, String(wid)], { replaceUrl: true });
+      return;
+    }
+    this.workflowActionService.resetAsNewWorkflow();
+    forkJoin({
+      metadata: this.operatorMetadataService.getOperatorMetadata(),
+      workflow: this.workflowPersistService.retrieveWorkflow(wid),
+    })
+      .pipe(untilDestroyed(this))
+      .subscribe({
+        next: ({ workflow }) => {
+          // Even with the flag on, a workflow that opens on the operator canvas is sent
+          // there: reaching this URL for it lands on the canvas, not an empty page.
+          if (workflow.defaultView !== DefaultView.FORM) {

Review Comment:
   Removed. `load()` no longer checks `default_view`: with the flag on the form renders for any workflow, and `default_view` only picks the landing view, per the #8011 note. Dropped the redirect and the now-unused import, and inverted the spec so a canvas-default workflow renders here rather than being bounced. fcafb53.



-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(workflow-form): Form View page shell, load, and the shared spec harness [texera]

Posted by "yangzhang75 (via GitHub)" <gi...@apache.org>.
yangzhang75 commented on code in PR #8376:
URL: https://github.com/apache/texera/pull/8376#discussion_r3930594414


##########
frontend/src/app/workspace/component/workflow-form/workflow-form.component.ts:
##########
@@ -0,0 +1,155 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { ChangeDetectorRef, Component, HostListener, OnDestroy, OnInit } from "@angular/core";
+import { CommonModule } from "@angular/common";
+import { ActivatedRoute, Router } from "@angular/router";
+import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
+import { NzAvatarModule } from "ng-zorro-antd/avatar";
+import { UserIconComponent } from "../../../dashboard/component/user/user-icon/user-icon.component";
+import { forkJoin } from "rxjs";
+
+import { USER_WORKFLOW, USER_WORKSPACE } from "../../../app-routing.constant";
+import { ComputingUnitStatusService } from "../../../common/service/computing-unit/computing-unit-status/computing-unit-status.service";
+import { WorkflowPersistService } from "../../../common/service/workflow-persist/workflow-persist.service";
+import { NotificationService } from "../../../common/service/notification/notification.service";
+import { UserService } from "../../../common/service/user/user.service";
+import { ExecuteWorkflowService } from "../../service/execute-workflow/execute-workflow.service";
+import { OperatorMetadataService } from "../../service/operator-metadata/operator-metadata.service";
+import { WorkflowActionService } from "../../service/workflow-graph/model/workflow-action.service";
+import { GuiConfigService } from "../../../common/service/gui-config.service";
+import { WorkflowConsoleService } from "../../service/workflow-console/workflow-console.service";
+import { WorkflowResultService } from "../../service/workflow-result/workflow-result.service";
+import { DefaultView } from "../../../dashboard/type/workflow-metadata.interface";
+import { CoeditorUserIconComponent } from "../menu/coeditor-user-icon/coeditor-user-icon.component";
+import { CoeditorPresenceService } from "../../service/workflow-graph/model/coeditor-presence.service";
+
+/**
+ * The Form View: a second way to use a workflow. This PR lays down the page shell -- behind
+ * the feature flag it loads the workflow the URL names, shows it read-only, and hands back to
+ * the operator canvas. The title bar's rename/save, the read-only preview, the inputs, running
+ * and results are added on top by later PRs. A view, not a new object: it opens the same
+ * workflow the canvas does.
+ */
+@UntilDestroy()
+@Component({
+  selector: "texera-workflow-form",
+  templateUrl: "./workflow-form.component.html",
+  styleUrls: ["./workflow-form.component.scss"],
+  imports: [CommonModule, NzAvatarModule, UserIconComponent, CoeditorUserIconComponent],
+})
+export class WorkflowFormComponent implements OnInit, OnDestroy {
+  public wid?: number;
+  public workflowName = "";
+  public loading = true;
+
+  constructor(
+    // Public for the template: shows the same live collaborator avatars as the canvas.
+    public coeditorPresenceService: CoeditorPresenceService,
+    private route: ActivatedRoute,
+    private router: Router,
+    private workflowActionService: WorkflowActionService,
+    private workflowPersistService: WorkflowPersistService,
+    private operatorMetadataService: OperatorMetadataService,
+    private executeWorkflowService: ExecuteWorkflowService,
+    private workflowResultService: WorkflowResultService,
+    private notificationService: NotificationService,
+    private userService: UserService,
+    private cdr: ChangeDetectorRef,
+    private computingUnitStatusService: ComputingUnitStatusService,
+    private workflowConsoleService: WorkflowConsoleService,
+    private config: GuiConfigService
+  ) {}
+
+  ngOnInit(): void {
+    const wid = Number(this.route.snapshot.params.id);
+    if (!Number.isFinite(wid)) {
+      void this.router.navigate([USER_WORKFLOW]);
+      return;
+    }
+    this.wid = wid;
+    this.load(wid);
+  }
+
+  private load(wid: number): void {
+    this.workflowActionService.resetAsNewWorkflow();
+    forkJoin({
+      metadata: this.operatorMetadataService.getOperatorMetadata(),
+      workflow: this.workflowPersistService.retrieveWorkflow(wid),
+    })

Review Comment:
   Fixed in a3ed02c. The feature flag is now checked at the top of `load()`, before `forkJoin`, so with the flag off the page redirects to the canvas without issuing any request. Added an assertion to the flag-off test that no load is attempted.



##########
frontend/src/app/workspace/component/workflow-form/workflow-form.component.ts:
##########
@@ -0,0 +1,155 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { ChangeDetectorRef, Component, HostListener, OnDestroy, OnInit } from "@angular/core";
+import { CommonModule } from "@angular/common";
+import { ActivatedRoute, Router } from "@angular/router";
+import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
+import { NzAvatarModule } from "ng-zorro-antd/avatar";
+import { UserIconComponent } from "../../../dashboard/component/user/user-icon/user-icon.component";
+import { forkJoin } from "rxjs";
+
+import { USER_WORKFLOW, USER_WORKSPACE } from "../../../app-routing.constant";
+import { ComputingUnitStatusService } from "../../../common/service/computing-unit/computing-unit-status/computing-unit-status.service";
+import { WorkflowPersistService } from "../../../common/service/workflow-persist/workflow-persist.service";
+import { NotificationService } from "../../../common/service/notification/notification.service";
+import { UserService } from "../../../common/service/user/user.service";
+import { ExecuteWorkflowService } from "../../service/execute-workflow/execute-workflow.service";
+import { OperatorMetadataService } from "../../service/operator-metadata/operator-metadata.service";
+import { WorkflowActionService } from "../../service/workflow-graph/model/workflow-action.service";
+import { GuiConfigService } from "../../../common/service/gui-config.service";
+import { WorkflowConsoleService } from "../../service/workflow-console/workflow-console.service";
+import { WorkflowResultService } from "../../service/workflow-result/workflow-result.service";
+import { DefaultView } from "../../../dashboard/type/workflow-metadata.interface";
+import { CoeditorUserIconComponent } from "../menu/coeditor-user-icon/coeditor-user-icon.component";
+import { CoeditorPresenceService } from "../../service/workflow-graph/model/coeditor-presence.service";
+
+/**
+ * The Form View: a second way to use a workflow. This PR lays down the page shell -- behind
+ * the feature flag it loads the workflow the URL names, shows it read-only, and hands back to
+ * the operator canvas. The title bar's rename/save, the read-only preview, the inputs, running
+ * and results are added on top by later PRs. A view, not a new object: it opens the same
+ * workflow the canvas does.
+ */
+@UntilDestroy()
+@Component({
+  selector: "texera-workflow-form",
+  templateUrl: "./workflow-form.component.html",
+  styleUrls: ["./workflow-form.component.scss"],
+  imports: [CommonModule, NzAvatarModule, UserIconComponent, CoeditorUserIconComponent],
+})
+export class WorkflowFormComponent implements OnInit, OnDestroy {
+  public wid?: number;
+  public workflowName = "";
+  public loading = true;
+
+  constructor(
+    // Public for the template: shows the same live collaborator avatars as the canvas.
+    public coeditorPresenceService: CoeditorPresenceService,
+    private route: ActivatedRoute,
+    private router: Router,
+    private workflowActionService: WorkflowActionService,
+    private workflowPersistService: WorkflowPersistService,
+    private operatorMetadataService: OperatorMetadataService,
+    private executeWorkflowService: ExecuteWorkflowService,
+    private workflowResultService: WorkflowResultService,
+    private notificationService: NotificationService,
+    private userService: UserService,
+    private cdr: ChangeDetectorRef,
+    private computingUnitStatusService: ComputingUnitStatusService,
+    private workflowConsoleService: WorkflowConsoleService,
+    private config: GuiConfigService
+  ) {}
+
+  ngOnInit(): void {
+    const wid = Number(this.route.snapshot.params.id);
+    if (!Number.isFinite(wid)) {
+      void this.router.navigate([USER_WORKFLOW]);
+      return;
+    }
+    this.wid = wid;
+    this.load(wid);
+  }
+
+  private load(wid: number): void {
+    this.workflowActionService.resetAsNewWorkflow();
+    forkJoin({
+      metadata: this.operatorMetadataService.getOperatorMetadata(),
+      workflow: this.workflowPersistService.retrieveWorkflow(wid),
+    })
+      .pipe(untilDestroyed(this))
+      .subscribe({
+        next: ({ workflow }) => {
+          // The form is only offered where the feature flag is on and this workflow opens
+          // in it. Reaching this URL any other way lands on the operator canvas, not an
+          // empty page.
+          if (!this.config.env.formViewEnabled || workflow.defaultView !== DefaultView.FORM) {
+            void this.router.navigate([USER_WORKSPACE, String(wid)], { replaceUrl: true });
+            return;
+          }
+          this.workflowName = workflow.name;
+          this.workflowActionService.setNewSharedModel(wid, this.userService.getCurrentUser());
+          this.workflowActionService.reloadWorkflow(workflow);
+          // The workflow is shown, not edited, from here: dragging operators around or
+          // deleting them belongs to the operator canvas.
+          this.applyEditability();
+          this.loading = false;
+          this.cdr.detectChanges();
+        },
+        error: () => {
+          this.notificationService.error("You do not have access to this workflow.");
+          void this.router.navigate([USER_WORKFLOW]);
+        },

Review Comment:
   Fixed in a3ed02c. The error handler now shows a neutral "Unable to open this workflow." instead of claiming a permissions problem, since the failure can also be a network or server error, or the metadata call.



##########
frontend/src/app/workspace/component/workflow-form/workflow-form.component.ts:
##########
@@ -0,0 +1,155 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { ChangeDetectorRef, Component, HostListener, OnDestroy, OnInit } from "@angular/core";
+import { CommonModule } from "@angular/common";
+import { ActivatedRoute, Router } from "@angular/router";
+import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
+import { NzAvatarModule } from "ng-zorro-antd/avatar";
+import { UserIconComponent } from "../../../dashboard/component/user/user-icon/user-icon.component";
+import { forkJoin } from "rxjs";
+
+import { USER_WORKFLOW, USER_WORKSPACE } from "../../../app-routing.constant";
+import { ComputingUnitStatusService } from "../../../common/service/computing-unit/computing-unit-status/computing-unit-status.service";
+import { WorkflowPersistService } from "../../../common/service/workflow-persist/workflow-persist.service";
+import { NotificationService } from "../../../common/service/notification/notification.service";
+import { UserService } from "../../../common/service/user/user.service";
+import { ExecuteWorkflowService } from "../../service/execute-workflow/execute-workflow.service";
+import { OperatorMetadataService } from "../../service/operator-metadata/operator-metadata.service";
+import { WorkflowActionService } from "../../service/workflow-graph/model/workflow-action.service";
+import { GuiConfigService } from "../../../common/service/gui-config.service";
+import { WorkflowConsoleService } from "../../service/workflow-console/workflow-console.service";
+import { WorkflowResultService } from "../../service/workflow-result/workflow-result.service";
+import { DefaultView } from "../../../dashboard/type/workflow-metadata.interface";
+import { CoeditorUserIconComponent } from "../menu/coeditor-user-icon/coeditor-user-icon.component";
+import { CoeditorPresenceService } from "../../service/workflow-graph/model/coeditor-presence.service";
+
+/**
+ * The Form View: a second way to use a workflow. This PR lays down the page shell -- behind
+ * the feature flag it loads the workflow the URL names, shows it read-only, and hands back to
+ * the operator canvas. The title bar's rename/save, the read-only preview, the inputs, running
+ * and results are added on top by later PRs. A view, not a new object: it opens the same
+ * workflow the canvas does.
+ */
+@UntilDestroy()
+@Component({
+  selector: "texera-workflow-form",
+  templateUrl: "./workflow-form.component.html",
+  styleUrls: ["./workflow-form.component.scss"],
+  imports: [CommonModule, NzAvatarModule, UserIconComponent, CoeditorUserIconComponent],
+})
+export class WorkflowFormComponent implements OnInit, OnDestroy {

Review Comment:
   Fixed in a3ed02c. Registered `workflow/:id/form` in `app-routing.module.ts`, placed above `workflow/:id` so the trailing `form` segment is not swallowed by the canvas route. The page guards itself (flag off, or a non-form-default workflow, redirects to the canvas), so it exposes nothing while making this and every later slice testable at the real URL.



-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(workflow-form): Form View page shell, load, and the shared spec harness [texera]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #8376:
URL: https://github.com/apache/texera/pull/8376#discussion_r3929424141


##########
frontend/src/app/workspace/component/workflow-form/workflow-form.component.ts:
##########
@@ -0,0 +1,155 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { ChangeDetectorRef, Component, HostListener, OnDestroy, OnInit } from "@angular/core";
+import { CommonModule } from "@angular/common";
+import { ActivatedRoute, Router } from "@angular/router";
+import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
+import { NzAvatarModule } from "ng-zorro-antd/avatar";
+import { UserIconComponent } from "../../../dashboard/component/user/user-icon/user-icon.component";
+import { forkJoin } from "rxjs";
+
+import { USER_WORKFLOW, USER_WORKSPACE } from "../../../app-routing.constant";
+import { ComputingUnitStatusService } from "../../../common/service/computing-unit/computing-unit-status/computing-unit-status.service";
+import { WorkflowPersistService } from "../../../common/service/workflow-persist/workflow-persist.service";
+import { NotificationService } from "../../../common/service/notification/notification.service";
+import { UserService } from "../../../common/service/user/user.service";
+import { ExecuteWorkflowService } from "../../service/execute-workflow/execute-workflow.service";
+import { OperatorMetadataService } from "../../service/operator-metadata/operator-metadata.service";
+import { WorkflowActionService } from "../../service/workflow-graph/model/workflow-action.service";
+import { GuiConfigService } from "../../../common/service/gui-config.service";
+import { WorkflowConsoleService } from "../../service/workflow-console/workflow-console.service";
+import { WorkflowResultService } from "../../service/workflow-result/workflow-result.service";
+import { DefaultView } from "../../../dashboard/type/workflow-metadata.interface";
+import { CoeditorUserIconComponent } from "../menu/coeditor-user-icon/coeditor-user-icon.component";
+import { CoeditorPresenceService } from "../../service/workflow-graph/model/coeditor-presence.service";
+
+/**
+ * The Form View: a second way to use a workflow. This PR lays down the page shell -- behind
+ * the feature flag it loads the workflow the URL names, shows it read-only, and hands back to
+ * the operator canvas. The title bar's rename/save, the read-only preview, the inputs, running
+ * and results are added on top by later PRs. A view, not a new object: it opens the same
+ * workflow the canvas does.
+ */
+@UntilDestroy()
+@Component({
+  selector: "texera-workflow-form",
+  templateUrl: "./workflow-form.component.html",
+  styleUrls: ["./workflow-form.component.scss"],
+  imports: [CommonModule, NzAvatarModule, UserIconComponent, CoeditorUserIconComponent],
+})
+export class WorkflowFormComponent implements OnInit, OnDestroy {

Review Comment:
   This component is never registered with Angular routing. `app-routing.module.ts` currently maps only `user/workflow/:id` to `WorkspaceComponent`, so `/user/workflow/7/form` falls through to the wildcard and redirects to the workflow list. Please import this component and add a `workflow/:id/form` route (before the generic workflow route) so the page introduced by this PR is reachable.



##########
frontend/src/app/workspace/component/workflow-form/workflow-form.component.ts:
##########
@@ -0,0 +1,155 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { ChangeDetectorRef, Component, HostListener, OnDestroy, OnInit } from "@angular/core";
+import { CommonModule } from "@angular/common";
+import { ActivatedRoute, Router } from "@angular/router";
+import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
+import { NzAvatarModule } from "ng-zorro-antd/avatar";
+import { UserIconComponent } from "../../../dashboard/component/user/user-icon/user-icon.component";
+import { forkJoin } from "rxjs";
+
+import { USER_WORKFLOW, USER_WORKSPACE } from "../../../app-routing.constant";
+import { ComputingUnitStatusService } from "../../../common/service/computing-unit/computing-unit-status/computing-unit-status.service";
+import { WorkflowPersistService } from "../../../common/service/workflow-persist/workflow-persist.service";
+import { NotificationService } from "../../../common/service/notification/notification.service";
+import { UserService } from "../../../common/service/user/user.service";
+import { ExecuteWorkflowService } from "../../service/execute-workflow/execute-workflow.service";
+import { OperatorMetadataService } from "../../service/operator-metadata/operator-metadata.service";
+import { WorkflowActionService } from "../../service/workflow-graph/model/workflow-action.service";
+import { GuiConfigService } from "../../../common/service/gui-config.service";
+import { WorkflowConsoleService } from "../../service/workflow-console/workflow-console.service";
+import { WorkflowResultService } from "../../service/workflow-result/workflow-result.service";
+import { DefaultView } from "../../../dashboard/type/workflow-metadata.interface";
+import { CoeditorUserIconComponent } from "../menu/coeditor-user-icon/coeditor-user-icon.component";
+import { CoeditorPresenceService } from "../../service/workflow-graph/model/coeditor-presence.service";
+
+/**
+ * The Form View: a second way to use a workflow. This PR lays down the page shell -- behind
+ * the feature flag it loads the workflow the URL names, shows it read-only, and hands back to
+ * the operator canvas. The title bar's rename/save, the read-only preview, the inputs, running
+ * and results are added on top by later PRs. A view, not a new object: it opens the same
+ * workflow the canvas does.
+ */
+@UntilDestroy()
+@Component({
+  selector: "texera-workflow-form",
+  templateUrl: "./workflow-form.component.html",
+  styleUrls: ["./workflow-form.component.scss"],
+  imports: [CommonModule, NzAvatarModule, UserIconComponent, CoeditorUserIconComponent],
+})
+export class WorkflowFormComponent implements OnInit, OnDestroy {
+  public wid?: number;
+  public workflowName = "";
+  public loading = true;
+
+  constructor(
+    // Public for the template: shows the same live collaborator avatars as the canvas.
+    public coeditorPresenceService: CoeditorPresenceService,
+    private route: ActivatedRoute,
+    private router: Router,
+    private workflowActionService: WorkflowActionService,
+    private workflowPersistService: WorkflowPersistService,
+    private operatorMetadataService: OperatorMetadataService,
+    private executeWorkflowService: ExecuteWorkflowService,
+    private workflowResultService: WorkflowResultService,
+    private notificationService: NotificationService,
+    private userService: UserService,
+    private cdr: ChangeDetectorRef,
+    private computingUnitStatusService: ComputingUnitStatusService,
+    private workflowConsoleService: WorkflowConsoleService,
+    private config: GuiConfigService
+  ) {}
+
+  ngOnInit(): void {
+    const wid = Number(this.route.snapshot.params.id);
+    if (!Number.isFinite(wid)) {
+      void this.router.navigate([USER_WORKFLOW]);
+      return;
+    }
+    this.wid = wid;
+    this.load(wid);
+  }
+
+  private load(wid: number): void {
+    this.workflowActionService.resetAsNewWorkflow();
+    forkJoin({
+      metadata: this.operatorMetadataService.getOperatorMetadata(),
+      workflow: this.workflowPersistService.retrieveWorkflow(wid),
+    })

Review Comment:
   The feature flag is checked only after both requests complete. When the flag is off, a metadata/workflow request failure therefore shows an access error and navigates to the list instead of unconditionally handing off to the canvas as specified; successful requests also perform unnecessary work. Guard the flag before starting `forkJoin`.



##########
frontend/src/app/workspace/component/workflow-form/workflow-form.component.html:
##########
@@ -0,0 +1,65 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<!-- The operator canvas's title row, rebuilt here to the same measurements: same
+     height, same rule underneath, same full-bleed width, and the view switch pinned to
+     the same right inset ahead of the same user icon. The name is shown here; making it
+     editable (with the same rename/save the canvas gives) is the next PR. -->
+<div class="pc-topbar">

Review Comment:
   This adds a visible page shell and navigation control, but the PR description has no before/after screenshots or GIF. Repository guidance requires side-by-side visual evidence for frontend UI changes; please add it to the PR description.



##########
frontend/src/app/workspace/component/workflow-form/workflow-form.component.ts:
##########
@@ -0,0 +1,155 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { ChangeDetectorRef, Component, HostListener, OnDestroy, OnInit } from "@angular/core";
+import { CommonModule } from "@angular/common";
+import { ActivatedRoute, Router } from "@angular/router";
+import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
+import { NzAvatarModule } from "ng-zorro-antd/avatar";
+import { UserIconComponent } from "../../../dashboard/component/user/user-icon/user-icon.component";
+import { forkJoin } from "rxjs";
+
+import { USER_WORKFLOW, USER_WORKSPACE } from "../../../app-routing.constant";
+import { ComputingUnitStatusService } from "../../../common/service/computing-unit/computing-unit-status/computing-unit-status.service";
+import { WorkflowPersistService } from "../../../common/service/workflow-persist/workflow-persist.service";
+import { NotificationService } from "../../../common/service/notification/notification.service";
+import { UserService } from "../../../common/service/user/user.service";
+import { ExecuteWorkflowService } from "../../service/execute-workflow/execute-workflow.service";
+import { OperatorMetadataService } from "../../service/operator-metadata/operator-metadata.service";
+import { WorkflowActionService } from "../../service/workflow-graph/model/workflow-action.service";
+import { GuiConfigService } from "../../../common/service/gui-config.service";
+import { WorkflowConsoleService } from "../../service/workflow-console/workflow-console.service";
+import { WorkflowResultService } from "../../service/workflow-result/workflow-result.service";
+import { DefaultView } from "../../../dashboard/type/workflow-metadata.interface";
+import { CoeditorUserIconComponent } from "../menu/coeditor-user-icon/coeditor-user-icon.component";
+import { CoeditorPresenceService } from "../../service/workflow-graph/model/coeditor-presence.service";
+
+/**
+ * The Form View: a second way to use a workflow. This PR lays down the page shell -- behind
+ * the feature flag it loads the workflow the URL names, shows it read-only, and hands back to
+ * the operator canvas. The title bar's rename/save, the read-only preview, the inputs, running
+ * and results are added on top by later PRs. A view, not a new object: it opens the same
+ * workflow the canvas does.
+ */
+@UntilDestroy()
+@Component({
+  selector: "texera-workflow-form",
+  templateUrl: "./workflow-form.component.html",
+  styleUrls: ["./workflow-form.component.scss"],
+  imports: [CommonModule, NzAvatarModule, UserIconComponent, CoeditorUserIconComponent],
+})
+export class WorkflowFormComponent implements OnInit, OnDestroy {
+  public wid?: number;
+  public workflowName = "";
+  public loading = true;
+
+  constructor(
+    // Public for the template: shows the same live collaborator avatars as the canvas.
+    public coeditorPresenceService: CoeditorPresenceService,
+    private route: ActivatedRoute,
+    private router: Router,
+    private workflowActionService: WorkflowActionService,
+    private workflowPersistService: WorkflowPersistService,
+    private operatorMetadataService: OperatorMetadataService,
+    private executeWorkflowService: ExecuteWorkflowService,
+    private workflowResultService: WorkflowResultService,
+    private notificationService: NotificationService,
+    private userService: UserService,
+    private cdr: ChangeDetectorRef,
+    private computingUnitStatusService: ComputingUnitStatusService,
+    private workflowConsoleService: WorkflowConsoleService,
+    private config: GuiConfigService
+  ) {}
+
+  ngOnInit(): void {
+    const wid = Number(this.route.snapshot.params.id);
+    if (!Number.isFinite(wid)) {
+      void this.router.navigate([USER_WORKFLOW]);
+      return;
+    }
+    this.wid = wid;
+    this.load(wid);
+  }
+
+  private load(wid: number): void {
+    this.workflowActionService.resetAsNewWorkflow();
+    forkJoin({
+      metadata: this.operatorMetadataService.getOperatorMetadata(),
+      workflow: this.workflowPersistService.retrieveWorkflow(wid),
+    })
+      .pipe(untilDestroyed(this))
+      .subscribe({
+        next: ({ workflow }) => {
+          // The form is only offered where the feature flag is on and this workflow opens
+          // in it. Reaching this URL any other way lands on the operator canvas, not an
+          // empty page.
+          if (!this.config.env.formViewEnabled || workflow.defaultView !== DefaultView.FORM) {
+            void this.router.navigate([USER_WORKSPACE, String(wid)], { replaceUrl: true });
+            return;
+          }
+          this.workflowName = workflow.name;
+          this.workflowActionService.setNewSharedModel(wid, this.userService.getCurrentUser());
+          this.workflowActionService.reloadWorkflow(workflow);
+          // The workflow is shown, not edited, from here: dragging operators around or
+          // deleting them belongs to the operator canvas.
+          this.applyEditability();
+          this.loading = false;
+          this.cdr.detectChanges();
+        },
+        error: () => {
+          this.notificationService.error("You do not have access to this workflow.");
+          void this.router.navigate([USER_WORKFLOW]);
+        },

Review Comment:
   This handler also receives failures from `getOperatorMetadata()` and generic network/server failures, so it can incorrectly tell users they lack workflow access. Use a neutral “Unable to open this workflow” message, or distinguish the workflow authorization response from other failures.



-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(workflow-form): Form View page shell, load, and the shared spec harness [texera]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8376:
URL: https://github.com/apache/texera/pull/8376#issuecomment-5520689324

   <!-- texera-reviewer-suggestion -->
   ### Automated Reviewer Suggestions
   
   Based on the `git blame` history of the changed files, we recommend the following reviewers:
   
   - **Contributors with relevant context:** `@kz930`, `@ELin2025`, `@GspikeHalo`
     You can notify them by mentioning `@kz930`, `@ELin2025`, `@GspikeHalo` in a comment.
   


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(workflow-form): Form View page shell, load, and the shared spec harness [texera]

Posted by "yangzhang75 (via GitHub)" <gi...@apache.org>.
yangzhang75 commented on PR #8376:
URL: https://github.com/apache/texera/pull/8376#issuecomment-5533130218

   /request-review @mengw15


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(workflow-form): Form View page shell, load, and the shared spec harness [texera]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #8376:
URL: https://github.com/apache/texera/pull/8376#issuecomment-5520758624

   ## [Codecov](https://app.codecov.io/gh/apache/texera/pull/8376?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `86.34361%` with `31 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 94.05%. Comparing base ([`4ff0b8b`](https://app.codecov.io/gh/apache/texera/commit/4ff0b8b4ac415c4d60bfd73f37da5e3039ade2ec?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`a01d9d8`](https://app.codecov.io/gh/apache/texera/commit/a01d9d8c296660ce79c4ad76131b38d64fa60c00?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 2 commits behind head on main.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/texera/pull/8376?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...mponent/workflow-form/workflow-form.component.html](https://app.codecov.io/gh/apache/texera/pull/8376?src=pr&el=tree&filepath=frontend%2Fsrc%2Fapp%2Fworkspace%2Fcomponent%2Fworkflow-form%2Fworkflow-form.component.html&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZnJvbnRlbmQvc3JjL2FwcC93b3Jrc3BhY2UvY29tcG9uZW50L3dvcmtmbG93LWZvcm0vd29ya2Zsb3ctZm9ybS5jb21wb25lbnQuaHRtbA==) | 0.00% | [25 Missing :warning: ](https://app.codecov.io/gh/apache/texera/pull/8376?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...onent/property-editor/property-editor.component.ts](https://app.codecov.io/gh/apache/texera/pull/8376?src=pr&el=tree&filepath=frontend%2Fsrc%2Fapp%2Fworkspace%2Fcomponent%2Fproperty-editor%2Fproperty-editor.component.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZnJvbnRlbmQvc3JjL2FwcC93b3Jrc3BhY2UvY29tcG9uZW50L3Byb3BlcnR5LWVkaXRvci9wcm9wZXJ0eS1lZGl0b3IuY29tcG9uZW50LnRz) | 95.71% | [0 Missing and 3 partials :warning: ](https://app.codecov.io/gh/apache/texera/pull/8376?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...it-frame/operator-property-edit-frame.component.ts](https://app.codecov.io/gh/apache/texera/pull/8376?src=pr&el=tree&filepath=frontend%2Fsrc%2Fapp%2Fworkspace%2Fcomponent%2Fproperty-editor%2Foperator-property-edit-frame%2Foperator-property-edit-frame.component.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZnJvbnRlbmQvc3JjL2FwcC93b3Jrc3BhY2UvY29tcG9uZW50L3Byb3BlcnR5LWVkaXRvci9vcGVyYXRvci1wcm9wZXJ0eS1lZGl0LWZyYW1lL29wZXJhdG9yLXByb3BlcnR5LWVkaXQtZnJhbWUuY29tcG9uZW50LnRz) | 90.90% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/texera/pull/8376?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...ent/property-editor/property-editor.component.html](https://app.codecov.io/gh/apache/texera/pull/8376?src=pr&el=tree&filepath=frontend%2Fsrc%2Fapp%2Fworkspace%2Fcomponent%2Fproperty-editor%2Fproperty-editor.component.html&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZnJvbnRlbmQvc3JjL2FwcC93b3Jrc3BhY2UvY29tcG9uZW50L3Byb3BlcnR5LWVkaXRvci9wcm9wZXJ0eS1lZGl0b3IuY29tcG9uZW50Lmh0bWw=) | 83.33% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/texera/pull/8376?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...component/workflow-form/workflow-form.component.ts](https://app.codecov.io/gh/apache/texera/pull/8376?src=pr&el=tree&filepath=frontend%2Fsrc%2Fapp%2Fworkspace%2Fcomponent%2Fworkflow-form%2Fworkflow-form.component.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZnJvbnRlbmQvc3JjL2FwcC93b3Jrc3BhY2UvY29tcG9uZW50L3dvcmtmbG93LWZvcm0vd29ya2Zsb3ctZm9ybS5jb21wb25lbnQudHM=) | 98.21% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/texera/pull/8376?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##               main    #8376      +/-   ##
   ============================================
   - Coverage     94.11%   94.05%   -0.06%     
     Complexity     4771     4771              
   ============================================
     Files          1193     1202       +9     
     Lines         48598    48883     +285     
     Branches       5894     5932      +38     
   ============================================
   + Hits          45737    45978     +241     
   - Misses         1415     1451      +36     
   - Partials       1446     1454       +8     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/texera/pull/8376/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | *Carryforward flag |
   |---|---|---|---|
   | [access-control-service](https://app.codecov.io/gh/apache/texera/pull/8376/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `81.00% <ø> (ø)` | | Carriedforward from [a96555d](https://app.codecov.io/gh/apache/texera/commit/a96555db9514fc8c2ab629270937c644d6288ea8?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [agent-service](https://app.codecov.io/gh/apache/texera/pull/8376/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `99.32% <ø> (ø)` | | Carriedforward from [a96555d](https://app.codecov.io/gh/apache/texera/commit/a96555db9514fc8c2ab629270937c644d6288ea8?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [amber](https://app.codecov.io/gh/apache/texera/pull/8376/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `90.01% <ø> (ø)` | | Carriedforward from [a96555d](https://app.codecov.io/gh/apache/texera/commit/a96555db9514fc8c2ab629270937c644d6288ea8?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [computing-unit-managing-service](https://app.codecov.io/gh/apache/texera/pull/8376/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `73.67% <ø> (ø)` | | Carriedforward from [a96555d](https://app.codecov.io/gh/apache/texera/commit/a96555db9514fc8c2ab629270937c644d6288ea8?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [config-service](https://app.codecov.io/gh/apache/texera/pull/8376/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `87.00% <ø> (ø)` | | Carriedforward from [a96555d](https://app.codecov.io/gh/apache/texera/commit/a96555db9514fc8c2ab629270937c644d6288ea8?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [file-service](https://app.codecov.io/gh/apache/texera/pull/8376/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `87.91% <ø> (ø)` | | Carriedforward from [a96555d](https://app.codecov.io/gh/apache/texera/commit/a96555db9514fc8c2ab629270937c644d6288ea8?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [frontend](https://app.codecov.io/gh/apache/texera/pull/8376/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `96.71% <86.34%> (-0.17%)` | :arrow_down: | |
   | [notebook-migration-service](https://app.codecov.io/gh/apache/texera/pull/8376/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `79.31% <ø> (ø)` | | Carriedforward from [a96555d](https://app.codecov.io/gh/apache/texera/commit/a96555db9514fc8c2ab629270937c644d6288ea8?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [pyamber](https://app.codecov.io/gh/apache/texera/pull/8376/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `98.47% <ø> (ø)` | | Carriedforward from [a96555d](https://app.codecov.io/gh/apache/texera/commit/a96555db9514fc8c2ab629270937c644d6288ea8?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [workflow-compiling-service](https://app.codecov.io/gh/apache/texera/pull/8376/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `77.19% <ø> (ø)` | | Carriedforward from [a96555d](https://app.codecov.io/gh/apache/texera/commit/a96555db9514fc8c2ab629270937c644d6288ea8?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   *This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/texera/pull/8376?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org