fix(release-diff): swap orientation, fix scroll, rename promote action#556
Conversation
Three small fixes to the release-diff experience:
- Swap LHS/RHS in ComponentReleaseDiffDialog so the target env's current
release is the "before" (left) and the upstream's incoming release is
the "after" (right). Matches how reviewers actually read promotion
diffs. The dialog title arrow still reflects promotion direction. Both
callers (drift chip on the env detail panel and the promote action on
the overrides page) pick up the new orientation automatically.
- YamlDiffViewer: move height + overflow:auto onto .cm-mergeView per
CodeMirror MergeView docs so both panes scroll as one unit instead of
scrolling independently and breaking line alignment.
- Rename the promote-flow button "View diff" -> "View release diff" to
match the wording already used by the drift-chip button.
Signed-off-by: Kavith Lokuhewage <kaviththiranga@gmail.com>
📝 WalkthroughWalkthroughThe PR reorients the release diff display in the environment promote workflow. Target environment's current release now appears as the original/left side and upstream's incoming release as the modified/right side. Supporting styling adjusts CodeMirror scroll behavior, and the button label clarifies the diff type. ChangesRelease Diff Orientation Refactor
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
plugins/openchoreo-react/src/components/YamlDiffViewer/YamlDiffViewer.tsx (1)
12-15: ⚡ Quick winUpdate JSDoc comments to reflect the new usage pattern.
The prop documentation describes the "typical" usage before this PR's orientation swap. Now that
ComponentReleaseDiffDialogpasses the target environment's current release asoriginaland the upstream's incoming release asmodified, these comments are backwards. Consider updating them to be more generic or to reflect the new typical usage:- /** Original (left) YAML — typically the upstream env's manifest. */ + /** Original (left) YAML — typically the "before" state. */ original: string; - /** Modified (right) YAML — typically the current env's manifest. */ + /** Modified (right) YAML — typically the "after" state. */ modified: string;🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@plugins/openchoreo-react/src/components/YamlDiffViewer/YamlDiffViewer.tsx` around lines 12 - 15, Update the JSDoc on YamlDiffViewer props to reflect the new orientation: change the comments for the original and modified props (the properties named original and modified in YamlDiffViewer) to either generic descriptions like "left-side YAML" and "right-side YAML" or to document the new typical usage where ComponentReleaseDiffDialog supplies the target environment's current release as original and the upstream incoming release as modified; ensure the comment text references YamlDiffViewer.original and YamlDiffViewer.modified (and optionally mention ComponentReleaseDiffDialog) so the new behavior is clear.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@plugins/openchoreo-react/src/components/YamlDiffViewer/YamlDiffViewer.tsx`:
- Around line 12-15: Update the JSDoc on YamlDiffViewer props to reflect the new
orientation: change the comments for the original and modified props (the
properties named original and modified in YamlDiffViewer) to either generic
descriptions like "left-side YAML" and "right-side YAML" or to document the new
typical usage where ComponentReleaseDiffDialog supplies the target environment's
current release as original and the upstream incoming release as modified;
ensure the comment text references YamlDiffViewer.original and
YamlDiffViewer.modified (and optionally mention ComponentReleaseDiffDialog) so
the new behavior is clear.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: f3170374-b632-4d01-92c2-46f32daa5746
📒 Files selected for processing (3)
plugins/openchoreo-react/src/components/YamlDiffViewer/YamlDiffViewer.tsxplugins/openchoreo/src/components/Environments/EnvironmentOverridesPage.tsxplugins/openchoreo/src/components/Environments/components/ComponentReleaseDiffDialog.tsx
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Three small fixes to the release-diff experience:
Swap LHS/RHS in ComponentReleaseDiffDialog so the target env's current release is the "before" (left) and the upstream's incoming release is the "after" (right). Matches how reviewers actually read promotion diffs. The dialog title arrow still reflects promotion direction. Both callers (drift chip on the env detail panel and the promote action on the overrides page) pick up the new orientation automatically.
YamlDiffViewer: move height + overflow:auto onto .cm-mergeView per CodeMirror MergeView docs so both panes scroll as one unit instead of scrolling independently and breaking line alignment.
Rename the promote-flow button "View diff" -> "View release diff" to match the wording already used by the drift-chip button.
Before
Screen.Recording.2026-05-16.at.10.05.50.mov
After
Screen.Recording.2026-05-16.at.10.31.45.mov
Summary by CodeRabbit
Changes
Style