fix(launcher): prevent unnecessary Tailscale resets and improve launch status

This commit is contained in:
2026-10-12 17:37:19 +09:00
parent 3bf433a129
commit 9bbad61fc5
3 changed files with 16 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "autonomy-studio-launcher", "name": "autonomy-studio-launcher",
"version": "1.1.3", "version": "1.1.4",
"description": "Autonomy Studio v2 Frontend", "description": "Autonomy Studio v2 Frontend",
"main": "./out/main/index.js", "main": "./out/main/index.js",
"author": { "author": {
+1
View File
@@ -355,6 +355,7 @@ body,
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
gap: 7px;
padding: 7px 16px; padding: 7px 16px;
min-width: 78px; min-width: 78px;
background: rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.08);
+14 -2
View File
@@ -273,6 +273,9 @@ function Dashboard({ authSession, onSessionUpdate, onLogout, onSessionExpired }:
return return
} }
const hasAccountIdentity = Boolean(
status?.loginName?.trim() || status?.userName?.trim(),
)
const isSameAccount = Boolean( const isSameAccount = Boolean(
status && status &&
( (
@@ -280,7 +283,7 @@ function Dashboard({ authSession, onSessionUpdate, onLogout, onSessionExpired }:
isSameTailscaleAccount(status.userName, userEmail) isSameTailscaleAccount(status.userName, userEmail)
), ),
) )
if (status?.connected && isSameAccount) { if (status?.connected && (!hasAccountIdentity || isSameAccount)) {
setTailscaleIssue(null) setTailscaleIssue(null)
return return
} }
@@ -315,11 +318,17 @@ function Dashboard({ authSession, onSessionUpdate, onLogout, onSessionExpired }:
return return
} }
const shouldResetSession = Boolean(
status &&
status.backendState !== 'Unavailable' &&
hasAccountIdentity &&
!isSameAccount,
)
const result = await launcherTailscale.login( const result = await launcherTailscale.login(
provision.tailscaleAuthKey, provision.tailscaleAuthKey,
provision.tailscaleLoginServer ?? '', provision.tailscaleLoginServer ?? '',
provision.tailscaleHostname, provision.tailscaleHostname,
Boolean(status && status.backendState !== 'Unavailable' && !isSameAccount), shouldResetSession,
) )
if (!result.ok) { if (!result.ok) {
setTailscaleIssue({ setTailscaleIssue({
@@ -996,6 +1005,9 @@ function Dashboard({ authSession, onSessionUpdate, onLogout, onSessionExpired }:
) : canLaunch ? ( ) : canLaunch ? (
activeAppLaunching ? ( activeAppLaunching ? (
<button className="launch-pending-btn" disabled> <button className="launch-pending-btn" disabled>
<svg aria-hidden="true" className="spin" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.4" strokeLinecap="round">
<path d="M12 2a10 10 0 1 0 10 10" />
</svg>
실행중 실행중
</button> </button>
) : ( ) : (