Skip to content

feat(studio): replace native window.confirm with styled useConfirm dialog#302

Open
marsii1017 wants to merge 1 commit intoopenagents-org:developfrom
marsii1017:feat/replace-window-confirm-with-useconfirm
Open

feat(studio): replace native window.confirm with styled useConfirm dialog#302
marsii1017 wants to merge 1 commit intoopenagents-org:developfrom
marsii1017:feat/replace-window-confirm-with-useconfirm

Conversation

@marsii1017
Copy link
Copy Markdown
Contributor

@marsii1017 marsii1017 commented Mar 7, 2026

Context

Replace browser-native window.confirm() calls with the app's existing useConfirm() hook in two places:

  • EventLogs.tsx: "Clear Logs" confirmation now uses the styled dialog
  • ArtifactTopicDetail.tsx: "Delete Artifact" confirmation uses styled dialog with type="danger" for the destructive action

This makes the confirmation dialogs consistent with the rest of the app (TransportConfig, AdminDashboard, AgentManagement, etc.) which all use useConfirm(). No new i18n keys needed — all strings use existing translations in admin.json and artifact.json.

Test plan

  • Go to Profile → Event Logs, click "Clear Logs" →
  1. styled confirmation dialog appears,
  2. After clicking Cancel button, the dialog disappeared
  3. After Clicking Button "Clear Logs", the logs indeed got deleted
    (Test Scenario: http://localhost:8050/profile/event-logs)
  • Before the change, browser-native window.confirm() will be called and the following are screenshot:
Screenshot 2026-03-06 at 10 30 31 PM
  • After the change, useConfirm() hook will be used and the following are screenshot :
Screenshot 2026-03-06 at 10 34 09 PM

…alog

Replace browser-native window.confirm() calls with the app's existing
useConfirm() hook in two places:

- EventLogs.tsx: "Clear Logs" confirmation now uses the styled dialog
- ArtifactTopicDetail.tsx: "Delete Artifact" confirmation uses styled
  dialog with type="danger" for the destructive action

This makes the confirmation dialogs consistent with the rest of the app
(TransportConfig, AdminDashboard, AgentManagement, etc.) which all use
useConfirm(). No new i18n keys needed — all strings use existing
translations in admin.json and artifact.json.

Made-with: Cursor
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 7, 2026

@marsii1017 is attempting to deploy a commit to the Raphael's projects Team on Vercel.

A member of the Team first needs to authorize it.

@marsii1017
Copy link
Copy Markdown
Contributor Author

marsii1017 commented Mar 9, 2026

Hi @nebukaga and @pjymint, sorry to bother you both.(Tag you both since you have most highest commits in the repro) I’ve been waiting on this PR for a few days, and at the moment I’m also blocked by Vercel since the deployment requires approval from a member of Raphael's projects team. When you have a chance, would you mind taking a look? I’d really appreciate it. Thank you!

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