Repository navigation
fix(skills): stop a project's own skill copy driving global freshness - #11474
Conversation
A pristine global install plus a drifted copy inside a work directory showed Settings -> Computer Use as amber "Needs attention", with the copy labelled "may be modified ... Remove it if you want Orca to update this skill", while the same page said "Computer Use is ready" and the update command correctly printed "All global skills are up to date". No user action could clear it. Orca's updater only ever passes --global, so a copy a project owns has no remedy by design. Two defects made it drive the global verdict anyway: - locationChip tested byte status before topology, so an unrecognized repo-scope placement returned early and never reached its 'in-a-repo' case. Because SKIPPED_REASON_PRIORITY ranks unrecognized above in-a-repo, the summary sentence was wrong too. - isSkillCopyNeedingAttention excepted plugin-cache but not repo-scope. Stated by scope rather than by byte status: an outdated or unreadable project copy is as far outside the global updater's reach as an unrecognized one, so pinning only the reported status would leave the same bug reachable through another. Chip precedence is now explicit -- a read failure outranks ownership so that rule cannot hide a real fault, and ownership outranks byte status. Ownership suppresses the group, never a location's visibility: a project copy is still listed whenever another placement earns the row. The badge predicate deliberately omits the shared helper's outdated carve-out, so a non-eligible outdated copy stays amber. Collapsing the two into one predicate would flip that to green while the dialog still shows its reinstall row, so the distinction is preserved and pinned by a regression guard. Eligibility needed no change: it already filters to convergent placements.
📝 WalkthroughWalkthroughThe change adds shared predicates for identifying owner-managed skill scopes and global freshness participation. Grouping, display-status, and nudge logic now ignore project-owned placements for global freshness while preserving them in qualifying groups. Chip precedence and skipped-reason selection account for participating locations. Tests cover project-only and mixed placements, display badges, nudge dismissal keys, skipped-location explanations, and dialog row visibility. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/shared/skill-freshness.ts (1)
89-112: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCondense the new rationale comments.
src/shared/skill-freshness.ts#L89-L112: reduce ownership and participation rationale to concise one-line invariants.src/renderer/src/components/skills/skill-freshness-grouping.ts#L34-L41: summarize chip precedence without narrating each branch.src/renderer/src/components/skills/skill-freshness-grouping.ts#L106-L110: state only that repo-scoped placements cannot qualify a group.src/renderer/src/lib/skill-freshness-display-status.ts#L27-L30: state only that repo-scoped placements do not affect global status.Suggested wording
-// Why: Orca's updater only ever passes --global, so a copy a project owns is not -// something Orca can act on — it has no remedy by design. Reporting it as global drift -// produced an amber badge no user action could clear, over a copy their own repo -// legitimately owns. +// Repo-scoped placements do not participate in global freshness. -// Precedence is explicit because one chip stands for two dimensions — who owns the copy, -// and what its bytes look like: -// 1. a read failure always reports the read failure, whoever owns the copy -// 2. an owner-managed scope outranks byte status, because the owner's content is not -// the user's drift and Orca's global update never reaches it -// 3. byte status last +// Prefer read failures, then owner-managed scope, then byte status.As per coding guidelines, “Comments must be concise, limited to non-obvious information, and preferably one line.”
Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 7eae0f13-2d0c-4061-b555-c876c472f610
📒 Files selected for processing (6)
src/renderer/src/components/skills/SkillFreshnessUpdateDialog.test.tsxsrc/renderer/src/components/skills/skill-freshness-grouping.test.tssrc/renderer/src/components/skills/skill-freshness-grouping.tssrc/renderer/src/lib/skill-freshness-display-status.test.tssrc/renderer/src/lib/skill-freshness-display-status.tssrc/shared/skill-freshness.ts
Greptile SummaryThis PR fixes an amber "Needs attention" badge that could not be cleared: a project-owned
Confidence Score: 5/5Safe to merge — narrowly scoped to read-path display logic with no new writes, schema mutations, or IPC surface. Every decision point is threaded through the same predicate so the invariant cannot silently break in one place while holding elsewhere. The intentional plugin-cache asymmetry is documented and backed by a regression guard. The test suite includes non-vacuous cases that fail with the fix disabled. Files Needing Attention: No files require special attention.
|
| Filename | Overview |
|---|---|
| src/shared/skill-freshness.ts | Adds isOwnerManagedSkillScope and skillPlacementParticipatesInGlobalFreshness; prepends participation guard to isSkillCopyNeedingAttention. |
| src/renderer/src/lib/skill-freshness-display-status.ts | Threads participation filter through both status and attention helpers. |
| src/renderer/src/components/skills/skill-freshness-grouping.ts | Refactors locationChip precedence; filters non-participating placements from group-inclusion; adds participatesInGlobalFreshness to location rows. |
| src/renderer/src/components/skills/skill-freshness-skipped-reason.ts | blockingChip prefers judged locations; falls back to full list when all are project-owned. |
| src/renderer/src/components/skills/SkillFreshnessNudge.tsx | Excludes project-owned copies from nudge dismissal fingerprint. |
Reviews (3): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile
Review follow-up. The chip and the group no longer treat a project-owned copy as global drift, but three surfaces still read it as one: - skippedReason derived its one sentence from the highest-priority chip among a group's locations, with 'in-a-repo' ranked above 'duplicate', 'external-link', 'broken-link' and above the no-chip case that hands over the reinstall command. A repo-scope copy can no longer earn a group, so whenever it won it explained a skip it had no part in — and swallowed the one runnable remedy. SkillLocationRow now carries whether the update judged it, and only judged rows explain. That also covers the scan-limit sentinel, which is repo-scope and chips 'inaccessible'. - hasSkillCopyNeedingAttention counted project copies as the presence that makes a plugin-cache read failure a skill's problem, while the status function skipped them — the disagreement the two exist to prevent. - The nudge mixed project copies into its dismissal fingerprint, so re-checking out a repo re-raised a nudge the user had already dismissed. plugin-cache is untouched: it stays on the judged side everywhere, because updating the plugin is a remedy a project copy does not have.
…po-scope-not-global-freshness
…stablyai#11474) * fix(skills): stop a project's own skill copy driving global freshness A pristine global install plus a drifted copy inside a work directory showed Settings -> Computer Use as amber "Needs attention", with the copy labelled "may be modified ... Remove it if you want Orca to update this skill", while the same page said "Computer Use is ready" and the update command correctly printed "All global skills are up to date". No user action could clear it. Orca's updater only ever passes --global, so a copy a project owns has no remedy by design. Two defects made it drive the global verdict anyway: - locationChip tested byte status before topology, so an unrecognized repo-scope placement returned early and never reached its 'in-a-repo' case. Because SKIPPED_REASON_PRIORITY ranks unrecognized above in-a-repo, the summary sentence was wrong too. - isSkillCopyNeedingAttention excepted plugin-cache but not repo-scope. Stated by scope rather than by byte status: an outdated or unreadable project copy is as far outside the global updater's reach as an unrecognized one, so pinning only the reported status would leave the same bug reachable through another. Chip precedence is now explicit -- a read failure outranks ownership so that rule cannot hide a real fault, and ownership outranks byte status. Ownership suppresses the group, never a location's visibility: a project copy is still listed whenever another placement earns the row. The badge predicate deliberately omits the shared helper's outdated carve-out, so a non-eligible outdated copy stays amber. Collapsing the two into one predicate would flip that to green while the dialog still shows its reinstall row, so the distinction is preserved and pinned by a regression guard. Eligibility needed no change: it already filters to convergent placements. * fix(skills): keep a project copy from explaining a global skill's skip Review follow-up. The chip and the group no longer treat a project-owned copy as global drift, but three surfaces still read it as one: - skippedReason derived its one sentence from the highest-priority chip among a group's locations, with 'in-a-repo' ranked above 'duplicate', 'external-link', 'broken-link' and above the no-chip case that hands over the reinstall command. A repo-scope copy can no longer earn a group, so whenever it won it explained a skip it had no part in — and swallowed the one runnable remedy. SkillLocationRow now carries whether the update judged it, and only judged rows explain. That also covers the scan-limit sentinel, which is repo-scope and chips 'inaccessible'. - hasSkillCopyNeedingAttention counted project copies as the presence that makes a plugin-cache read failure a skill's problem, while the status function skipped them — the disagreement the two exist to prevent. - The nudge mixed project copies into its dismissal fingerprint, so re-checking out a repo re-raised a nudge the user had already dismissed. plugin-cache is untouched: it stays on the judged side everywhere, because updating the plugin is a remedy a project copy does not have.
Fixes a user report: Settings → Computer Use showed amber "Needs attention" that no
action could clear, while the same page said "Computer Use is ready" and
npx skills update computer-use --globalcorrectly printed "All global skills are up todate."
Cause
The reporter's global install was pristine — one
SKILL.md, mode644, hash matching thebundled manifest, lock hash equal to the current source tree. The amber came entirely from
a project-scoped copy in one of their work directories:
Orca's updater only ever passes
--global, so a copy a project owns has no remedy bydesign. Two defects let it drive the global verdict anyway:
locationChiptested byte status before topology, so anunrecognizedrepo-scopeplacement returned early and never reached its
'in-a-repo'case. SinceSKIPPED_REASON_PRIORITYranksunrecognizedabovein-a-repo, the summary sentencewas wrong too — it told the user to remove a copy their own repo owns.
isSkillCopyNeedingAttentionexceptedplugin-cachebut notrepo-scope.This also explains why only
computer-usewas affected: it was the only skill with adrifted project copy. Nothing about the skill itself.
Change
Stated by scope, not by byte status — an outdated or unreadable project copy is as far
outside the global updater's reach as an unrecognized one, so pinning only the reported
status would leave the same bug reachable through another.
Chip precedence is now explicit, because one chip stands for two dimensions:
Keeping 1 above 2 stops the new rule hiding a genuine read failure.
Ownership suppresses the group, never a location's visibility — a project copy is still
listed whenever another placement earns the row.
What is deliberately preserved
The badge predicate omits the shared helper's
outdatedcarve-out on purpose: with theeligibleUpdateNamesearly return, a non-eligible outdated copy is amber, and the codeexplains why ("no eligible update is not proof a copy is fine"). Collapsing the two
predicates into one would flip that to green while the dialog still shows its reinstall
row — manufacturing exactly the badge/dialog contradiction #11128 fixed. The distinction is
preserved and pinned by a regression guard.
plugin-cachekeeps its existing narrower exception, unchanged. Eligibility needed nochange at all: it already filters to convergent placements, so a project copy could never
affect it.
Verification
up-to-dateinstalledupdate-availablein-a-reporowneeds-attention(unchanged)src/main/skills/,src/renderer/src/lib/, and the skills andsettings component suites. Typecheck and
pnpm lintgreen.The non-eligible-outdated guard passes both ways, which is what proves that behavior is
untouched.
repo-scopenow usesread-only, since aproject copy correctly raises no row — its assertion about reason placement is preserved.
Scope
This fixes the reported cause. A genuinely modified or foreign global copy still reads
unrecognizedwith a dead-end remedy; that needs the neutral-unknown state, trackedseparately along with a workspace-readiness surface for project copies that may shadow the
global skill.
Manual validation (Electron, real app)
Isolated
HOMEreproducing the reporter's exact configuration: a pristine global copy(
SKILL.mdmode 644, git tree sha2072384f…matching the bundled manifest exactly),provider symlinks from
.claude/.grok, a real v3 updater lock, plus a driftedproject-scoped copy inside a registered repo.
Both runs were confirmed to see the same two placements before the UI was read, so the
build is the only variable:
Before (
origin/main) — amberReview skillon both the nav item and the skill card,plus a ⚠ Details link, over a global copy that is byte-perfect:
After (this branch) — green
Up to date, no nav badge, no Details link:The project copy is still discovered and still listed; it simply no longer decides the
global verdict. The nav label is
Review skillrather thanNeeds attentionbecause#11413 renamed that state.
The permissions warning in both shots is the isolated dev
HOMElacking the Computer Usehelper app — unrelated to the badge under test, and identical on both sides.