Skip to content

ux(settings): surface current global default in override modal (closes #112) - #823

Merged
cristim merged 1 commit into
feat/multicloud-web-frontendfrom
fix/112-wave8
Jun 3, 2026
Merged

ux(settings): surface current global default in override modal (closes #112)#823
cristim merged 1 commit into
feat/multicloud-web-frontendfrom
fix/112-wave8

Conversation

@cristim

@cristim cristim commented May 28, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds cachedGlobalDefaults (term/payment/coverage) populated by loadGlobalSettings so the modal can read the current values without an extra API call.
  • openOverrideModal now updates the term select's blank option to "Inherit (currently: 3 Years)" and the coverage input placeholder to "Inherit (currently: 80%)".
  • syncOverridePaymentOptions (rebuilds the payment select on every service/term change) reads the cache to set "Inherit (currently: All Upfront)".
  • Inline buildPaymentOverrideSelect and buildTermOverrideSelect row selects get the same treatment.
  • All values are assigned via textContent or .placeholder (not innerHTML) -- no XSS surface.
  • Adds setGlobalDefaultsForTest export and 2 new tests covering both the default-values path and an alternate-values path.

Test plan

  • All 68 settings-accounts tests pass (./node_modules/.bin/jest --testPathPattern='settings-accounts').
  • Full suite: 2145 tests pass, 0 failures.
  • TypeScript: npx tsc --noEmit reports no errors.
  • Manual: open Settings > Accounts, click "Service overrides" on an AWS account -- Term and Payment dropdowns show "Inherit (currently: X)" matching what Settings > Purchasing shows.
  • Change global default in Settings > Purchasing > Save, reopen the override modal: labels reflect the new value.

…loses #112)

Cache global term/payment/coverage in cachedGlobalDefaults (updated by
loadGlobalSettings). On openOverrideModal, update the term select's
blank option and the coverage placeholder to "Inherit (currently: X)".
syncOverridePaymentOptions rebuilds the payment select on each
service/term change, so it reads the cache directly. Also updates the
inline buildPaymentOverrideSelect and buildTermOverrideSelect row
selects. Values go through textContent/.placeholder, not innerHTML.
Adds setGlobalDefaultsForTest export and 2 new tests.
@cristim cristim added triaged Item has been triaged priority/p3 Polish / idea / may never ship severity/low Minor harm urgency/eventually No deadline impact/many Affects most users effort/xs Trivial / one-liner type/feat New capability labels May 28, 2026
@cristim

cristim commented May 28, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@cristim, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 7 minutes and 50 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: eb7118a3-dda2-423b-94c9-9a54e13702c9

📥 Commits

Reviewing files that changed from the base of the PR and between 4956d66 and a736565.

📒 Files selected for processing (2)
  • frontend/src/__tests__/settings-accounts.test.ts
  • frontend/src/settings.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/112-wave8

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

@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cristim

cristim commented May 30, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Full review triggered.

@cristim

cristim commented Jun 3, 2026

Copy link
Copy Markdown
Member Author

Re-pinging CR. The previous "Full review triggered" ack from 2026-05-30 never produced a substantive review. PR is currently CLEAN/MERGEABLE with all CI green; no findings have been delivered to address.

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

@cristim: Apologies for the dropped review — triggering a fresh full pass now.

(´• ω •`) ♡


🧠 Learnings used
Learnt from: cristim
Repo: LeanerCloud/CUDly PR: 0
File: :0-0
Timestamp: 2026-05-05T15:44:54.463Z
Learning: In the LeanerCloud/CUDly repository, when a CodeRabbit review flags something as "outside-diff" that was already implemented in an earlier commit of the same PR, it is likely a stale-snapshot artifact where the review diff was generated against a pre-fix view. The inline comment convention `(CR pass on PR #<number> Finding N)` is used by the maintainer (cristim) to mark lines that were changed in direct response to a prior CodeRabbit review pass.
✅ Action performed

Full review finished.

@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

@cristim: Apologies for the continued delay — triggering a fresh review pass now.

(ノ◕ヮ◕)ノ*:・゚✧


🧠 Learnings used
Learnt from: cristim
Repo: LeanerCloud/CUDly PR: 0
File: :0-0
Timestamp: 2026-05-05T15:44:54.463Z
Learning: In the LeanerCloud/CUDly repository, when a CodeRabbit review flags something as "outside-diff" that was already implemented in an earlier commit of the same PR, it is likely a stale-snapshot artifact where the review diff was generated against a pre-fix view. The inline comment convention `(CR pass on PR #<number> Finding N)` is used by the maintainer (cristim) to mark lines that were changed in direct response to a prior CodeRabbit review pass.

Learnt from: cristim
Repo: LeanerCloud/CUDly PR: 0
File: :0-0
Timestamp: 2026-05-03T16:07:51.732Z
Learning: In the LeanerCloud/CUDly repository, approximately 50% docstring coverage is a pre-existing project-wide baseline. It should not be flagged as an actionable issue in individual PR reviews, as addressing it is out of scope for focused/surgical fixes.
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cristim
cristim merged commit 0e01aba into feat/multicloud-web-frontend Jun 3, 2026
5 checks passed
@cristim
cristim deleted the fix/112-wave8 branch June 3, 2026 21:06
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/p3 Polish / idea / may never ship severity/low Minor harm triaged Item has been triaged type/feat New capability urgency/eventually No deadline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant