Skip to content

feat(gui): open a step to inspect its settings read-only on the Form View - #8442

Draft
yangzhang75 wants to merge 3 commits into
apache:mainfrom
yangzhang75:formview-pr14
Draft

feat(gui): open a step to inspect its settings read-only on the Form View#8442
yangzhang75 wants to merge 3 commits into
apache:mainfrom
yangzhang75:formview-pr14

Conversation

@yangzhang75

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Closes #8025. Part of the Form View stack (parent issue #8011), stacked on #8441 (PR13).

Lets a reader open a step on the embedded workflow preview to inspect its settings, read-only.

  • Clicking a step on the read-only canvas highlights it and opens the operator's own property panel; clicking empty canvas dismisses it. Selection reuses the canvas highlight stream rather than teaching the editor a second click mode.
  • The panel is truly read-only: it carries the inert attribute (which blocks pointer AND keyboard AND focus, unlike pointer-events:none), and the graph is modification-disabled. The panel itself stays the scroll container so a long panel is still readable.
  • The property panel is mounted with [hidden], not *ngIf: it shows its operator by REACTING to the highlight stream (no initial pull), so it must already be subscribed when the click fires. Mounting it on selection subscribes too late and opens empty.
  • The Form View stays silent on the shared co-editor channel (updateSharedModelAwareness("currentlyEditing", undefined)), so inspecting a step from the form never shows this session as editing a graph on the other view.
  • Adds a persistPlacement input to the property editor (default true, canvas unchanged). The Form View mounts it with persistPlacement=false, so its ngOnInit skips the #right-container docked-panel restore that only exists in the canvas layout and would otherwise throw.

Turning the panel live to choose what to expose is the authoring PR (#8026).

Any related issues, documentation, discussions?

Closes #8025. Part of the Form View feature (parent issue #8011).

How was this PR tested?

Unit tests (vitest). Direct-construction tests cover the selection/dismiss logic (open on single highlight, clear on empty-canvas unhighlight, silence on the co-editor channel, close button). A TestBed rendered test covers the panel markup with the property editor stubbed (it is a heavy child with its own spec; the stub carries only the two bound inputs). The property-editor spec covers the new persistPlacement guard: ngOnInit does not read #right-container and ngOnDestroy does not persist geometry when persistPlacement=false. 100% statement and function coverage on the changed source. ng test, ng build gui (AOT), eslint and prettier all pass.

Screenshot

A step opened read-only on the Form View: the property panel showing the operator's settings, inert.

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.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FVvP3ttj22f9LB4p9u2anY

@github-actions github-actions Bot added the frontend Changes related to the frontend GUI label Sep 6, 2026
@github-actions

github-actions Bot commented Sep 6, 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: @aglinxinyuan
    You can notify them by mentioning @aglinxinyuan in a comment.

@codecov-commenter

codecov-commenter commented Sep 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.71053% with 86 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.78%. Comparing base (d0ab10d) to head (387bf0e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...mponent/workflow-form/workflow-form.component.html 0.00% 80 Missing ⚠️
...ponent/workflow-form/workflow-form.spec-harness.ts 90.69% 3 Missing and 1 partial ⚠️
...onent/property-editor/property-editor.component.ts 90.90% 0 Missing and 1 partial ⚠️
...component/workflow-form/workflow-form.component.ts 99.37% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8442      +/-   ##
============================================
- Coverage     94.04%   93.78%   -0.27%     
  Complexity     4822     4822              
============================================
  Files          1208     1208              
  Lines         49383    49675     +292     
  Branches       6019     6068      +49     
============================================
+ Hits          46441    46586     +145     
- Misses         1463     1607     +144     
- Partials       1479     1482       +3     
Flag Coverage Δ *Carryforward flag
access-control-service 81.00% <ø> (ø) Carriedforward from d0ab10d
agent-service 99.32% <ø> (ø) Carriedforward from d0ab10d
amber 89.92% <ø> (ø) Carriedforward from d0ab10d
computing-unit-managing-service 73.67% <ø> (ø) Carriedforward from d0ab10d
config-service 87.12% <ø> (ø) Carriedforward from d0ab10d
file-service 87.91% <ø> (ø) Carriedforward from d0ab10d
frontend 96.14% <71.71%> (-0.62%) ⬇️
notebook-migration-service 83.57% <ø> (ø) Carriedforward from d0ab10d
pyamber 98.47% <ø> (ø) Carriedforward from d0ab10d
workflow-compiling-service 77.19% <ø> (ø) Carriedforward from d0ab10d

*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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Inspection can still mutate shared state and publish editing presence, while selection and result visibility can become stale.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds read-only operator inspection to Form View, alongside stacked Form View functionality.

Changes:

  • Adds an inert property panel driven by canvas selection.
  • Adds nested fields, instructions, execution controls, and results.
  • Expands Vitest coverage and test harnesses.
File summaries
File Description
workflow-result.service.ts Detects non-empty results.
workflow-result.service.spec.ts Tests result detection.
workflow-form.spec-harness.ts Expands Form View mocks.
workflow-form.rendered.spec.ts Tests rendered UI.
workflow-form.component.ts Implements inspection and stacked Form View behavior.
workflow-form.component.spec.ts Tests component behavior.
workflow-form.component.scss Styles new Form View sections.
workflow-form.component.html Renders controls, results, and inspection panel.
sub-fields.spec.ts Tests nested-field utilities.
property-editor.component.ts Makes placement persistence configurable.
property-editor.component.spec.ts Tests placement opt-out.
Review details
  • Files reviewed: 11/11 changed files
  • Comments generated: 4
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread frontend/src/app/workspace/component/workflow-form/workflow-form.component.ts Outdated
Comment thread frontend/src/app/workspace/component/workflow-form/workflow-form.component.ts Outdated
@yangzhang75
yangzhang75 force-pushed the formview-pr14 branch 2 times, most recently from 243f796 to 8b644bf Compare September 7, 2026 01:25
yangzhang75 and others added 3 commits September 7, 2026 02:10
…instruction

Add the Run button whose label, icon and disabled state mirror the operator
canvas (Invalid / Empty / Connecting / Connect / Run / Stop, in the same
precedence), the computing-unit selector, a run clock counted off the engine's
own duration event, and a plain-language failure message that collapses opaque
SQL/Java traces to one sentence and blames empty required inputs when that is
the cause. Running is the same execution call the canvas makes.

Show the author's instruction above the inputs as a collapsible, read-only
markdown card, only when there is instruction text. Editing it is part of the
authoring PR; showing the results follows in the next PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FVvP3ttj22f9LB4p9u2anY
Render each chosen, currently-viewed step's output under the workflow that produced
it -- a table, a visualization, or a compact "no result yet" -- with a per-result
zoom and visualizations fitted to their cards after a run. The chosen set is a pure
display filter that follows the canvas's view-result set (getOperatorsToViewResult)
and never writes it, per the settled result-panel design. Add
WorkflowResultService.hasNonEmptyResult so a view-result step that produced zero
tuples (e.g. a download/publish UDF) reads as "no result" rather than an empty card.
Opening a step to inspect it, and the authoring mode that picks what to show, follow
in later PRs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FVvP3ttj22f9LB4p9u2anY
…View

Clicking a step on the embedded preview opens its property panel read-only: the
panel carries the inert attribute, which blocks pointer AND keyboard AND focus
(the graph is modification-disabled too), and it stays the scroll container so a
long panel is still readable. Clicking empty canvas dismisses it, and the form
stays silent on the shared co-editor channel so it never shows as editing a step.
Turning the panel live to choose what to expose is the authoring PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FVvP3ttj22f9LB4p9u2anY
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.

feat(workflow-form): open a step to inspect its settings read-only

3 participants