Skip to content

feat(apollo-react): the natural-language sentence view of a decision table [ECS-2138] [ECS-2164] - #1543

Merged
pateljay43 merged 2 commits into
mainfrom
jay/apollo-decision-table-nl
Nov 13, 2026
Merged

pateljay43 merged 2 commits into
mainfrom
jay/apollo-decision-table-nl

Conversation

@pateljay43

@pateljay43 pateljay43 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Adds DecisionText, a read-only view that shows each rule of a decision table as a sentence card: the outputs on top, then the conditions. It sits next to DecisionTable, uses the same TableMarks and windowing, and reports the hovered value cell so a host can highlight it in the grid. Marks paint the cards as the grid's rule card does, a condition line shows its run verdict as a check or cross that screen readers read out, and an optional add-rule action follows the rules and fills the empty state. All copy comes in through labels, as with the grid. ECS-2138

Studio Web will host it with the sentences from @uipath/dmn-editor-utils/sentences (UiPath/PO.Frontend#8098); the story data is that package's real output for the grid story's table. Selection, keyboard and editing follow in later PRs.

decision-text-anatomy

Copilot AI balanced review requested due to automatic review settings November 6, 2026 15:01
@github-actions
github-actions Bot temporarily deployed to preview/apollo-landing November 6, 2026 15:01 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-docs November 6, 2026 15:01 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-vertex November 6, 2026 15:01 Destroyed
@github-actions github-actions Bot added the size:XXL 1,000+ changed lines. label Nov 6, 2026
@github-actions
github-actions Bot temporarily deployed to preview/apollo-design November 6, 2026 15:01 Destroyed
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Dependency License Review

  • ✅ 1958 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1722
ISC 91
Apache-2.0 57
BSD-3-Clause 28
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 4
CC0-1.0 4
MIT-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.4 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

Index-keyed tokens can leave the wrong cell highlighted when columns are replaced or reordered because the hovered span’s current cell identity is not revalidated after rendering.

1 open issue
What changed in this PR

Adds DecisionTableSentences, a read-only natural-language companion to the decision-table grid, using shared marks and virtualization.

Changes:

  • Renders outputs before conditions, with localized labels, column bands, and an optional empty-state action.
  • Reports hovered value cells so hosts can highlight corresponding grid cells.
  • Adds sentence helpers, unit tests, fixtures, and Storybook examples for standard and large tables.
File Description
packages/​apollo-react/​src/​decision-table/​sentenceTypes.ts Defines sentence data and label contracts.
packages/​apollo-react/​src/​decision-table/​sentenceStyles.ts Adds Tailwind styles for sentence layouts and marks.
packages/​apollo-react/​src/​decision-table/​sentenceRowHeights.ts Calculates row heights and virtualization offsets.
packages/​apollo-react/​src/​decision-table/​sentenceRowHeights.test.ts Tests height and offset calculations.
packages/​apollo-react/​src/​decision-table/​SentenceRowCard.tsx Renders row sentences, tokens, and mark announcements.
packages/​apollo-react/​src/​decision-table/​sentenceParts.ts Formats tokens and bounds long value lists.
packages/​apollo-react/​src/​decision-table/​sentenceParts.test.ts Tests value-list limits and empty-value formatting.
packages/​apollo-react/​src/​decision-table/​sentenceMarks.ts Collects line marks and selects glyph severity.
packages/​apollo-react/​src/​decision-table/​index.ts Exports the sentence component and public types.
packages/​apollo-react/​src/​decision-table/​DecisionTableSentences.tsx Implements the virtualized view and hover reporting.
packages/​apollo-react/​src/​decision-table/​DecisionTableSentences.test.tsx Tests rendering, accessibility, marks, hover, and scaling.
packages/​apollo-react/​src/​decision-table/​DecisionTableSentences.stories.tsx Demonstrates default, marked, empty, and large-table views.
packages/​apollo-react/​src/​decision-table/​__fixtures__/​sentences.fixtures.ts Supplies shared sentence examples and scale generators.

Review effort: Balanced

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Storybook visual diff

⚠️ Visual changes detected: 12 added (of 26 compared, 14 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): Nov 13, 2026, 08:41:57 AM

@github-actions

github-actions Bot commented Nov 6, 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 — — 42.02 MB 50.17 MB ±0
@uipath/apollo-react 60.1% 91.1% (319/350) 2.53 MB 14.20 MB +36.3 KB
@uipath/apollo-ui-icons — — 2.86 MB 6.97 MB ±0
@uipath/apollo-vertex — — — — —
@uipath/apollo-wind — — 909.2 KB 5.12 MB +23 B
@uipath/ap-chat 85.8% — 40.48 MB 46.10 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 balanced review requested due to automatic review settings November 6, 2026 17:44
@github-actions
github-actions Bot temporarily deployed to preview/apollo-landing November 6, 2026 17:46 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-docs November 6, 2026 17:46 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-vertex November 6, 2026 17:46 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-design November 6, 2026 17:46 Destroyed

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

Active issues drop an Age predicate from both the sentence and overflow tooltip and leave visible blank space because mixed-height scrolling fails to mount all visible rules.

1 open issue
1 previously missed issue

In code that hasn't changed since last review

Medium severity Update virtualized window for mixed-height rows

packages/​apollo-react/​src/​decision-table/​DecisionTableSentences.tsx:130

With an 800px viewport, a 1,264px sentence row followed by 64px rows leaves 159px of blank spacer visible when scrolled 1,263px into the list. The shared hook calculates the window end from the anchor's top and only advances that anchor after enough row boundaries are crossed, so scrolling within or just past a tall row does not mount all visible rules. Derive the window end from the live visible range, refresh it even when the anchor is unchanged, and add a mixed-height scrolling regression test.

1 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 6, 2026 21:46
@github-actions
github-actions Bot temporarily deployed to preview/apollo-docs November 6, 2026 21:47 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-landing November 6, 2026 21:47 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-design November 6, 2026 21:47 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-vertex November 6, 2026 21:47 Destroyed

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 early return leaves subsequent oversized column runs unbounded, allowing thousands of visually truncated tokens to mount; each run needs a limit and a two-large-run regression test.

1 open issue
1 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 6, 2026 22:45
@github-actions
github-actions Bot temporarily deployed to preview/apollo-landing November 6, 2026 22:45 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-vertex November 6, 2026 22:45 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-docs November 6, 2026 22:45 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-vertex November 9, 2026 21:20 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-landing November 9, 2026 21:20 Destroyed

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

No active review issues are recorded for the DecisionCard addition.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 9, 2026 22:17
@github-actions
github-actions Bot temporarily deployed to preview/apollo-design November 9, 2026 22:18 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-docs November 9, 2026 22:18 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-vertex November 9, 2026 22:18 Destroyed

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

Human assessment is needed to evaluate the visibility and accessibility impact of diagnostics disappearing when their cells are omitted from rule sentences.

No open issues 🎉

Review effort: Balanced

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

No active review issues are reported for the DecisionCard addition.

No open issues 🎉

Review effort: Balanced

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

No active review issues block the DecisionCard addition.

No open issues 🎉

Review effort: Balanced

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 review reports no active issues with the DecisionText addition.

No open issues 🎉

Review effort: Balanced

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

Human assessment is needed for an unpublished moderate-severity finding where container class overrides can make virtualized rows unreachable.

No open issues 🎉

Review effort: Balanced

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

Consumer class names can overwrite required scrolling and positioning styles, breaking windowing, and warning/error glyphs do not display their messages on hover.

2 open issues

Review effort: Balanced

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

No active review issues are reported for the new DecisionText sentence view.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

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

No active review issues are reported for the DecisionText addition.

No open issues 🎉

Review effort: Balanced

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 DecisionText addition has no active review issues.

No open issues 🎉

Review effort: Balanced

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

Matched and unmatched outcomes are indistinguishable to screen readers because the verdict icons are hidden from assistive technology and no accessible text announces the result.

1 open issue

Review effort: Balanced

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

Matched and unmatched condition icons are hidden from assistive technology without equivalent accessible text, preventing screen-reader users from distinguishing passing and failing conditions.

1 open issue

Review effort: Balanced

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

No active review issues block the addition of the DecisionText sentence-card view.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

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 review reports no active issues with the new DecisionText sentence view or its shared virtualization changes.

No open issues 🎉

Review effort: Balanced

… past a tall item [ECS-2138]

An item taller than the viewport could leave the items after it unmounted while still visible.
The window now extends its end to the visible end, and drops that extension once the anchor jumps.
…table [ECS-2138]

DecisionText shows each rule as a sentence card painted by the grid's TableMarks, windowed,
with run verdicts read out, the hovered value cell reported and an optional add-rule action.

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

There are no active review issues blocking approval of the new read-only DecisionText view.

No open issues 🎉

Review effort: Balanced

This branch was successfully deployed

No deployments
preview/apollo-docs — 3c953946 Deployed Nov 13, 2026 by github-actions[bot]
preview/apollo-landing — 3c953946 Deployed Nov 13, 2026 by github-actions[bot]
preview/apollo-vertex — 3c953946 Deployed Nov 13, 2026 by github-actions[bot]
preview/apollo-design — 3c953946 Deployed Nov 13, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg:apollo-react size:XXL 1,000+ changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants