Skip to content

feat(apollo-wind): align modal takeover and run actions - #1116

Open
dbacomputer wants to merge 10 commits into
mainfrom
codex/modal-updates
Open

feat(apollo-wind): align modal takeover and run actions#1116
dbacomputer wants to merge 10 commits into
mainfrom
codex/modal-updates

Conversation

@dbacomputer

@dbacomputer dbacomputer commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR aligns Modal and takeover examples with the Flow visual language, consolidates takeover behavior on the Apollo Wind core Modal, and standardizes execution actions as Run.

Apollo Wind — additions and adjustments

  • Rename the Storybook component category to Modal and explain that it is implemented with the shadcn/ui Dialog component and naming conventions, while Apollo’s internal name is Modal.
  • Add takeover support to the core Modal with sidebar and no-sidebar examples, centered layout, Flow semantic surfaces, theme-aware curtain overlay, expand/collapse controls, and consistent radius behavior.
  • Add public Modal* aliases for the existing Dialog primitives.
  • Update the Sticky Footer example so its header, body, footer, borders, background surfaces, and corner radius demonstrate the same Flow styling used by Modal.
  • Add focused takeover tests for title handling, sidebar rendering, expansion, and backdrop-dismiss behavior.

Apollo React — removals and adjustments

  • Remove the obsolete CanvasTakeoverModal Storybook page.
  • Migrate Flow Standalone takeover examples to use Apollo Wind Modal and ModalContent variant="takeover" directly.
  • Retain the exported CanvasTakeoverModal component temporarily as a deprecated compatibility wrapper. This means existing consumers can keep importing the old component name while its implementation delegates to the new Apollo Wind Modal; it can be removed in a future breaking release after consumers migrate.
  • Update execution action labels from Debug, Run debug, and Run test to Run, including the Play icon where the action is presented as a button. Debug mode and debug-result panel terminology remain unchanged.

Storybook and layout patterns

  • Update Node Property Panel, Canvas toolbar, bottom-panel action, layout-pattern, and Flow examples to use consistent Run labels and icon treatment.
  • Fix the UX inventory draggable list markup and make its Move down boundary depend on the current list length.

Verification

  • Apollo Wind Dialog tests: 15 passed.
  • CanvasTakeoverModal compatibility tests: 5 passed.
  • Biome checks pass for changed files.
  • git diff --check passes.
  • Local Storybook preview: http://localhost:6007/

Copilot AI lite review requested due to automatic review settings September 3, 2026 00:22
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Apollo Coded App preview deployments are ready.

Project Status Preview Updated (PT)
apollo-design Ready Preview · Logs Sep 02, 2026, 10:01:20 PM
apollo-docs Ready Preview · Logs Sep 02, 2026, 10:01:20 PM
apollo-landing Ready Preview · Logs Sep 02, 2026, 10:01:20 PM
apollo-vertex Ready Preview · Logs Sep 02, 2026, 10:01:20 PM

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Dependency License Review

  • 1951 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1722
ISC 88
Apache-2.0 55
BSD-3-Clause 27
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 4
MIT-0 3
CC0-1.0 3
MIT OR Apache-2.0 2
(MIT OR Apache-2.0) 2
Unlicense 2
LGPL-3.0-or-later 1
Python-2.0 1
CC-BY-4.0 1
(MPL-2.0 OR Apache-2.0) 1
Unknown 1
Artistic-2.0 1
(WTFPL OR MIT) 1
(BSD-2-Clause OR MIT OR Apache-2.0) 1
CC-BY-3.0 1
0BSD 1
(MIT OR CC0-1.0) 1
MIT AND ISC 1
Excluded packages
Package Version License Reason
@img/sharp-libvips-linux-x64 1.3.2 LGPL-3.0-or-later LGPL pre-built binary, not linked
khroma 2.1.0 Unknown MIT per GitHub repo, missing license field in package.json

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

There are API/test coverage gaps in the new DialogContent takeover API and an accessibility/behavior issue in the deprecated CanvasTakeoverModal wrapper’s focus/backdrop-close handling that should be resolved before approval.

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

Pull request overview

This PR updates the Modal/Dialog surface across Apollo Wind and Apollo React to match the Flow visual language, adds takeover-style modal behavior to the core Dialog implementation (with public Modal* aliases), and updates Storybook/pattern examples to use the new naming and “Run” labeling consistently.

Changes:

  • Added takeover modal support to apollo-wind’s DialogContent (header, expand/collapse, optional sidebar, overlay controls) and exported Modal* aliases.
  • Updated apollo-react canvas stories/templates to use the Apollo Wind takeover modal instead of the legacy CanvasTakeoverModal page, and aligned action labels to “Run”.
  • Expanded Storybook layout patterns with a UX inventory panel and Monaco-based code sample + theme switching.
File summaries
File Description
packages/apollo-wind/src/index.ts Re-exports new Modal* aliases from the dialog module.
packages/apollo-wind/src/components/ui/dialog.tsx Implements takeover variant + adds Modal* aliases alongside existing Dialog* exports.
packages/apollo-wind/src/components/ui/dialog.stories.tsx Renames Storybook category to “Modal”, updates docs copy, adds takeover examples, and aligns sticky-footer styling.
packages/apollo-react/src/canvas/stories/templates/Flow.stories.tsx Migrates takeover usages from CanvasTakeoverModal to Modal/ModalContent and updates “Run” labeling.
packages/apollo-react/src/canvas/components/NodePropertyPanel/NodePropertyPanel.stories.tsx Removes debug button usage in favor of run button across examples.
packages/apollo-react/src/canvas/components/CanvasTakeoverModal/CanvasTakeoverModal.tsx Keeps CanvasTakeoverModal as a deprecated compatibility wrapper backed by Apollo Wind ModalContent variant="takeover".
packages/apollo-react/src/canvas/components/CanvasTakeoverModal/CanvasTakeoverModal.stories.tsx Removes the obsolete CanvasTakeoverModal Storybook page.
packages/apollo-react/src/canvas/components/CanvasModeToolbar/CanvasModeToolbar.stories.tsx Updates toolbar labels from “Run debug/Stop debug” to “Run/Stop”.
packages/apollo-react/src/canvas/components/CanvasBottomPanel/CanvasBottomPanel.stories.tsx Updates bottom panel action label to “Run”.
apps/storybook/src/patterns/LayoutPatterns.stories.tsx Adds UX inventory patterns (including Monaco sample + theme-based styling) and updates “Run” labeling in patterns.
Review details
  • Files reviewed: 10/10 changed files
  • Comments generated: 5
  • Review effort level: Lite

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

Comment thread packages/apollo-wind/src/components/ui/dialog.tsx
Comment thread packages/apollo-wind/src/components/ui/dialog.tsx
Copilot AI review requested due to automatic review settings September 3, 2026 00:33
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage + size by package

Per-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.

Package Coverage New-line coverage Packed (gzip) Unpacked vs main
@uipath/apollo-core 75.0% 42.01 MB 50.12 MB ±0
@uipath/apollo-react 39.7% 40.0% (2/5) 7.56 MB 29.10 MB −1.7 KB
@uipath/apollo-ui-icons 2.85 MB 6.91 MB ±0
@uipath/apollo-wind 65.1% 90.5% (19/21) 432.9 KB 2.78 MB +2.5 KB
@uipath/ap-chat 85.8% 43.88 MB 56.51 MB ±0

"Coverage" is each package's own coverage.include scope (e.g. apollo-core instruments only scripts/). "Packed"/"Unpacked" come from npm pack --dry-run and only cover built packages — "—" means not measured this run (package not affected / not built). "vs main" is the packed (gzipped) delta against the last successful main build (the package-sizes artifact from the Release workflow); "—" there means no main baseline was available this run. The baseline is main's latest build, not this PR's exact merge-base, so it includes any drift since the branch diverged. Packages with no vitest config are omitted.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The updated Storybook layout pattern introduces invalid HTML (<li> outside a list) and a hard-coded list-boundary condition that should be corrected before approval.

Review details

Suppressed comments (2)

Previously missed (2) — in code that hasn't changed since the last review.

apps/storybook/src/patterns/LayoutPatterns.stories.tsx:1348

  • <li> elements must be children of a <ul>/<ol>/<menu>. Here they are rendered directly inside a <div>, which produces invalid HTML and can confuse assistive tech. Use a non-list element (e.g. <div>) for the draggable rows, or wrap the collection in a <ul>.
    apps/storybook/src/patterns/LayoutPatterns.stories.tsx:1404
  • The "Move down" control is only disabled when index === 2, which breaks as soon as items are removed (or if the list length changes). Disable based on the current list length so the last item can’t offer a "move down" action.
  • Files reviewed: 12/12 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings September 3, 2026 00:41
@dbacomputer

Copy link
Copy Markdown
Collaborator Author

Follow-up cleanup completed in 9db98deb:

  • Replaced the standalone draggable <li> elements with a valid <ul>/<li> structure for accessibility.
  • Made the “Move down” disabled state derive from compositionFields.length - 1 instead of a hard-coded index.
  • Biome and diff checks pass.

The five prior review threads remain resolved.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

There are a few concrete API/docs consistency issues in changed code (including a takeover DialogContent portal/container behavior inconsistency) that should be addressed before approval.

Review details

Suppressed comments (3)

Previously missed (3) — in code that hasn't changed since the last review.

packages/apollo-wind/src/components/ui/dialog.tsx:192

  • DialogContent computes resolvedContainer from the container prop, but the takeover variant returns content directly and never uses the portal container. This makes container a no-op for variant="takeover", which is surprising for consumers expecting consistent portal behavior.
    apps/storybook/src/patterns/LayoutPatterns.stories.tsx:1472
  • This example expression value uses "${vars.invoiceNumber}", but the rest of the file (and other examples) use the "$vars.*" syntax. Using a different syntax here makes the sample inconsistent and potentially misleading.
    packages/apollo-react/src/canvas/components/CanvasModeToolbar/CanvasModeToolbar.stories.tsx:66
  • The toolbar button label was updated to "Run", but the click handler still logs "run debug". This makes the story output inconsistent with the new labeling.
  • Files reviewed: 12/12 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings September 3, 2026 00:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

It introduces broad, cross-package modal behavior/API updates plus large Storybook pattern additions, and should get final human review despite tests passing.

Review details

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

packages/apollo-react/src/canvas/components/CanvasTakeoverModal/CanvasTakeoverModal.tsx:63

  • data-expanded is passed to ModalContent, but DialogContent ignores any provided data-expanded when variant="takeover" (it always sets data-expanded from its internal expanded state). This prop is therefore dead code here and can mislead readers into thinking it affects styling/behavior.
  • Files reviewed: 12/12 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings September 3, 2026 01:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

There are verified accessibility and build-stability issues in changed files that should be addressed before merging.

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

Review details

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

packages/apollo-wind/src/components/ui/dialog.tsx:136

  • In the takeover variant, the header always renders a DialogPrimitive.Title, even when headerTitle is undefined/null. That creates an empty title node which Radix will still use for aria-labelledby, preventing consumers from supplying an accessible name via aria-label and resulting in an unnamed dialog for screen readers. Render the title only when headerTitle is provided (and keep layout alignment with a flex filler).
  • Files reviewed: 12/12 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread apps/storybook/src/patterns/LayoutPatterns.stories.tsx Outdated
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Storybook visual diff

⚠️ Visual changes detected: 16 changed, 11 added, 9 removed (of 584 compared, 548 unchanged). View report

Baseline is the deployed main Storybook, so changes merged to main after this branch was last updated can also appear here. Logs

Updated (PT): Sep 02, 2026, 10:28:10 PM

Copilot AI review requested due to automatic review settings September 3, 2026 04:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new takeover modal implementation has verified issues around onPointerDownOutside handler composition and aria-labelledby="" behavior that can break close behavior and accessible naming.

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

Review details
  • Files reviewed: 12/12 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment thread packages/apollo-wind/src/components/ui/dialog.tsx
Comment thread packages/apollo-wind/src/components/ui/dialog.tsx Outdated
Copilot AI review requested due to automatic review settings September 3, 2026 04:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The takeover dialog portal/container handling and the empty-string aria-labelledby behavior introduce correctness/accessibility issues that should be corrected before approval.

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

Review details

Suppressed comments (2)

Previously missed (1) — in code that hasn't changed since the last review.

packages/apollo-wind/src/components/ui/dialog.test.tsx:290

  • If DialogContent removes aria-labelledby for takeovers that rely on aria-label, the test should assert the attribute is absent (rather than present with an empty string), while still validating the accessible name via getByRole(..., { name }).

packages/apollo-wind/src/components/ui/dialog.tsx:136

  • Setting aria-labelledby to an empty string produces an invalid ARIA attribute value (it must reference one or more element IDs). If the goal is to override Radix’s default labelling so aria-label can be used for takeovers without a header title, prefer explicitly passing undefined to remove the attribute.
        {...(isTakeover && (headerTitle === undefined || headerTitle === null)
          ? { 'aria-labelledby': ariaLabelledBy }
          : ariaLabelledBy
            ? { 'aria-labelledby': ariaLabelledBy }
            : {})}
  • Files reviewed: 12/12 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread packages/apollo-wind/src/components/ui/dialog.tsx Outdated
Copilot AI review requested due to automatic review settings September 3, 2026 04:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The changes appear consistent with the PR goals and include targeted tests, with only a minor Storybook sample-data nit noted in review comments.

Review details
  • Files reviewed: 12/12 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings September 3, 2026 04:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The core behavior changes are covered by targeted tests and the remaining updates are Storybook/example alignment changes with no confirmed issues found in the reviewed diffs.

Review details
  • Files reviewed: 12/12 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants