fix(ux/settings): reset-override dialog wording matches DELETE semantics (closes #114)#174
Conversation
Closes #114. The Reset confirmation dialog said: "Reset {provider}/{service} override to the global default? Any per-service values you set will be replaced." But what actually happens is the row is DELETEd from account_service_overrides — the engine then reads the global default as a side effect of the row being gone, not as a "reset" operation in the data sense. "Replaced" implied the row stuck around with new values. Per the issue's recommended option A (tighten wording, keep DELETE semantics), changes: - Button label: "Reset" → "Delete" - Dialog title: "Reset override?" → "Delete override?" - Dialog body: spells out that the override row + its per-service values will be removed and the account reverts to the global default - Confirm label: "Reset override" → "Delete override" - Toast on failure: "Failed to reset override" → "Failed to delete override" - The Inherit-payment dropdown's tooltip ("Use Reset to clear all override fields including payment") tightened to point at the Delete action Side change: exported `loadOverridesPanel` so the new test can drive the override panel directly. The function is a coherent unit and was already test-friendly in shape; just needed the export. Tests: - New `Delete-override button + dialog wording match the actual data semantics (issue #114)` test pins the post-fix wording: button reads "Delete" (not "Reset"), dialog title/body/confirm label all match, body must NOT contain "replaced" or "Reset". - All 41 existing settings-accounts tests still pass. Frontend-only change. Backend (`DELETE /api/accounts/:id/service-overrides/:provider/:service`) unchanged. Drive-by: removed unused `formatRelativeTime` import in `frontend/src/recommendations.ts`. It was a pre-existing TS6133 error (unused-declaration) that broke `recommendations.test.ts` from running, blocking every commit on this branch. One-line fix to unblock.
|
@coderabbitai review |
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
✅ Actions performedReview triggered.
|
|
P2 UX/wording fix: button label and dialog copy now reflect that the action DELETEs the row, not resets it to defaults (#114). Small but important for user trust — "replaced" implied persistence. Drive-by: removed pre-existing TS6133 unused import that was blocking the pre-commit test hook. CI green, mergeable. (triage agent wave2-F) |
Summary
Closes #114.
The Reset confirmation dialog said:
But the action DELETEs the override row from
account_service_overrides— the engine then reads the global default as a side effect of the row's absence, not as a "reset" operation. "Replaced" implied the row stuck around with new values.Fix (Option A — tighten wording)
Per the issue's recommended path:
ResetDeleteReset override?Delete override?Reset overrideDelete overrideFailed to reset overrideFailed to delete overrideUse Reset to clear all override fields including paymentUse Delete to remove the override entirely (clears all fields including payment)Backend (
DELETE /api/accounts/:id/service-overrides/:provider/:service) unchanged.Tests
Delete-override button + dialog wording match the actual data semantics (issue #114)test pins the post-fix wording: button reads "Delete" (not "Reset"), dialog title/body/confirm label all match, body must NOT contain "replaced" or "Reset". Drives via the now-exportedloadOverridesPanel(small accessibility change to enable the test — same approach used elsewhere).Drive-by
Removed unused
formatRelativeTimeimport infrontend/src/recommendations.ts. It was a pre-existing TS6133 error blockingrecommendations.test.tsfrom compiling, which in turn blocked the pre-commitRun frontend testshook on every commit on this branch. One-line fix; not strictly part of #114, but the alternative was to skip the hook.🤖 Generated with claude-flow