Repository navigation
feat(apollo-react): hide the log severity select on request [AL-667] - #1448
Conversation
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>
Dependency License Review
License distribution
Excluded packages
|
There was a problem hiding this comment.
🟢 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
hideLogSeveritytoGuardrailActionSectionand forwards it throughGuardrailBuilder, 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
📦 Dev Packages🧹 Dev packages cleaned up after PR close. Last updated: 2026-10-22 08:17:09 PT |
📊 Coverage + size by packagePer-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.
"Coverage" is each package's own |
Storybook visual diffBaseline 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 |
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
logaction type and relabelled throughlabels.actionLogLabel, but it has no severity, so the Severity level select has to go.What changes
hideLogSeverity?: booleanonGuardrailActionSectionandGuardrailBuilder, which forwards it. Off by default, so Agents and the other Flow editors look and behave as before.severityLevelis 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.LogWithoutSeveritystory on both the section and the builder.Tests
guardrail-action-section.test.tsx: shown by default, hidden with the prop, switching to log still emitsseverityLevel: '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'.tscclean, Biome clean on the changed files (the twoguardrail-builder.tsxwarnings are onmain), Guardrails suites green (46 files, 1090 tests). Locally the full run's only failures are the NodelocalStorageand timeout suites that fail onmaintoo.🤖 Generated with Claude Code