Repository navigation
fix(settings): reserve skill badges for attention - #11413
Conversation
Greptile SummaryThis PR tightens the Settings sidebar by hiding non-actionable skill status badges (installed, up-to-date, checking, not-installed) and surfacing only the two states that require user action:
Confidence Score: 5/5Safe to merge — renderer-only presentation filtering with no data, IPC, or state changes. The change is purely UI: it filters which status badges appear in the sidebar and updates a single copy string. The type narrowing via VisibleInstallStatus is sound, the switch is exhaustive, typecheck and localization checks passed, and the tests explicitly cover every hidden state (install, installed, up-to-date, checking) and both visible states (update-available, needs-attention). No business logic, data paths, or security-sensitive code is touched. Files Needing Attention: No files require special attention.
|
| Filename | Overview |
|---|---|
| src/renderer/src/components/settings/SettingsSidebar.tsx | Adds VisibleInstallStatus type + isVisibleInstallStatus guard to hide non-actionable badges; narrows installStatusLabel to only amber attention states; simplifies installStatusClassName from a per-status function to a constant string. |
| src/renderer/src/components/skills/SkillFreshnessStatusPill.tsx | Single label change: "Needs attention" → "Review skill" for the needs-attention status pill; no logic changes. |
| src/renderer/src/components/settings/SettingsSidebar.test.tsx | Adds checking and needs-attention fixture entries; updates test to assert all hidden statuses (install, installed, up-to-date, checking) are absent and both actionable labels (Update available, Review skill) are present, while Optional badge is preserved. |
| src/renderer/src/components/skills/SkillFreshnessStatusPill.test.tsx | Single assertion updated to match the new "Review skill" copy for the needs-attention state. |
| src/renderer/src/i18n/locales/en.json | Updates needsAttention translation key from "Needs attention" to "Review skill" in the English canonical locale. |
| src/renderer/src/i18n/locales/es.json | Updates needsAttention value from "Needs attention" to "Review skill" — both are English; this key was already untranslated before this PR, so no regression. |
| src/renderer/src/i18n/locales/ja.json | Same untranslated English fallback update as es.json (Needs attention → Review skill). |
| src/renderer/src/i18n/locales/ko.json | Same untranslated English fallback update as es.json (Needs attention → Review skill). |
| src/renderer/src/i18n/locales/zh.json | Same untranslated English fallback update as es.json (Needs attention → Review skill). |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[section.installStatus] --> B{isVisibleInstallStatus?}
B -- "update-available\nneeds-attention" --> C[Show amber badge]
C --> D{"update-available?"}
D -- yes --> E["'Update available'"]
D -- no --> F["'Review skill'"]
B -- "install / installed\nup-to-date / checking\nundefined" --> G{section.badge?}
G -- yes --> H["Show static badge\n(e.g. 'Optional')"]
G -- no --> I[No badge rendered]
Reviews (2): Last reviewed commit: "test(settings): cover hidden checking ba..." | Re-trigger Greptile
📝 WalkthroughWalkthrough
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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/renderer/src/components/settings/SettingsSidebar.test.tsx (1)
141-148: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueTest doesn't exercise the
checkinghidden state.The new test covers
install/installed/up-to-date(hidden) andupdate-available/needs-attention(visible), but notchecking, whichisVisibleInstallStatusalso hides. Coverage for the other three hidden statuses already exercises the same code path, so this is a minor gap.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 447e3934-6472-4627-8910-384adad71ef7
📒 Files selected for processing (9)
src/renderer/src/components/settings/SettingsSidebar.test.tsxsrc/renderer/src/components/settings/SettingsSidebar.tsxsrc/renderer/src/components/skills/SkillFreshnessStatusPill.test.tsxsrc/renderer/src/components/skills/SkillFreshnessStatusPill.tsxsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.json
* fix(settings): reserve skill badges for attention * test(settings): cover hidden checking badge
Summary
Update availablewhen Orca can update the skill andReview skillwhen a copy needs manual attention.Screenshots
Healthy, loading, and not-installed skill rows stay quiet; the unrelated Optional account badge remains. Verified in the live Electron build in both dark and light themes.
Dark theme:
Light theme:
Testing
pnpm lintpnpm typecheckpnpm testpnpm buildFocused validation:
pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/settings/SettingsSidebar.test.tsx src/renderer/src/components/skills/SkillFreshnessStatusPill.test.tsx— 11 passedpnpm run typecheck:web— passedoxlintand React Doctor — passedpnpm run verify:localization-catalog— passedpnpm run verify:localization-coverage— passedpnpm run check:max-lines-ratchet— passedAI Review Report
Reviewed the status filtering and copy against the freshness-state contract introduced in #10436. The main risks checked were accidentally hiding actionable update states, presenting a manual-repair state as an automatic update, and suppressing unrelated static badges. The implementation narrows visible install statuses to
update-availableandneeds-attention; tests cover hidden healthy/presence states, both visible attention states, and the preserved Optional badge.Cross-platform compatibility was explicitly reviewed for macOS, Linux, and Windows. This is renderer-only status presentation: it changes no shortcuts or shortcut labels, paths, shell behavior, Electron APIs, Git commands, host routing, SSH behavior, or folder-workspace behavior.
Security Audit
No new input handling, command execution, path handling, authentication, secrets, dependencies, IPC, network access, or persisted state. The change only filters already-derived status values and updates localized display copy. No security follow-up is needed.
Notes
Review skillintentionally remains distinct fromUpdate available: the former can represent stale duplicates, edited copies, inaccessible paths, or other conditions Orca's updater cannot safely resolve.