Skip to content

feat: message on active tunnels delete#43

Merged
wzrdx merged 1 commit intodevelopfrom
tunnel-delete-confirm
Jan 9, 2026
Merged

feat: message on active tunnels delete#43
wzrdx merged 1 commit intodevelopfrom
tunnel-delete-confirm

Conversation

@aledefra
Copy link
Collaborator

@aledefra aledefra commented Jan 9, 2026

No description provided.

Copilot AI review requested due to automatic review settings January 9, 2026 10:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds a warning message to tunnel deletion confirmation dialogs to alert users when they are about to delete an active (healthy) tunnel. The warning emphasizes that deleting an active tunnel will immediately stop all traffic routed through it.

Key Changes:

  • Added conditional warning messages to both tunnel deletion confirmation dialogs
  • Warning is displayed in red text when tunnel status is 'healthy'

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/components/tunnels/TunnelCard.tsx Added warning message to the delete confirmation dialog for tunnels with 'healthy' status
app/(protected)/tunnels/[id]/page.tsx Added warning message to the delete confirmation dialog on the tunnel detail page for tunnels with 'healthy' status

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +34 to +38
{tunnel.status === 'healthy' && (
<div className="text-sm text-red-500">
Warning: Deleting an active tunnel will immediately stop all traffic routed through it.
</div>
)}
Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

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

The warning refers to "an active tunnel" but only checks for 'healthy' status. According to the Tunnel type definition, there are four statuses: 'inactive', 'degraded', 'healthy', and 'down'. A 'degraded' tunnel may still be routing traffic and could be considered "active". Consider either:

  1. Including 'degraded' status in the condition: (tunnel.status === 'healthy' || tunnel.status === 'degraded')
  2. Or clarify the message to be more specific, e.g., "Deleting a healthy tunnel will immediately stop all traffic routed through it."

Copilot uses AI. Check for mistakes.
Comment on lines +104 to +108
{tunnel.status === 'healthy' && (
<div className="text-sm text-red-500">
Warning: Deleting an active tunnel will immediately stop all traffic routed through it.
</div>
)}
Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

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

The warning refers to "an active tunnel" but only checks for 'healthy' status. According to the Tunnel type definition, there are four statuses: 'inactive', 'degraded', 'healthy', and 'down'. A 'degraded' tunnel may still be routing traffic and could be considered "active". Consider either:

  1. Including 'degraded' status in the condition: (tunnel.status === 'healthy' || tunnel.status === 'degraded')
  2. Or clarify the message to be more specific, e.g., "Deleting a healthy tunnel will immediately stop all traffic routed through it."

Copilot uses AI. Check for mistakes.
@wzrdx wzrdx merged commit c2043a4 into develop Jan 9, 2026
7 checks passed
@aledefra aledefra deleted the tunnel-delete-confirm branch January 9, 2026 13:55
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.

3 participants