feat(notes): surface GitHub auth-expired state on freshness badge

Show a cloud-lock badge with a re-sign-in tooltip when the freshness
check resolves to unauthorized, and toast on badge click so the user
gets explicit feedback instead of a silent retry-loop.
This commit is contained in:
Julien Calixte
2026-05-17 21:10:26 +02:00
parent 151a4d9137
commit 8a8509a0f3
2 changed files with 34 additions and 0 deletions

View File

@@ -228,6 +228,9 @@ const onBadgeClick = async () => {
try {
if (freshnessStatus.value !== "outdated") {
await checkFreshness()
if (freshnessStatus.value === "unauthorized") {
errorMessage("🔐 GitHub auth expired — please sign in again")
}
return
}
@@ -241,6 +244,10 @@ const onBadgeClick = async () => {
if (newRaw !== null) {
rawContent.value = newRaw
initialRawContent.value = newRaw
return
}
if (freshnessStatus.value === "unauthorized") {
errorMessage("🔐 GitHub auth expired — please sign in again")
}
} catch (error) {
console.error("freshness badge click failed", error)