Skip to content

fix: add disconnect confirmation dialog to both channel pages#1185

Open
jaimax0401 wants to merge 1 commit into
nexu-io:mainfrom
jaimax0401:fix/disconnect-confirmation
Open

fix: add disconnect confirmation dialog to both channel pages#1185
jaimax0401 wants to merge 1 commit into
nexu-io:mainfrom
jaimax0401:fix/disconnect-confirmation

Conversation

@jaimax0401

Copy link
Copy Markdown

Description

Adds a secondary confirmation dialog before disconnecting a channel, as described in issue #1063.

Changes (5 files only)

  • apps/desktop/src/pages/cloud-profile-page.tsx — confirmation modal using existing CSS classes (cloud-profile-modal-header, cloud-profile-modal-close, cloud-profile-modal-actions)
  • apps/desktop/src/runtime-page.css — .cloud-profile-modal-desc style
  • apps/web/src/pages/channels.tsx — disconnectChannelId state + standalone confirmation modal following existing reset confirmation pattern
  • apps/web/src/i18n/locales/en.ts — channels.confirmDisconnect* keys added inside en object (before closing } as const;)
  • apps/web/src/i18n/locales/zh-CN.ts — Chinese translations

Reviewer feedback addressed

  • P1: i18n keys placed inside en object (not appended after export)
  • P2: No dead code (removed disconnectChannelId; expression)
  • No unrelated files (workflows, scripts, docs excluded)

Testing

Manual:

  • Desktop: Click Disconnect on a profile → modal appears with proper styling → Confirm/Cancel work
  • Web: Click Reset & Reconfigure → modal appears → Confirm/Cancel work

Fixes #1063

@lefarcen lefarcen self-requested a review May 13, 2026 18:19
@lefarcen lefarcen added size/M Medium PR size (100-299 changed lines) risk/high High-risk change area type/bugfix Bug fix labels May 13, 2026

@lefarcen lefarcen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @jaimax0401, thanks for carrying the earlier review feedback into this iteration. The locale placement is fixed, the unrelated files are gone, and the desktop confirmation copy now has readable styling. I found one remaining web-flow issue before this lands: the current implementation turns the existing reset confirmation into a second confirmation step instead of replacing it with the disconnect confirmation. See the inline note below — after that is cleaned up, this should be in good shape.

Comment thread apps/web/src/pages/channels.tsx Outdated
<button
type="button"
onClick={() =>
setDisconnectChannelId(channel.id)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 This opens a second confirmation from inside the existing reset-confirmation dialog, so users now have to confirm twice and the original reset modal remains underneath until the mutation succeeds. Please make the existing reset dialog be the disconnect confirmation (swap its title/body/button copy and call disconnectMutation.mutate() there), or close showResetConfirm before showing this modal so only one confirmation is visible for the disconnect action.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed!

Issue: nexu-io#1063

Changes:
- desktop/cloud-profile-page.tsx: confirmation modal using existing CSS classes
- desktop/runtime-page.css: .cloud-profile-modal-desc style
- web/channels.tsx: disconnectChannelId state + confirmation modal
- i18n/en.ts: channels.confirmDisconnect* keys added inside en object
- i18n/zh-CN.ts: Chinese translations
@jaimax0401 jaimax0401 force-pushed the fix/disconnect-confirmation branch from 519b942 to c7ee415 Compare May 13, 2026 18:26

@lefarcen lefarcen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @jaimax0401, thanks for the quick cleanup. This version reuses the existing web confirmation dialog with the disconnect-specific copy, so the duplicate-confirmation blocker from my last review is resolved. The desktop modal, readable warning text, and locale entries all look consistent from this pass. This clears my previous change request; normal CI/maintainer gates still apply.

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

Labels

risk/high High-risk change area size/M Medium PR size (100-299 changed lines) type/bugfix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants