ux(settings): surface current global default in override modal (closes #112) - #823
Conversation
…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.
|
@coderabbitai review |
|
Warning Review limit reached
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 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
✅ Actions performedReview triggered.
|
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
|
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 |
|
(´• ω •`) ♡ 🧠 Learnings used✅ Action performedFull review finished. |
|
(ノ◕ヮ◕)ノ*:・゚✧ 🧠 Learnings used✅ Action performedReview finished.
|
Summary
cachedGlobalDefaults(term/payment/coverage) populated byloadGlobalSettingsso the modal can read the current values without an extra API call.openOverrideModalnow 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)".buildPaymentOverrideSelectandbuildTermOverrideSelectrow selects get the same treatment.textContentor.placeholder(not innerHTML) -- no XSS surface.setGlobalDefaultsForTestexport and 2 new tests covering both the default-values path and an alternate-values path.Test plan
settings-accountstests pass (./node_modules/.bin/jest --testPathPattern='settings-accounts').npx tsc --noEmitreports no errors."Inherit (currently: X)"matching what Settings > Purchasing shows.