fix(skills): narrow skipped freshness reasons

This commit is contained in:
Brennan Benson
2026-07-16 15:13:51 -07:00
parent c0b046ce24
commit 84da2ec29c
@@ -85,7 +85,11 @@ function chipTooltip(chip: SkillLocationChip): string {
// Why: a skill is skipped for one concrete reason; lead with the highest-priority
// blocking placement so the sentence explains the real cause (an edited copy is
// more useful to surface than a downstream symptom).
const SKIPPED_REASON_PRIORITY: SkillLocationChip[] = [
// Why: current and duplicate copies do not block the canonical update, so they
// must never become the explanation for a skipped skill.
type SkippedReasonChip = Exclude<SkillLocationChip, 'current' | 'duplicate'>
const SKIPPED_REASON_PRIORITY: SkippedReasonChip[] = [
'unrecognized',
'read-only',
'inaccessible',
@@ -134,7 +138,7 @@ function skippedReason(locations: readonly SkillLocationRow[]): string {
'auto.components.skills.SkillFreshnessRow.skippedReasonBrokenLink',
'This copy is a shortcut to something that no longer exists, so Orca left it out — you can safely delete it.'
)
default:
case undefined:
return translate(
'auto.components.skills.SkillFreshnessRow.cantUpdateReason',
'Orca left this skill out of the update command.'