feat(desktop-client): validate qiehao session via detected account
The 企鹅号 console returns 200 even when the session is silently expired, so probe/silent-refresh/console-open now require detect() to return an account whose identity matches the bound one. Surface a localized "授权已过期" prompt in the renderer when the new desktop_account_session_expired error bubbles up. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -96,6 +96,16 @@ function presentClientError(kind: ClientActionKind, error: unknown): ClientError
|
||||
};
|
||||
}
|
||||
|
||||
if (message.startsWith("desktop_account_session_expired:")) {
|
||||
const platformId = message.split(":")[1] || "当前平台";
|
||||
const platformLabel = platformId === "qiehao" ? "企鹅号" : platformId;
|
||||
return {
|
||||
tone: "warning",
|
||||
title: "授权已过期",
|
||||
content: `${platformLabel} 登录态已失效,请重新授权后再打开工作台。`,
|
||||
};
|
||||
}
|
||||
|
||||
if (message === "desktop_account_delete_failed") {
|
||||
return {
|
||||
tone: "error",
|
||||
|
||||
Reference in New Issue
Block a user