Skip to content

feat(FR-2451): add Prometheus Query Preset delete confirmation#7086

Open
agatha197 wants to merge 1 commit into04-27-feat_fr-2451_add_prometheus_query_preset_create_modalfrom
04-27-feat_fr-2451_add_prometheus_query_preset_delete_confirmation
Open

feat(FR-2451): add Prometheus Query Preset delete confirmation#7086
agatha197 wants to merge 1 commit into04-27-feat_fr-2451_add_prometheus_query_preset_create_modalfrom
04-27-feat_fr-2451_add_prometheus_query_preset_delete_confirmation

Conversation

@agatha197
Copy link
Copy Markdown
Contributor

@agatha197 agatha197 commented Apr 27, 2026

Resolves #6357 (FR-2451)

Stacked on top of #7085.

Summary

Adds a destructive Delete action to each row of the Prometheus Query Preset table, gated by a typed-confirmation modal as required by .claude/rules/destructive-confirmation.md.

  • Adds an action column (general.Control) on the right side of PrometheusQueryPresetList with a danger DeleteOutlined icon button. The list now accepts an onDeletePreset(row) callback prop.
  • Mounts the delete flow at the orchestrator level (AutoScalingRulePresetTab), mirroring the editor-modal mount pattern from Sub-task 3. Clicking Delete sets a { id, name } target; the orchestrator renders a single BAIConfirmModalWithInput whose OK button only enables once the user types the preset's exact name.
  • Adds AutoScalingRulePresetTabDeleteMutation calling adminDeletePrometheusQueryPreset(id: ID!). On success: message.success toast + updateFetchKey() to refetch the list. On error: per-error toast and modal closes (matches ResourcePresetList.tsx convention).
  • Per .claude/rules/destructive-confirmation.md, Popconfirm / single-click modal.confirm are not used — only BAIConfirmModalWithInput.

i18n keys added (under prometheusQueryPreset.*)

  • PermanentlyDeletePreset — modal title with {{ name }} interpolation
  • DeleteWarning — warning content shown in the modal Alert
  • SuccessfullyDeleted — success toast

Existing keys reused: button.Delete, general.Control, dialog.TypeNameToConfirmDeletion.

Verification

=== Relay ===
--- Relay: PASS ---

=== Lint ===
--- Lint: PASS ---

=== Format ===
--- Format: PASS ---

=== TypeScript ===
--- TypeScript: PASS ---

=== ALL PASS ===

@github-actions github-actions Bot added area:ux UI / UX issue. area:i18n Localization size:M 30~100 LoC labels Apr 27, 2026
Copy link
Copy Markdown
Contributor Author

agatha197 commented Apr 27, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 27, 2026

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
8.98% (-0.01% 🔻)
1859/20701
🔴 Branches
8.14% (-0.01% 🔻)
1187/14583
🔴 Functions
5.29% (+0.01% 🔼)
297/5617
🔴 Lines
8.71% (-0% 🔻)
1750/20082
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🔴
... / PrometheusQueryPresetNodes.tsx
0% 0% 0% 0%

Test suite run success

865 tests passing in 40 suites.

Report generated by 🧪jest coverage report action from f6aee58

Comment thread react/src/components/AutoScalingRulePresetTab.tsx
Comment thread react/src/components/PrometheusQueryPresetList.tsx Outdated
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_add_prometheus_query_preset_create_modal branch from 98a23f6 to f34e805 Compare April 28, 2026 06:06
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_add_prometheus_query_preset_delete_confirmation branch 2 times, most recently from 274f8d7 to a0e765e Compare April 28, 2026 06:18
@github-actions github-actions Bot added size:L 100~500 LoC and removed size:M 30~100 LoC labels Apr 28, 2026
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_add_prometheus_query_preset_delete_confirmation branch from a0e765e to ad7bcd7 Compare April 28, 2026 06:23
@agatha197 agatha197 requested a review from nowgnuesLee April 28, 2026 06:30
Comment thread react/src/components/PrometheusQueryPresetNodes.tsx
Comment thread resources/i18n/en.json
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_add_prometheus_query_preset_delete_confirmation branch from ad7bcd7 to d27efb4 Compare April 28, 2026 07:14
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_add_prometheus_query_preset_create_modal branch from f34e805 to 57c25be Compare April 28, 2026 07:14
@agatha197 agatha197 requested a review from nowgnuesLee April 28, 2026 07:41
Comment thread react/src/components/AutoScalingRulePresetTab.tsx Outdated
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_add_prometheus_query_preset_create_modal branch from 57c25be to 8f6b3c7 Compare April 28, 2026 11:38
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_add_prometheus_query_preset_delete_confirmation branch from d27efb4 to 6a520df Compare April 28, 2026 11:38
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_add_prometheus_query_preset_create_modal branch from 8f6b3c7 to 66852a9 Compare April 28, 2026 12:21
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_add_prometheus_query_preset_delete_confirmation branch from 6a520df to 44475aa Compare April 28, 2026 12:21
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_add_prometheus_query_preset_delete_confirmation branch from 44475aa to f6aee58 Compare April 28, 2026 12:26
@agatha197 agatha197 requested a review from nowgnuesLee April 30, 2026 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:i18n Localization area:ux UI / UX issue. size:L 100~500 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants