feat(sessions): add confirmation dialog before deleting active sessions

Active Sessions now show inline confirm/cancel buttons before deletion,
matching the Recent Sessions UX pattern.
This commit is contained in:
Fusion
2026-05-20 15:14:15 +02:00
parent a10029f36c
commit 294d02f9fb
+20 -1
View File
@@ -300,8 +300,10 @@ export const SessionsPage = () => {
<Icon name="stop" size="sm" /> <Icon name="stop" size="sm" />
Stop Stop
</button> </button>
{deleteConfirmId === session.id ? (
<div className="delete-confirm-inline">
<button <button
className="ghost-button small danger-text" className="danger-button small"
onClick={() => onClick={() =>
void handleDelete( void handleDelete(
session.id, session.id,
@@ -310,9 +312,26 @@ export const SessionsPage = () => {
) )
} }
type="button" type="button"
>
Delete
</button>
<button
className="ghost-button small"
onClick={() => setDeleteConfirmId(null)}
type="button"
>
Cancel
</button>
</div>
) : (
<button
className="ghost-button small danger-text"
onClick={() => setDeleteConfirmId(session.id)}
type="button"
> >
<Icon name="delete" size="sm" /> <Icon name="delete" size="sm" />
</button> </button>
)}
</div> </div>
</div> </div>
))} ))}