fix: hide a repository's credential line once nothing is held for the repository it names

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C1xHmkxuxYb1GYvth1BS75
This commit is contained in:
hugocasa
2026-09-07 18:59:40 +02:00
co-authored by Claude Fable 5.1
parent d879dc5c6d
commit ddae66ba9f
@@ -191,7 +191,9 @@
*/
const credentialAlert = $derived.by(() => {
const credential = repo.credential
if (!credential) return undefined
// The status describes the repository the resource named when it was
// checked; once nothing is held for the one it names now, it is stale.
if (!credential || !hasManagedCredential) return undefined
if (credential.error) {
return {
type: 'error' as const,
@@ -640,7 +642,7 @@
<Alert type={credentialAlert.type} title={credentialAlert.title} size="xs">
{credentialAlert.body}
</Alert>
{:else if repo.credential && !repo.credential.error}
{:else if hasManagedCredential && repo.credential && !repo.credential.error}
<div class="text-xs text-secondary">
{#if credentialDaysLeft === undefined}
Repository token does not expire.