Skip to content

fix(frontend): remove unsupported purchase cancellation assurance - #466

Merged
cristim merged 3 commits into
mainfrom
fix/provider-cancellation-warning
Oct 4, 2026
Merged

cristim merged 3 commits into
mainfrom
fix/provider-cancellation-warning

Conversation

@cristim

@cristim cristim commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

The purchase modal's Execute Now warning promised AWS-style cancellation regardless of the selected provider or product. That reassurance was also inaccurate as a general AWS guarantee. The warning now preserves the immediate upfront charge and approval-bypass disclosure while removing only the unsupported cancellation sentence.

Closes #251.

Independent adversarial gpt-6-astra review approved exact commit 9d7ad04f59275395cfa5ec290677fb0ff4638121 with no actionable findings, under the owner's authorized local-review alternative. The reviewer checked the complete three-file committed diff, provider documentation, committed source and the matching freshly built production artifact.

Fresh independent post-commit checks passed 118 Jest tests and four production-browser scenarios. They exercise the actual modal for AWS, Azure and GCP, exact upfront amounts, include-checkbox totals, approval and reopen behavior, mixed-provider fan-out and phone readability. No execute POSTs were emitted. Independent original-source browser tests and an old-sentence mutation failed specifically on the visible warning after the modal, selected recommendation, amount and mode controls passed. Author checks also passed the existing recommendations browser smoke tests, typecheck, lint, build and normal commit hooks.

The production change is one text line. Browser and provider inputs are synthetic HTTP fixtures at the boundary, exercising the real production frontend without a purchase or live cloud call. The correction makes no new cancellation or refund promise. No permission or execution behavior changes.

Summary by CodeRabbit

  • Updates
    • Direct-purchase warnings no longer mention an AWS 24-hour cancellation window. They continue to clarify the upfront charge and that direct execution bypasses approval, with messaging consistent across AWS, Azure, and GCP.

@cristim cristim added severity/medium Moderate harm urgency/this-sprint Within the current sprint triaged Item has been triaged priority/p1 Next up; this sprint impact/many Affects most users effort/xs Trivial / one-liner type/bug Defect labels Oct 1, 2026
@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: LeanerCloud/cloud-commitments-platform/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 1a3b9867-52c4-4299-a0a8-2147370a2e69
📥 Commits

Reviewing files that changed from the base of the PR and between fa8c39e and 9d276f5.

📒 Files selected for processing (4)
  • frontend/src/__tests__/purchase-modal-submit.test.ts
  • frontend/src/app.ts
  • frontend/src/recommendations.ts
  • frontend/tests-e2e/execute-now-warning.spec.ts

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.


📝 Walkthrough

Walkthrough

The frontend removes AWS-specific 24-hour cancellation wording from the Execute Now warning and confirmation. Tests cover the warning across AWS, Azure, and GCP recommendations, including visibility and modal behavior.

Changes

Execute Now warning

Layer / File(s) Summary
Direct-execution warning copy
frontend/src/recommendations.ts, frontend/src/app.ts
The Execute Now warning and confirmation no longer state that AWS purchases can be canceled within 24 hours. The immediate-charge and approval-bypass messages remain.
Cross-provider warning tests
frontend/src/__tests__/purchase-modal-submit.test.ts, frontend/tests-e2e/execute-now-warning.spec.ts
Tests check warning content and visibility across providers and modes, modal reopening behavior, and the absence of unexpected execution requests.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 9d276

The unsupported cancellation promise is removed while the immediate-charge and approval-bypass warnings remain. No actionable merge risk is established.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: removing the unsupported purchase cancellation assurance from the frontend.
Linked Issues check ✅ Passed Issue #251 requests provider-aware wording or removal of the unsupported cancellation clause. frontend/src/recommendations.ts removes it from the Execute Now warning while retaining the upfront-char…
Out of Scope Changes check ✅ Passed All changes support issue #251. The confirmation-dialog correction prevents the same unsupported reassurance at the next direct-execution step. The Jest and Playwright additions verify the corrected w…
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

cristim and others added 2 commits October 4, 2026 23:50
… dialog

The direct-execute confirm dialog shown after clicking Execute Purchase
Now still told users AWS allows cancellation within 24 hours. Remove the
sentence and correct the nearby comment. Add a jest test that opens the
modal in direct mode, clicks Execute, and asserts the confirmDialog
title and body contain no cancellation promise.

Refs #251
@cristim
cristim merged commit cab5817 into main Oct 4, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/xs Trivial / one-liner impact/many Affects most users priority/p1 Next up; this sprint severity/medium Moderate harm triaged Item has been triaged type/bug Defect urgency/this-sprint Within the current sprint

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(frontend): Execute Now warning claims AWS-style 24h cancellation for Azure and GCP

1 participant