Skip to content

feat(apollo-react): hide the log severity select on request [AL-667] - #1448

Merged
andreizdrali-uipath merged 1 commit into
mainfrom
claude/guardrail-hide-log-severity-fbc41b
Oct 22, 2026
Merged

andreizdrali-uipath merged 1 commit into
mainfrom
claude/guardrail-hide-log-severity-fbc41b

Conversation

@andreizdrali-uipath

@andreizdrali-uipath andreizdrali-uipath commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

AL-667, apollo-react part. Flow's new Guardrail node offers two actions per guardrail: Block, and Fail, which takes the node's Fail exit. Fail is saved as the log action type and relabelled through labels.actionLogLabel, but it has no severity, so the Severity level select has to go.

What changes

  • hideLogSeverity?: boolean on GuardrailActionSection and GuardrailBuilder, which forwards it. Off by default, so Agents and the other Flow editors look and behave as before.
  • With it on, a log action renders only the action type select. The type select keeps its column of the two-column grid, so it doesn't move when the user switches to Block.
  • severityLevel is left as it is: a new guardrail still saves 'Info' (createDefaultGuardrailAction), an edited one its stored value. No fixed-severity prop; the host overwrites it on save if it needs another.
  • README contract bullet; a LogWithoutSeverity story on both the section and the builder.

Tests

  • guardrail-action-section.test.tsx: shown by default, hidden with the prop, switching to log still emits severityLevel: 'Info', block's reason unaffected.
  • guardrail-builder.test.tsx: shown by default; hidden with the prop and a new guardrail saves { $actionType: 'log', severityLevel: 'Info' }; an edited guardrail saves its stored 'Error'.
  • Negative control: with the condition removed, the three hide tests fail.
  • apollo-react: tsc clean, Biome clean on the changed files (the two guardrail-builder.tsx warnings are on main), Guardrails suites green (46 files, 1090 tests). Locally the full run's only failures are the Node localStorage and timeout suites that fail on main too.
  • Not checked in Storybook: the row with the type select alone.

🤖 Generated with Claude Code

Add hideLogSeverity to GuardrailActionSection and GuardrailBuilder, which
forwards it. With it on, a log action shows only the action type select.
Flow's Guardrail node needs it: it relabels log as Fail, and Fail has no
severity.

The action keeps its severityLevel. A new guardrail still saves 'Info',
an edited one its stored value, and the host overwrites it on save if it
needs another. Off by default, so Agents and the other Flow editors are
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 22, 2026 13:57
@github-actions
github-actions Bot temporarily deployed to preview/apollo-landing October 22, 2026 13:59 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-docs October 22, 2026 13:59 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-vertex October 22, 2026 13:59 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-design October 22, 2026 13:59 Destroyed
@github-actions github-actions Bot added the size:L 100-499 changed lines. label Oct 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Dependency License Review

  • ✅ 1957 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1721
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.

🟢 Approval recommended

The opt-in change preserves existing behavior and saved data, includes focused regression coverage, and has no identified blocking issues.

No open issues 🎉

What changed in this PR

Adds opt-in severity hiding to Apollo React’s guardrail editor, supporting Flow’s Fail action without changing existing defaults or saved severity values.

Changes:

  • Adds hideLogSeverity to GuardrailActionSection and forwards it through GuardrailBuilder, preserving the action selector’s grid column.
  • Adds regression tests for default visibility, hidden severity, and saved values.
  • Documents the contract and adds stories for both components.
File Description
packages/​apollo-react/​src/​canvas/​components/​Guardrails/​README.md Documents visibility and severity preservation.
packages/​apollo-react/​src/​canvas/​components/​Guardrails/​guardrail-builder.tsx Exposes and forwards the optional prop.
packages/​apollo-react/​src/​canvas/​components/​Guardrails/​guardrail-builder.test.tsx Covers visibility and default/stored severity saves.
packages/​apollo-react/​src/​canvas/​components/​Guardrails/​guardrail-builder.stories.tsx Demonstrates Fail without severity.
packages/​apollo-react/​src/​canvas/​components/​Guardrails/​components/​guardrail-action-section.tsx Conditionally hides the severity selector.
packages/​apollo-react/​src/​canvas/​components/​Guardrails/​components/​guardrail-action-section.test.tsx Covers visibility, action switching, and block behavior.
packages/​apollo-react/​src/​canvas/​components/​Guardrails/​components/​guardrail-action-section.stories.tsx Demonstrates the section with severity hidden.

Review effort: Balanced

@andreizdrali-uipath
andreizdrali-uipath marked this pull request as ready for review October 22, 2026 14:09
@andreizdrali-uipath andreizdrali-uipath added the dev-packages Adds dev package publishing on pushes to this PR label Oct 22, 2026
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

📦 Dev Packages

🧹 Dev packages cleaned up after PR close.

Last updated: 2026-10-22 08:17:09 PT

@github-actions

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 58.1% 0.0% (0/3) 8.14 MB 32.17 MB +73 B
@uipath/apollo-ui-icons — — 2.86 MB 6.97 MB ±0
@uipath/apollo-vertex — — — — —
@uipath/apollo-wind — — 810.6 KB 4.68 MB +1 B
@uipath/ap-chat 85.8% — 40.42 MB 45.71 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.

@github-actions

Copy link
Copy Markdown
Contributor

Storybook visual diff

⚠️ Visual changes detected: 14 changed, 4 added (of 526 compared, 508 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): Oct 22, 2026, 07:32:08 AM

@andreizdrali-uipath
andreizdrali-uipath merged commit d80651e into main Oct 22, 2026
46 of 47 checks passed
@andreizdrali-uipath
andreizdrali-uipath deleted the claude/guardrail-hide-log-severity-fbc41b branch October 22, 2026 15:14

This branch was successfully deployed

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

Labels

dev-packages Adds dev package publishing on pushes to this PR pkg:apollo-react size:L 100-499 changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants