Skip to content

fix(skills): stop the skill review dialog contradicting the badge that opens it - #11128

Merged
brennanb2025 merged 2 commits into
mainfrom
brennanb2025/skills-dialog-agrees-with-badge
Jul 28, 2026
Merged

brennanb2025 merged 2 commits into
mainfrom
brennanb2025/skills-dialog-agrees-with-badge

Conversation

@brennanb2025

Copy link
Copy Markdown
Contributor

Problem

A skill whose only fault is an edited copy or one Orca could not read turns the setup-rail badge amber and offers Details — and Details opens a dialog headlined "All installed Orca skills are up to date." over an empty list.

The badge says something is wrong. The dialog it points at says nothing is, with a green check.

Reproduced live (fixture $HOME with a hand-edited ~/.agents/skills/orchestration/SKILL.md):

Before
Card: amber Needs attention + amber ⚠ Details Dialog: green check, "All installed Orca skills are up to date.", zero rows

Cause

groupSkillFreshness returned only skills with an out-of-date copy (skill-freshness-grouping.ts). unrecognized and inaccessible produced no row, so summarizeInventory fell through to the all-clear headline — while hasSkillCopyNeedingAttention had already turned the badge amber for exactly those states.

Two modules, each internally reasoned, disagreeing about what counts.

Fix

Include a skill when a copy needs attention as well as when one is out of date, driven by a single shared predicate isSkillCopyNeedingAttention in src/shared/skill-freshness.ts that both the badge and the dialog now call. They cannot drift apart again.

Skills where every copy is current stay omitted, and so does a plugin's own copy of a same-named skill — that is the vendor's, not the user's drift (the #10865 regression).

No new strings. The reached copy (unrecognized, inaccessible chips and the "Some installed Orca skills were left out of the update." headline) already exists.

Verification

Live Electron, isolated profile + fixture $HOME, identity confirmed non-production.

  • Bug reproduced: amber Details → "All installed Orca skills are up to date." + empty list.
  • Fixed: amber Details → "Some installed Orca skills were left out of the update." + orca-linear / orchestration rows badged Skipped with the "doesn't match the official version … Remove it if you want Orca to update this skill." reason.
  • No regression (fix(skills): complete plugin-cache scans without false attention #10865): canonical copy current + a plugin-cache unrecognized copy → card stays green Up to date, no Details, and the dialog lists no row for it.
  • No regression (eligible path): an eligible outdated skill still nudges and the dialog still shows exactly one Update available row.

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

Mutation testing

Mutation Result
grouping ignores needs-attention copies (revert to status === 'outdated') 2 new tests fail
plugin-cache exemption removed from the shared predicate 2 tests fail (grouping + display-status)

…t opens it

A skill whose only fault was an edited copy or one Orca could not read turned the
setup-rail badge amber and offered Details — and Details opened a dialog headlined
"All installed Orca skills are up to date." over an empty list. The badge says
something is wrong, the dialog it points at says nothing is.

The grouping only returned skills with an out-of-date copy, so those two states
produced no row and the summary fell through to the all-clear headline. Include a
skill when a copy needs attention as well, using one shared predicate so the badge
and the dialog cannot disagree again. A plugin's own copy of a same-named skill
stays out: that is the vendor's, not the user's drift.
@coderabbitai

coderabbitai Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2e877ca9-e7f3-4a05-b566-de01eedc58f5

📥 Commits

Reviewing files that changed from the base of the PR and between 6c18333 and c58041f.

📒 Files selected for processing (1)
  • src/renderer/src/lib/skill-freshness-display-status.test.ts

📝 Walkthrough

Walkthrough

Adds a shared isSkillCopyNeedingAttention predicate with exceptions for plugin-cache unrecognized copies and globally supported outdated copies. Reuses the predicate in display-status detection and freshness review grouping. Expands grouping tests for current copies, plugin-managed copies, unfixable conditions, edited canonical copies, and eligible outdated updates.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the bug and fix, but it does not follow the required template sections or testing checklist. Add the required Summary, Screenshots, Testing checklist, AI Review Report, Security Audit, and Notes sections, with the checklist items completed or explained.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main fix: the review dialog now matches the badge state.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/shared/skill-freshness.ts (1)

87-95: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Apply the concise-comment rule consistently.

  • src/shared/skill-freshness.ts#L87-L95: reduce the JSDoc to the essential exception rationale.
  • src/renderer/src/components/skills/skill-freshness-grouping.ts#L63-L71: replace the UI-flow narrative with a short inclusion-rule description.
  • src/renderer/src/components/skills/skill-freshness-grouping.test.ts#L53-L65: remove or reduce comments already expressed by test names and assertions.

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: 98d2ea19-b9bb-4165-8b8d-394e4befc175

📥 Commits

Reviewing files that changed from the base of the PR and between 77d4c64 and 6c18333.

📒 Files selected for processing (4)
  • src/renderer/src/components/skills/skill-freshness-grouping.test.ts
  • src/renderer/src/components/skills/skill-freshness-grouping.ts
  • src/renderer/src/lib/skill-freshness-display-status.ts
  • src/shared/skill-freshness.ts

installation.status === 'outdated'
)
)
placements.some(isSkillCopyNeedingAttention)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Use the shared predicate in display-status calculation too.

