feat: always show Recreate Tunnel button for web instances
Show the Recreate Tunnel button on all active web-enabled session cards (instead of only when tunnel_status is unreachable) so users can manually trigger tunnel recreation at any time. Also adds it to the mobile action sheet. Quality gates: eslint clean, tsc clean
This commit is contained in:
@@ -1723,15 +1723,23 @@ async def start_instance(
|
||||
logger.debug("Container ID for instance %s: %s", instance.id, container_id)
|
||||
|
||||
instance.container_name = expected_container_name
|
||||
logger.debug("Container name for instance %s: %s", instance.id, expected_container_name)
|
||||
logger.debug(
|
||||
"Container name for instance %s: %s", instance.id, expected_container_name
|
||||
)
|
||||
|
||||
# Connect container to backend network so API can reach it
|
||||
logger.debug("Connecting container %s to backend network...", expected_container_name)
|
||||
logger.debug(
|
||||
"Connecting container %s to backend network...", expected_container_name
|
||||
)
|
||||
connected = connect_container_to_network(expected_container_name, "backend")
|
||||
if connected:
|
||||
logger.debug("Successfully connected %s to backend network", expected_container_name)
|
||||
logger.debug(
|
||||
"Successfully connected %s to backend network", expected_container_name
|
||||
)
|
||||
else:
|
||||
logger.warning("Failed to connect %s to backend network", expected_container_name)
|
||||
logger.warning(
|
||||
"Failed to connect %s to backend network", expected_container_name
|
||||
)
|
||||
|
||||
# Verify container reached running state
|
||||
if instance.container_id:
|
||||
|
||||
@@ -229,12 +229,13 @@ export function SessionCard({
|
||||
</button>
|
||||
)}
|
||||
|
||||
{hasTunnelError && onRecreateTunnel && (
|
||||
{!isTerminalOnly && onRecreateTunnel && (
|
||||
<button
|
||||
className="secondary-button small"
|
||||
className="ghost-button small"
|
||||
onClick={() => onRecreateTunnel(session)}
|
||||
type="button"
|
||||
disabled={isBusy}
|
||||
title="Recreate Cloudflare tunnel"
|
||||
>
|
||||
<Icon name="refresh" size="sm" />
|
||||
<span className="action-label">Tunnel</span>
|
||||
@@ -323,7 +324,7 @@ export function SessionCard({
|
||||
onClose={() => setShowActionSheet(false)}
|
||||
title={session.display_name}
|
||||
actions={[
|
||||
...(isActive && hasTunnelError && onRecreateTunnel
|
||||
...(isActive && !isTerminalOnly && onRecreateTunnel
|
||||
? [
|
||||
{
|
||||
id: "tunnel",
|
||||
@@ -332,7 +333,7 @@ export function SessionCard({
|
||||
onClick: () => onRecreateTunnel(session),
|
||||
},
|
||||
]
|
||||
: []),
|
||||
: []),
|
||||
...(isActive && onStop
|
||||
? [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user