Repository navigation
fix(skills): tell the user how to fix a skill the updater cannot converge - #11129
Conversation
…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 SummaryThis PR improves the UI message shown when
Confidence Score: 5/5Safe 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.
|
| 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
fbd4572
into
brennanb2025/skills-dialog-agrees-with-badge
…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).
…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).
Problem
A skill the update command provably cannot move shows one sentence:
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
undefinedfallback inskippedReason, reached when no location carries a chip. Working through it exhaustively, a chip-less blocked row means every placement is acanonical-copy/provider-aliasthat isoutdated— 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 updatedecides 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: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 ownNewerchip and its own sentence ("Updating Orca will bring the two back in line"), ranked above the record advice.newer-knownis currently unreachable —generate-skill-bundle-manifest.mjsalways 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-linearat revision 7 with the lock naming revision 8's tree, same fororchestration): both rows now carry the cause and their ownnpx skills add … --skill <name> --global.New keys added via
pnpm run sync:localization-catalog; present in all 5 catalogs,verify:localization-catalogandverify:localization-coverageboth 0.pnpm run tc0 ·oxlint0 · 6729 tests pass.Mutation testing
hands over the reinstall command…failsnewer-knownfalls through to a bare chipmaps every topology to a chipfailsnewerdropped from the reason priority listnever offers the reinstall for a copy that is aheadfailsFollow-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.