Fixed banner Docs link to use openExternal IPC like the block variant; restricted hasKeyringFallback to same-host keyring accounts so multi-host users aren't told a fallback exists when none does. Findings addressed: - src/renderer/src/components/github-project/GhAuthErrorHelp.tsx:218-227 — Banner Docs link uses <a target="_blank"> instead of shell IPC - src/main/github/auth-diagnose.ts:121-127 — hasKeyringFallback ignores host, can mislead multi-host users Rebased onto current main to drop unrelated reverts. Co-authored-by: orca-bot <bot@stably.ai>
This commit is contained in:
co-authored by
orca-bot
parent
32b88bcdc5
commit
a3242035c2
@@ -128,8 +128,12 @@ export async function diagnoseGhAuth(): Promise<GhAuthDiagnostic> {
|
||||
? REQUIRED_SCOPES.filter((s) => !active.scopes.includes(s))
|
||||
: [...REQUIRED_SCOPES]
|
||||
// Is there a non-env (keyring) account we could fall back to by unsetting
|
||||
// the env var? Only meaningful if the active account is env-shadowed.
|
||||
const keyringFallback = accounts.find((a) => a.source === 'keyring') ?? null
|
||||
// the env var? Only meaningful if the active account is env-shadowed, and
|
||||
// only if the keyring login is on the SAME host — otherwise unsetting the
|
||||
// env var leaves the user with no credential for the host that was active.
|
||||
const keyringFallback = active
|
||||
? (accounts.find((a) => a.source === 'keyring' && a.host === active.host) ?? null)
|
||||
: null
|
||||
return {
|
||||
ghAvailable,
|
||||
activeAccount: active,
|
||||
|
||||
Reference in New Issue
Block a user