Skip to content

refactor(FR-2494): improve auto scaling rule v2 UI — loading, unmount, step size sign addon, threshold % suffix#6749

Merged
graphite-app[bot] merged 1 commit intomainfrom
04-16-refactor_fr-2494_improve_auto_scaling_rule_v2_ui_loading_indicator_unmount_step_size_addon_suffix_suspense_boundary
Apr 16, 2026
Merged

refactor(FR-2494): improve auto scaling rule v2 UI — loading, unmount, step size sign addon, threshold % suffix#6749
graphite-app[bot] merged 1 commit intomainfrom
04-16-refactor_fr-2494_improve_auto_scaling_rule_v2_ui_loading_indicator_unmount_step_size_addon_suffix_suspense_boundary

Conversation

@agatha197
Copy link
Copy Markdown
Contributor

@agatha197 agatha197 commented Apr 16, 2026

Resolves #6749 (FR-2494)

Changes

  • Loading indicator: Refresh button shows loading state on both initial Prometheus preset selection and manual refresh
  • BAIUnmountAfterClose: Wrap editor modal to properly unmount after close
  • Step size sign addon: Use Space.Compact + Space.Addon to display +/−/± as a prefix (range: ±, scale-out: +, scale-in: −)
  • Threshold % suffix: Show % unit suffix on threshold inputs when metric source is KERNEL
  • Suspense boundary: Add Suspense boundary inside the modal to prevent the rule list from refreshing when the modal opens
  • Skeleton fallback: Show Skeleton instead of Spin while the modal content loads

@github-actions github-actions Bot added the size:XL 500~ LoC label Apr 16, 2026
Copy link
Copy Markdown
Contributor Author

agatha197 commented Apr 16, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@agatha197 agatha197 changed the title refactor(FR-2494): improve auto scaling rule v2 UI — loading indicator, unmount, step size addon, % suffix, Suspense boundary refactor(FR-2494): improve auto scaling rule v2 UI — loading, unmount, step size sign addon, threshold % suffix Apr 16, 2026
@agatha197 agatha197 marked this pull request as ready for review April 16, 2026 03:52
Copilot AI review requested due to automatic review settings April 16, 2026 03:52
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 16, 2026

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
8.68% (-0% 🔻)
1738/20027
🔴 Branches
7.9% (+0% 🔼)
1104/13983
🔴 Functions
5.21% (-0.01% 🔻)
283/5436
🔴 Lines
8.38% (-0% 🔻)
1630/19450

Test suite run success

847 tests passing in 38 suites.

Report generated by 🧪jest coverage report action from 08fe2ec

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the Auto Scaling Rule v2 editor UX to improve perceived responsiveness and cleanup behavior, primarily by adjusting modal unmounting and introducing better inline loading affordances for Prometheus preset previews.

Changes:

  • Wrap the rule editor modal with BAIUnmountAfterClose and move modal body work behind an inner Suspense boundary (with Skeleton fallback).
  • Improve Prometheus preset preview behavior (refresh button loading, isolated Suspense for just the value text).
  • Update editor inputs to show clearer units/signs (step-size sign prefix and % suffix for KERNEL thresholds).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
react/src/components/AutoScalingRuleList.tsx Wraps the editor modal with BAIUnmountAfterClose to unmount after close animations.
react/src/components/AutoScalingRuleEditorModal.tsx Splits modal content to contain Suspense, changes loading fallbacks, and adds UI affordances (sign/unit addons) plus preview loading behavior.

Comment thread react/src/components/AutoScalingRuleEditorModal.tsx Outdated
Comment thread react/src/components/AutoScalingRuleList.tsx Outdated
Comment thread react/src/components/AutoScalingRuleEditorModal.tsx
@agatha197 agatha197 force-pushed the 04-16-refactor_fr-2494_improve_auto_scaling_rule_v2_ui_loading_indicator_unmount_step_size_addon_suffix_suspense_boundary branch from de7b121 to a1f8c90 Compare April 16, 2026 04:51
@agatha197 agatha197 force-pushed the 04-16-refactor_fr-2494_improve_auto_scaling_rule_v2_ui_step_size_sign_condition_tag_preset_searchable branch from 8395e2c to 371c91b Compare April 16, 2026 04:51
@agatha197 agatha197 changed the base branch from 04-16-refactor_fr-2494_improve_auto_scaling_rule_v2_ui_step_size_sign_condition_tag_preset_searchable to graphite-base/6749 April 16, 2026 04:55
@agatha197 agatha197 force-pushed the graphite-base/6749 branch from 371c91b to d35f12e Compare April 16, 2026 04:57
@agatha197 agatha197 force-pushed the 04-16-refactor_fr-2494_improve_auto_scaling_rule_v2_ui_loading_indicator_unmount_step_size_addon_suffix_suspense_boundary branch from a1f8c90 to b3de401 Compare April 16, 2026 04:57
@agatha197 agatha197 changed the base branch from graphite-base/6749 to 04-16-refactor_fr-2494_improve_auto_scaling_rule_v2_ui_step_size_sign_condition_tag_preset_searchable April 16, 2026 04:57
@agatha197 agatha197 force-pushed the 04-16-refactor_fr-2494_improve_auto_scaling_rule_v2_ui_loading_indicator_unmount_step_size_addon_suffix_suspense_boundary branch from b3de401 to b47a605 Compare April 16, 2026 05:11
Comment thread react/src/components/AutoScalingRuleEditorModal.tsx Outdated
@agatha197 agatha197 force-pushed the 04-16-refactor_fr-2494_improve_auto_scaling_rule_v2_ui_loading_indicator_unmount_step_size_addon_suffix_suspense_boundary branch 4 times, most recently from a1c5f8f to d50fc67 Compare April 16, 2026 06:02
Copy link
Copy Markdown
Contributor

@nowgnuesLee nowgnuesLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Apr 16, 2026

Merge activity

…, step size sign addon, threshold % suffix (#6749)

Resolves #6749 (FR-2494)

## Changes

- **Loading indicator**: Refresh button shows loading state on both initial Prometheus preset selection and manual refresh
- **BAIUnmountAfterClose**: Wrap editor modal to properly unmount after close
- **Step size sign addon**: Use `Space.Compact` + `Space.Addon` to display +/−/± as a prefix (range: ±, scale-out: +, scale-in: −)
- **Threshold % suffix**: Show % unit suffix on threshold inputs when metric source is KERNEL
- **Suspense boundary**: Add Suspense boundary inside the modal to prevent the rule list from refreshing when the modal opens
- **Skeleton fallback**: Show `Skeleton` instead of `Spin` while the modal content loads
@graphite-app graphite-app Bot force-pushed the 04-16-refactor_fr-2494_improve_auto_scaling_rule_v2_ui_step_size_sign_condition_tag_preset_searchable branch from d35f12e to 439bef6 Compare April 16, 2026 06:47
@graphite-app graphite-app Bot force-pushed the 04-16-refactor_fr-2494_improve_auto_scaling_rule_v2_ui_loading_indicator_unmount_step_size_addon_suffix_suspense_boundary branch from d50fc67 to 08fe2ec Compare April 16, 2026 06:48
Base automatically changed from 04-16-refactor_fr-2494_improve_auto_scaling_rule_v2_ui_step_size_sign_condition_tag_preset_searchable to main April 16, 2026 06:57
@graphite-app graphite-app Bot closed this in 08fe2ec Apr 16, 2026
@graphite-app graphite-app Bot merged commit 08fe2ec into main Apr 16, 2026
8 checks passed
@graphite-app graphite-app Bot deleted the 04-16-refactor_fr-2494_improve_auto_scaling_rule_v2_ui_loading_indicator_unmount_step_size_addon_suffix_suspense_boundary branch April 16, 2026 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500~ LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants