Conversation
There was a problem hiding this comment.
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.
| {tunnel.status === 'healthy' && ( | ||
| <div className="text-sm text-red-500"> | ||
| Warning: Deleting an active tunnel will immediately stop all traffic routed through it. | ||
| </div> | ||
| )} |
There was a problem hiding this comment.
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:
- Including 'degraded' status in the condition:
(tunnel.status === 'healthy' || tunnel.status === 'degraded') - Or clarify the message to be more specific, e.g., "Deleting a healthy tunnel will immediately stop all traffic routed through it."
| {tunnel.status === 'healthy' && ( | ||
| <div className="text-sm text-red-500"> | ||
| Warning: Deleting an active tunnel will immediately stop all traffic routed through it. | ||
| </div> | ||
| )} |
There was a problem hiding this comment.
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:
- Including 'degraded' status in the condition:
(tunnel.status === 'healthy' || tunnel.status === 'degraded') - Or clarify the message to be more specific, e.g., "Deleting a healthy tunnel will immediately stop all traffic routed through it."
No description provided.