Skip to content

High-impact settings apply instantly with no confirmation or undo#2

Open
Ghvstcode wants to merge 2 commits intomainfrom
sustn/high-impact-settings-apply-instantly-with-no-confirmation-or
Open

High-impact settings apply instantly with no confirmation or undo#2
Ghvstcode wants to merge 2 commits intomainfrom
sustn/high-impact-settings-apply-instantly-with-no-confirmation-or

Conversation

@Ghvstcode
Copy link
Owner

Summary

Settings changes for agent mode, budget ceiling, and schedule window are applied immediately on user interaction — there's no confirmation dialog, no 'Save' button, and no undo mechanism.

In SchedulingSection.tsx (~lines 115-119), clicking 'Always on' for agent mode immediately fires a mutation that changes agent behavior. If a user accidentally clicks this, the agent starts consuming their budget immediately with no way to undo except navigating back and changing the setting.

In BudgetSection.tsx (~lines 44-66), dragging the budget ceiling slider fires on every change event. If the user overshoots and sets the ceiling to 10%, the agent could immediately pause work. The slider has min=10 but no confirmation for large changes.

In ProjectSection.tsx (~lines 425-429), project-level overrides for budget and scheduling also apply instantly.

This is particularly risky because these settings directly affect the agent's behavior and token consumption — the core resource the product manages.

Fix: For high-impact settings (agent mode, budget ceiling), add a confirmation step or a brief delay with an 'Undo' toast (similar to Gmail's undo-send). For slider-based settings, only persist on mouse-up/touch-end rather than on every change event. Consider showing the impact of the change before applying it ('This will allow the agent to use up to X tokens this week').

Branch: sustn/high-impact-settings-apply-instantly-with-no-confirmation-or

…ettings

High-impact settings (agent mode, budget ceiling, project schedule)
previously applied instantly on click/drag with no way to revert.
This is risky because these settings directly control agent behavior
and token consumption.

- Add reusable `undoToast()` in toast.tsx — shows a 5-second undo
  window (Gmail-style) for any setting change
- SchedulingSection: agent mode buttons now show undo toast with
  previous value restoration
- BudgetSection: slider uses local state during drag, only persists
  on mouse-up/touch-end via Radix `onValueCommit`, with undo toast
- ProjectSection: schedule mode buttons and budget slider get the
  same undo toast and commit-only slider behavior

SUSTN-Task: acb368a4-bf78-4c80-b300-b65594ddee3c
…ct settings

The undo toast (shown for agent mode, budget ceiling, and project
schedule/budget changes) was being immediately followed by a "Saved"
toast from the mutation's onSuccess handler. Both toasts would appear
simultaneously or the saved toast would replace the undo toast,
creating a confusing UX and cutting the undo window short.

- Add an `undoActive` flag in the toast module that suppresses
  `savedToast()` while an undo toast is visible. The flag auto-clears
  after the undo duration expires (with a small buffer).
- When the user clicks "Undo", re-arm the suppression so the
  reverse mutation's savedToast is also suppressed.
- Fix ProjectSection budget slider undo: use `hadOverride` (captured
  at commit time) instead of comparing prev value against the global
  default — the old comparison would incorrectly call clearOverride
  when a project override happened to equal the global value.
- Guard against undefined `serverBudget` in the onValueCommit handler
  to prevent passing undefined to setLocalBudget or updateOverride.

SUSTN-Task: acb368a4-bf78-4c80-b300-b65594ddee3c
@vercel
Copy link

vercel bot commented Feb 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sustn Ready Ready Preview, Comment Feb 24, 2026 6:45pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant