Skip to content

feat(workflow-form): Form View title bar, save, and modification lock - #8391

Draft
yangzhang75 wants to merge 2 commits into
apache:mainfrom
yangzhang75:formview-pr7
Draft

feat(workflow-form): Form View title bar, save, and modification lock#8391
yangzhang75 wants to merge 2 commits into
apache:mainfrom
yangzhang75:formview-pr7

Conversation

@yangzhang75

@yangzhang75 yangzhang75 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Building on the Form View page shell (#8376), this PR adds the title bar and the save it needs (parent issue #8011). Frontend only.

  • The workflow name, renamable inline exactly as on the operator canvas, with the same "Saved at ..." state beside it. Both follow the workflow's metadata live through the same workflowMetaDataChanged subscription the canvas uses, so a rename or save (this page's own, or a co-editor's) refreshes the name, its width, and the saved-at state from one place, and the two views never drift apart.
  • The debounced save both views share, so an edit in one view is not lost in the other. It saves only the workflow this page opened (never spawning a stray "Untitled workflow" from a payload with no id), preserves a position for every operator (a partial map makes a workflow unopenable), saves once more on the way out and before handing back to the canvas, and reports a failed save rather than losing it silently.
  • Locks the workflow to read-only on this page (disableWorkflowModification): the graph and its properties are shown, not edited. A later PR's authoring mode makes them editable with write access.

The read-only preview, the inputs, running and results are added by later PRs.

Screenshot

The title bar (renamable name, "Saved at ..." state, the Canvas / Form View switch) on the read-only page:
Screenshot 2026-09-03 at 11 18 10 PM

Any related issues, documentation, discussions?

Part of the Form View feature (parent issue #8011); stacked on #8376 (the page shell). Until #8376 merges, this PR's diff includes that PR's commit as well.

How was this PR tested?

Unit tests (vitest): workflow-form.component.spec.ts (21 tests). As with the shell, the component injects heavy services and 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.

…harness

The read-only shell of the Form View page: behind the feature flag it loads the
workflow the URL names, redirects to the operator canvas when the workflow does
not open in the form (or the flag is off), shows it read-only, hands back to the
canvas, and releases the shared singleton services on the way out. The title bar's
rename/save, the read-only preview, the inputs, running and results are added on
top by later PRs.

Also adds the shared spec harness (workflow-form.spec-harness.ts) these specs build
the component from; later slices extend it with the mocks they introduce.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions github-actions Bot added the frontend Changes related to the frontend GUI label Sep 4, 2026
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @Neilk1021
    You can notify them by mentioning @Neilk1021 in a comment.

@codecov-commenter

codecov-commenter commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.97%. Comparing base (1facefb) to head (418e104).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...mponent/workflow-form/workflow-form.component.html 0.00% 28 Missing ⚠️
...component/workflow-form/workflow-form.component.ts 96.22% 0 Missing and 4 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8391      +/-   ##
============================================
- Coverage     94.02%   93.97%   -0.06%     
  Complexity     4819     4819              
============================================
  Files          1202     1207       +5     
  Lines         48925    49151     +226     
  Branches       5942     5969      +27     
============================================
+ Hits          46002    46188     +186     
- Misses         1459     1489      +30     
- Partials       1464     1474      +10     
Flag Coverage Δ *Carryforward flag
access-control-service 81.00% <ø> (ø) Carriedforward from a3ed02c
agent-service 99.32% <ø> (ø) Carriedforward from a3ed02c
amber 89.90% <ø> (ø) Carriedforward from a3ed02c
computing-unit-managing-service 73.67% <ø> (ø) Carriedforward from a3ed02c
config-service 87.12% <ø> (ø) Carriedforward from a3ed02c
file-service 87.91% <ø> (ø) Carriedforward from a3ed02c
frontend 96.66% <80.00%> (-0.16%) ⬇️
notebook-migration-service 83.57% <ø> (ø) Carriedforward from a3ed02c
pyamber 98.41% <ø> (ø) Carriedforward from a3ed02c
workflow-compiling-service 77.19% <ø> (ø) Carriedforward from a3ed02c

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

On top of the page shell: the title bar's workflow name (renamable in place,
exactly as on the operator canvas), its 'Saved at ...' state, and the debounced
save both views share -- so an edit made in the form is not lost on the canvas,
and vice versa. A save fills in a position for every operator and reports a
failure rather than losing it silently. The read-only preview, inputs, running
and results are added by later PRs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants