Skip to content

fix(ux/settings): reset-override dialog wording matches DELETE semantics (closes #114)#174

Merged
cristim merged 1 commit into
feat/multicloud-web-frontendfrom
fix/issue-114-reset-dialog-wording
Apr 29, 2026
Merged

fix(ux/settings): reset-override dialog wording matches DELETE semantics (closes #114)#174
cristim merged 1 commit into
feat/multicloud-web-frontendfrom
fix/issue-114-reset-dialog-wording

Conversation

@cristim
Copy link
Copy Markdown
Member

@cristim cristim commented Apr 28, 2026

Summary

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 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:

Before After
Button label Reset Delete
Dialog title Reset override? Delete override?
Dialog body "Reset … will be replaced" "Delete the {provider}/{service} override? This account's recommendations will revert to the global default. The override row and any per-service values you set will be removed."
Confirm label Reset override Delete override
Toast on failure Failed to reset override Failed to delete override
Inherit-payment tooltip Use Reset to clear all override fields including payment Use Delete to remove the override entirely (clears all fields including payment)

Backend (DELETE /api/accounts/:id/service-overrides/:provider/:service) unchanged.

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". Drives via the now-exported loadOverridesPanel (small accessibility change to enable the test — same approach used elsewhere).
  • All 41 existing settings-accounts tests still pass.

Drive-by

Removed unused formatRelativeTime import in frontend/src/recommendations.ts. It was a pre-existing TS6133 error blocking recommendations.test.ts from compiling, which in turn blocked the pre-commit Run frontend tests hook 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

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.
@cristim
Copy link
Copy Markdown
Member Author

cristim commented Apr 28, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

Warning

Rate limit exceeded

@cristim has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 8 minutes and 19 seconds before requesting another review.

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 @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 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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fcfe2225-d3b6-46e2-a4d8-b78a43c80fc2

📥 Commits

Reviewing files that changed from the base of the PR and between 62b8277 and f181253.

📒 Files selected for processing (3)
  • frontend/src/__tests__/settings-accounts.test.ts
  • frontend/src/recommendations.ts
  • frontend/src/settings.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/issue-114-reset-dialog-wording

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

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

✅ 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 added triaged Item has been triaged priority/p2 Backlog-worthy severity/medium Moderate harm urgency/this-sprint Within the current sprint impact/many Affects most users effort/xs Trivial / one-liner type/bug Defect labels Apr 28, 2026
@cristim
Copy link
Copy Markdown
Member Author

cristim commented Apr 28, 2026

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)

@cristim cristim merged commit a86bd4d into feat/multicloud-web-frontend Apr 29, 2026
3 checks passed
@cristim cristim deleted the fix/issue-114-reset-dialog-wording branch April 30, 2026 14:00
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/p2 Backlog-worthy 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.

1 participant