getSkillFreshnessDisplayStatus still marks every non-current, non-plugin-cache copy as blocked (Lines 27-32), so a supported-global outdated copy can still return needs-attention despite the new exemption. Replace that inline condition with isSkillCopyNeedingAttention(installation).

Proposed fix
-    if (
-      installation.status !== 'current' &&
-      !(installation.status === 'unrecognized' && installation.topology === 'plugin-cache')
-    ) {
+    if (isSkillCopyNeedingAttention(installation)) {
       hasBlockedCopy = true
     }

Based on PR objectives, badge and dialog behavior must use the shared attention criterion.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
placements.some(isSkillCopyNeedingAttention)
if (isSkillCopyNeedingAttention(installation)) {
hasBlockedCopy = true
}

@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes a badge–dialog contradiction where the setup-rail badge turned amber and offered a Details link, but the dialog it opened reported "All installed Orca skills are up to date" over an empty list. The root cause was that groupSkillFreshness only included skills with outdated copies while hasSkillCopyNeedingAttention (which gates the amber badge) also considered unrecognized and inaccessible copies.

  • Introduces isSkillCopyNeedingAttention in src/shared/skill-freshness.ts as a single authoritative predicate encoding both badge and dialog inclusion rules; hasSkillCopyNeedingAttention and groupSkillFreshness now both call it, eliminating independent drift.
  • groupSkillFreshness filter is extended from status === 'outdated' to outdated || isSkillCopyNeedingAttention, so skills with un-fixable copies (edited, unreadable) appear in the dialog that the amber badge points to; plugin-cache vendor copies remain correctly excluded.
  • New tests directly guard the plugin-cache exemption, the newly visible rows, and the "no amber on routine updates" requirement.

Confidence Score: 5/5

Safe to merge — the change is a targeted extraction of an existing inline predicate into a shared function, with both call sites updated to use it identically to before.

Clean extraction of an existing inline predicate into a shared function; both call sites updated identically; plugin-cache exemption preserved in the shared predicate and directly tested; new tests cover the corrected path and regression guard.

Files Needing Attention: No files require special attention.

Important Files Changed

Filename Overview
src/shared/skill-freshness.ts Adds isSkillCopyNeedingAttention as the single shared predicate for badge/dialog agreement — logic is a clean extraction of the existing inline condition from hasSkillCopyNeedingAttention.
src/renderer/src/lib/skill-freshness-display-status.ts Replaces the duplicated inline predicate in hasSkillCopyNeedingAttention with a call to isSkillCopyNeedingAttention; semantics are unchanged and the import of SUPPORTED_GLOBAL_SKILL_TOPOLOGIES is correctly removed.
src/renderer/src/components/skills/skill-freshness-grouping.ts Extends groupSkillFreshness filter to include skills with needs-attention copies (unrecognized/inaccessible), fixing the badge–dialog contradiction; retains the explicit outdated check so canonical/provider-alias out-of-date copies still appear.
src/renderer/src/lib/skill-freshness-display-status.test.ts Adds a new test ensuring hasSkillCopyNeedingAttention returns false for a routine eligible-outdated copy, directly guarding the no-cry-wolf requirement.
src/renderer/src/components/skills/skill-freshness-grouping.test.ts Splits the old hiding test into three focused cases covering the plugin-cache exemption, the now-visible unrecognized/inaccessible rows, and edited canonical copies.

Reviews (1): Last reviewed commit: "test(skills): pin that a routine outdate..." | Re-trigger Greptile

@brennanb2025
brennanb2025 merged commit f790d9c into main Jul 28, 2026
38 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
…t opens it (stablyai#11128)

* fix(skills): stop the skill review dialog contradicting the badge that opens it

A skill whose only fault was an edited copy or one Orca could not read turned the
setup-rail badge amber and offered Details — and Details opened a dialog headlined
"All installed Orca skills are up to date." over an empty list. The badge says
something is wrong, the dialog it points at says nothing is.

The grouping only returned skills with an out-of-date copy, so those two states
produced no row and the summary fell through to the all-clear headline. Include a
skill when a copy needs attention as well, using one shared predicate so the badge
and the dialog cannot disagree again. A plugin's own copy of a same-named skill
stays out: that is the vendor's, not the user's drift.

* test(skills): pin that a routine outdated copy raises no attention marker
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
…t opens it (stablyai#11128)

* fix(skills): stop the skill review dialog contradicting the badge that opens it

A skill whose only fault was an edited copy or one Orca could not read turned the
setup-rail badge amber and offered Details — and Details opened a dialog headlined
"All installed Orca skills are up to date." over an empty list. The badge says
something is wrong, the dialog it points at says nothing is.

The grouping only returned skills with an out-of-date copy, so those two states
produced no row and the summary fell through to the all-clear headline. Include a
skill when a copy needs attention as well, using one shared predicate so the badge
and the dialog cannot disagree again. A plugin's own copy of a same-named skill
stays out: that is the vendor's, not the user's drift.

* test(skills): pin that a routine outdated copy raises no attention marker
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