chore(apollo-react): render StageNode stories at production stage width (336)#931
Conversation
…th (336) Case-management stages in Maestro are moving from 304px to 336px wide (MST-12509). Update the StageNode and CanvasPerformance stories to render at the new width so Storybook matches the product. Introduces a DEFAULT_STAGE_WIDTH constant in the StageNode stories so the value lives in one place instead of being repeated across every story. All stage nodes in the stories, including the previously 352px demo stages, now use this constant. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Be4BTjmo7bosdUf8UTZ7DV
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Dependency License Review
License distribution
Excluded packages
|
There was a problem hiding this comment.
Pull request overview
Updates Storybook canvas stories in apollo-react so StageNode renders at the new Maestro production stage width (336px), keeping visual snapshots aligned with the product while leaving runtime component behavior unchanged.
Changes:
- Added
DEFAULT_STAGE_WIDTH = 336toStageNode.stories.tsxand routed stage node widths through it (eliminating hardcoded widths). - Updated
CanvasPerformance.stories.tsxperformance stage node width from 304 → 336.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/apollo-react/src/canvas/components/StageNode/StageNode.stories.tsx | Introduces a single default stage width constant and applies it across StageNode stories for consistent Storybook rendering. |
| packages/apollo-react/src/canvas/components/CanvasPerformance.stories.tsx | Updates the performance story’s stage-node width constant to match the new production width. |
📊 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 |
What & why
Case Management stages in Maestro (PO.Frontend) are moving from 304px to 336px wide per MST-12509. The
StageNodecomponent in apollo-react is already width-agnostic (it renders at thewidthprop, withmin-width: 288px), so no component change is needed. Its Storybook stories, however, hardcoded the old304px, so Storybook rendered stages narrower than production. This updates the stories to the new width so Storybook matches the product.Changes
StageNode.stories.tsx— introduce aDEFAULT_STAGE_WIDTH = 336constant and point every stage-node story at it. Previously there were 46 hardcoded304widths plus 2352demo stages; all now resolve through the one constant, so future width changes are a one-line edit.CanvasPerformance.stories.tsx—PERFORMANCE_STAGE_NODE_WIDTH304 → 336.No change to
StageNoderuntime behavior or to the published package. Story data only. Sticky-note widths, loop-node heights, and node y-positions that also happened to be304were intentionally left untouched.Visual regression
These stories drive the Playwright visual snapshots, so the StageNode and CanvasPerformance baselines will shift by design. No baseline images are committed in-repo, so the visual-regression job will need its snapshots regenerated/approved on this PR.
Context
Part of MST-12509. The product-side change (a per-case
useNewStageWidthflag, gated behind acanvas-useNewStageWidthfeature flag) lands in PO.Frontend separately so existing cases keep their current width with no migration.🤖 Generated with Claude Code
https://claude.ai/code/session_01Be4BTjmo7bosdUf8UTZ7DV
Generated by Claude Code