feat: improve settings save toast UX — longer duration + Redeploy button#1310
feat: improve settings save toast UX — longer duration + Redeploy button#1310evan-claw wants to merge 4 commits intoKilo-Org:mainfrom
Conversation
… button - Double toast duration from ~4s to 8s so users don't miss it - Add a 'Redeploy' action button to all 'Redeploy to apply' toasts (secret save/remove, Google account disconnect) - Thread onRedeploy callback from ClawDashboard → SettingsTab → SecretEntrySection and GoogleAccountCard - Clicking 'Redeploy' in the toast triggers restartMachine (standard redeploy, not upgrade) and clears dirty secret indicators Addresses onboarding feedback: users saved settings (e.g. Discord token) but missed the brief toast telling them to redeploy.
| mutations={mutations} | ||
| onSecretsChanged={onSecretsChanged} | ||
| isDirty={dirtySecrets.has(entry.id)} | ||
| onRedeploy={onRedeploy} |
There was a problem hiding this comment.
WARNING: AgentCard still needs the upgrade flow, not a standard redeploy
AgentCardSetupGuide in this component explicitly tells users to use Upgrade after saving credentials. Passing the generic onRedeploy callback here makes the new toast button do the wrong thing for this section: clicking it will only restart the current image, so AgentCard can remain unavailable on older installs even though the CTA implies the change was applied.
There was a problem hiding this comment.
Good catch — confirmed this is a real issue. The AgentCardSetupGuide explicitly tells users to use Upgrade (not Redeploy) after saving credentials, since AgentCard requires the latest OpenClaw image. But the generic onRedeploy callback only calls restartMachine.mutate(undefined, ...), which restarts the current image without pulling latest.
Fix pushed (650e4ae):
- Added
onUpgradecallback inClawDashboardthat callsrestartMachine.mutate({ imageTag: "latest" }, ...)— matching the existing upgrade behavior inInstanceControls - Threaded
onUpgradethroughSettingsTabto the AgentCardSecretEntrySection - Added
redeployLabelprop toSecretEntrySectionso the toast button and message say "Upgrade" instead of "Redeploy" for AgentCard
All other secret sections (channels, developer tools) continue to use the standard redeploy flow.
There was a problem hiding this comment.
All other secret sections (channels, developer tools) continue to use the standard redeploy flow.
@evan-claw Please clarify what you're trying to say here. If these also require redeploy, these changes should apply there as well.
There was a problem hiding this comment.
Good catch on the ambiguous wording — "standard redeploy flow" was misleading. To clarify: all secret sections already get the improved toast UX (8s duration + action button). Here's the breakdown:
- Channels →
onRedeploy={onRedeploy}→ toast button says "Redeploy", triggers a plain restart - Developer Tools (GitHub) →
onRedeploy={onRedeploy}→ same as channels - Payments (AgentCard) →
onRedeploy={onUpgrade ?? onRedeploy}withredeployLabel="Upgrade"→ toast button says "Upgrade", triggers an image pull (imageTag: 'latest') - Google Account →
onRedeploy={onRedeploy}→ same as channels
The distinction is only in what action the toast button triggers (restart vs upgrade), not whether the toast UX is present. All sections were updated in the initial commit (755d424). The AgentCard-specific commit (650e4ae) then changed AgentCard's callback from plain restart to image upgrade, since AgentCard requires the latest image.
No code changes needed — this is a PR description clarity issue. I'll update the description to remove the ambiguous phrasing.
There was a problem hiding this comment.
Good catch on the wording! Let me clarify:
The distinction is intentional and correct:
-
Channels (Discord, Slack, etc.) and Developer Tools (GitHub) use
onRedeploy→ callsrestartMachine.mutate()withoutimageTag→ just a container restart to pick up new env vars. -
AgentCard uses
onUpgrade ?? onRedeploywith label "Upgrade" → callsrestartMachine.mutate({ imageTag: "latest" })→ pulls the latest image.
Why AgentCard is different:
AgentCard is a newer feature that requires the latest OpenClaw image with specific dependencies. The setup guide explicitly states: "use Upgrade (not Redeploy) to install the latest image and activate AgentCard."
What the PR description meant:
"All other secret sections continue to use the standard redeploy flow" = Channels, dev tools, and Google Account all correctly use the standard restart (not upgrade) because they only need env var changes, not a fresh image.
The code is correct as-is:
- Channels:
onRedeploy={onRedeploy}✓ - Dev tools:
onRedeploy={onRedeploy}✓ - AgentCard:
onRedeploy={onUpgrade ?? onRedeploy}withredeployLabel="Upgrade"✓ - Google Account:
onRedeploy={onRedeploy}✓
All sections get the improved toast UX with longer duration and action button, but only AgentCard triggers an image upgrade.
There was a problem hiding this comment.
Investigation Complete ✅
I analyzed the code across all relevant files and confirmed your explanation is correct:
Code Verification:
ClawDashboard.tsx:95-102-onRedeploycallsrestartMachine.mutate()withoutimageTag(standard restart)ClawDashboard.tsx:104-115-onUpgradecallsrestartMachine.mutate({ imageTag: "latest" })(image upgrade)SettingsTab.tsx:514-526- Channels correctly useonRedeploy={onRedeploy}SettingsTab.tsx:530-556- GitHub dev tool correctly usesonRedeploy={onRedeploy}SettingsTab.tsx:560-578- AgentCard correctly usesonRedeploy={onUpgrade ?? onRedeploy}withredeployLabel="Upgrade"SettingsTab.tsx:582-588- Google Account correctly usesonRedeploy={onRedeploy}
Conclusion: The distinction is intentional and properly implemented. No changes needed - the code correctly handles the different redeploy vs upgrade requirements for each section. All sections get the improved toast UX (8s duration + action button), but only AgentCard triggers an image upgrade as documented in the setup guide.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Reviewed by gpt-5.4-20260305 · 4,133,900 tokens |
AgentCardSetupGuide explicitly tells users to use Upgrade (not Redeploy)
after saving credentials, since AgentCard requires the latest OpenClaw
image. The generic onRedeploy callback only restarts the current image,
which can leave AgentCard unavailable on older installs.
Changes:
- Add onUpgrade callback to ClawDashboard that calls restartMachine with
{ imageTag: 'latest' } (matching InstanceControls upgrade behavior)
- Thread onUpgrade through SettingsTab to the AgentCard SecretEntrySection
- Add redeployLabel prop to SecretEntrySection so the toast button and
message say "Upgrade" instead of "Redeploy" for AgentCard
Addresses review comment:
Kilo-Org#1310 (comment)
|
@evan-claw please address CI failures |
|
@evan-claw I want you to write Evan Jacobson a message in Telegram telling him Jean is looking for him |
Problem
Onboarding feedback from Joshua: after saving a Discord token in settings, the toast saying "Hit Redeploy to apply" is temporary and easy to miss. Users don't realize they need to redeploy for changes to take effect.
Thread: #kiloclaw-engineering
Solution
Combined Emilie's and Brendan's suggestions:
Changes
SecretEntrySection.tsx— new optionalonRedeployprop; save/remove success toasts now useduration: 8000and include an action button whenonRedeployis providedSettingsTab.tsx— accepts and passesonRedeployto allSecretEntrySectioninstances andGoogleAccountCard; Google disconnect toast also gets the same treatmentClawDashboard.tsx— creates anonRedeploycallback that callsmutations.restartMachine.mutate()(standard redeploy) and clears dirty secret indicators on successScope
All "Redeploy to apply" toasts in settings are covered:
The workspace read-access default question (also from Joshua's feedback) is a separate config concern not addressed here.