Skip to content

fix(skills): tell the user how to fix a skill the updater cannot converge - #11129

Merged
brennanb2025 merged 3 commits into
brennanb2025/skills-dialog-agrees-with-badgefrom
brennanb2025/skills-stale-record-remedy
Jul 28, 2026
Merged

brennanb2025 merged 3 commits into
brennanb2025/skills-dialog-agrees-with-badgefrom
brennanb2025/skills-stale-record-remedy

Conversation

@brennanb2025

Copy link
Copy Markdown
Contributor

Stacked on #11128 (same files). Review that one first.

Problem

A skill the update command provably cannot move shows one sentence:

Orca left this skill out of the update command.

No cause, no remedy, nothing to do. It is the message for the only state #11110 exists to create — and #11110's whole point is that no retry converges it.

Cause

That sentence is the undefined fallback in skippedReason, reached when no location carries a chip. Working through it exhaustively, a chip-less blocked row means every placement is a canonical-copy/provider-alias that is outdated — the ordinary case the update would happily write. So the skill is ineligible for exactly one family of reasons, none of which is a placement:

skills update decides what to do by comparing that record against the source and never reads disk. A record that is missing, or that already names the version it was meant to fetch, makes the command print "up to date", exit 0 and write nothing. Only a reinstall rewrites it.

Fix

The fallback now names the cause and hands over the command that actually fixes it, built from the existing buildAgentFeatureSkillInstallCommand — no new command form, no new source-of-truth:

The skills updater has no usable record of this copy, so it reports the skill as already up to date and changes nothing. Reinstall it to bring the record back in line: npx skills add https://github.com/stablyai/orca --skill orchestration --global

One state had to be carved out first. A copy that is ahead of what this build ships (newer-known) also reached the bare chip-less row, where that advice would quietly roll the user back. It now gets its own Newer chip and its own sentence ("Updating Orca will bring the two back in line"), ranked above the record advice.

newer-known is currently unreachable — generate-skill-bundle-manifest.mjs always sets the manifest revision to the newest registry revision. This is guarding the type system's reachable set rather than an observed bug, and it is what makes the reinstall advice provably correct instead of correct-by-invariant.

Verification

Live Electron against the exact #11110 repro (~/.agents/skills/orca-linear at revision 7 with the lock naming revision 8's tree, same for orchestration): both rows now carry the cause and their own npx skills add … --skill <name> --global.

New keys added via pnpm run sync:localization-catalog; present in all 5 catalogs, verify:localization-catalog and verify:localization-coverage both 0.

pnpm run tc 0 · oxlint 0 · 6729 tests pass.

Mutation testing

Mutation Result
fallback reverts to the generic sentence hands over the reinstall command… fails
newer-known falls through to a bare chip maps every topology to a chip fails
newer dropped from the reason priority list never offers the reinstall for a copy that is ahead fails

Follow-up (not in this PR)

The command is selectable text but not copyable in one click. A per-row Copy button would be the natural next step; the dialog already has one in its error block.

…erge

A skill the update command provably cannot move showed one sentence — "Orca left
this skill out of the update command." — which names no cause and no remedy. It is
the message for the only state #11110 exists to create, and it is a dead end.

No location is at fault in that state: the copy is an ordinary out-of-date one the
update would happily write. What is wrong is the updater's own record of it. Since
`skills update` compares that record against the source and never reads disk, a
record that is missing, or that already names the version it was meant to fetch,
makes the command report "up to date" and write nothing. Only a reinstall rewrites
it, so the sentence now hands over that command for the skill in question.

A copy that is *ahead* of this build reached the same bare state, where the new
advice would quietly roll it back. It gets its own chip and sentence instead.
@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown

Greptile Summary

This PR improves the UI message shown when skills update cannot converge a skill due to a stale or missing lock record. Instead of the unhelpful "Orca left this skill out of the update command," the blocked row now shows a concrete reinstall command built from the skill's own name.

  • Stale-record case: skippedReason now accepts an optional skillName parameter; when present (always, from SkillUpdateRow), the undefined-chip fallback produces the actionable reinstall command via buildAgentFeatureSkillInstallCommand rather than a dead-end sentence.
  • newer-known guard: a canonical-copy/provider-alias with status: 'newer-known' now gets a 'newer' chip and its own message ("Updating Orca will bring the two back in line"), ranked above the stale-record branch so reinstall advice is never offered for a copy that is already ahead of the build.
  • All five locale files receive the new chipNewer, tipNewer, skippedReasonNewer, and skippedReasonStaleRecord keys; non-English locales carry English placeholder text consistent with the existing sync pattern.

Confidence Score: 5/5

Safe to merge — the change is isolated to UI copy logic with no data mutations, every new branch is exercised at both unit and integration level, and the 'newer' guard is correctly ordered to prevent reinstall advice from appearing for ahead-of-build copies.

The logic is well-contained: one new switch case, one new chip value, one new optional parameter. Every new branch has a dedicated test, and the integration test in SkillFreshnessUpdateDialog.test.tsx confirms the skill name flows all the way through to the rendered command string.

Files Needing Attention: No files require special attention.

Important Files Changed

Filename Overview
src/renderer/src/components/skills/skill-freshness-skipped-reason.ts Core logic change: adds 'newer' chip case with its own message, and replaces the bare-chip undefined fallback with a context-aware stale-record reinstall command when skillName is available.
src/renderer/src/components/skills/skill-freshness-grouping.ts Adds 'newer' to SkillLocationChip union and returns it from locationChip() for canonical-copy/provider-alias with status 'newer-known', preventing those rows from carrying a bare chip.
src/renderer/src/components/skills/SkillUpdateRow.tsx One-line change: now passes group.name as skillName to skippedReason so the reinstall command can embed the correct skill identifier.
src/renderer/src/components/skills/skill-location-chip-copy.ts Adds label ('Newer') and tooltip copy for the new 'newer' chip; switch exhaustiveness is maintained correctly.
src/renderer/src/components/skills/skill-freshness-skipped-reason.test.ts Renames the old generic fallback test and adds three new targeted tests covering the reinstall command, the newer-copy guard, and the placement-blocker priority.
src/renderer/src/components/skills/SkillFreshnessUpdateDialog.test.tsx Adds an integration-level test that verifies group.name flows through to the rendered reinstall command, guarding against future callers omitting the skillName argument.
src/renderer/src/components/skills/skill-freshness-grouping.test.ts Adds a test asserting chipFor with status 'newer-known' and topology 'canonical-copy' returns 'newer'.
src/renderer/src/i18n/locales/en.json Adds four new i18n keys for the newer chip (chipNewer, tipNewer, skippedReasonNewer, skippedReasonStaleRecord) with correct {{value0}} interpolation placeholder.

Reviews (1): Last reviewed commit: "test(skills): pin the stale-record remed..." | Re-trigger Greptile

@brennanb2025
brennanb2025 merged commit fbd4572 into brennanb2025/skills-dialog-agrees-with-badge Jul 28, 2026
43 of 45 checks passed
brennanb2025 added a commit that referenced this pull request Jul 28, 2026
…erge (#11248)

Re-lands #11129, which was merged into #11128's branch rather than main and
so never reached main. Content is identical to the reviewed and live-QA'd
head ac5ec5b (1775d83 + ac5ec5b, minus the intermediate merge).
zpyoung pushed a commit to zpyoung/orca that referenced this pull request Jul 29, 2026
…erge (stablyai#11248)

Re-lands stablyai#11129, which was merged into stablyai#11128's branch rather than main and
so never reached main. Content is identical to the reviewed and live-QA'd
head ac5ec5b (1775d83 + ac5ec5b, minus the intermediate merge).
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…erge (stablyai#11248)

Re-lands stablyai#11129, which was merged into stablyai#11128's branch rather than main and
so never reached main. Content is identical to the reviewed and live-QA'd
head ac5ec5b (1775d83 + ac5ec5b, minus the intermediate merge).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant