Repository navigation
fix(skills): the shadowed badge names its sources, not "[object Object]" (#3135) - #3157
Merged
Merged
Conversation
…ect]" (#3135) The Library → Skills card's `shadowed` tooltip joined `shadowed_by` directly, but that is a list of `{source_id, source_name}` objects (db_models.SkillInfo.shadowed_by). Hovering it read "Shadowed by: [object Object]" instead of the sources whose copies are unreachable, which is the one fact the badge exists to give (ent#237 AC#4). It now maps each entry to `source_name`, falling back to `source_id` so a nameless source never reads "undefined". This matches LibrarySkillSets and the MCP skills tool. The badge gains `data-testid="skill-shadowed-library-<name>"`, like the deprecated badge beside it. librarySkillShadowedTooltip.mount.spec.js (mounted, #2918) checks that both sources are named in order, that the id fallback works, and that an unshadowed skill has no badge. 2 of its 3 tests fail on the unfixed component. Full frontend suite: 4,497 passed. The design-token check and the build pass. Fixes #3135 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 tasks done
Contributor
Author
/review report:
|
| changed symbol | executed by | live consumer | verdict |
|---|---|---|---|
LibrarySkillsSection.vue shadowed :title |
librarySkillShadowedTooltip.mount.spec.js |
Library → Skills card | ✅ |
Fix mutation: on the unfixed component, 2 of 3 tests are red ([object Object]).
Live check (local dev stack, 2026-10-01, dev + this PR, light and dark)
The instance's library isn't synced, so /api/skills/library was stubbed in the browser with a skill shadowed by two sources; the page itself was real. The badge title read "Shadowed by: Team catalog, Vendor pack" in both themes.
Critical findings
None.
Informational
- [I1] Consistency:
LibrarySkillSets.vue:54mapssource_namewithout thesource_idfallback (confidence 6/10). A nameless source would read "undefined" there. A one-line follow-up, out of this issue's scope.
Clean categories
- XSS: the attribute binding is auto-escaped.
- MCP surface: already maps
source_name.
Summary: Critical 0 · Informational 1 · Scope clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
shadowedbadge read "Shadowed by: [object Object]", becauseshadowed_byis a list of{source_id, source_name}objects (db_models.SkillInfo.shadowed_by) and the tooltip joined the objects themselves.source_idwhen a name is missing, so it never reads "undefined". This matchesLibrarySkillSets.vueand the MCPskillstool.data-testid="skill-shadowed-library-<name>", following thedeprecatedbadge next to it.Changes
src/frontend/src/components/LibrarySkillsSection.vue: the tooltip mapssource_name(fallbacksource_id), plus the test idsrc/frontend/tests/unit/librarySkillShadowedTooltip.mount.spec.js(new, mounted, Safety-critical UI logic keeps landing in the one tier with no executable coverage — and the stated reason is false #2918)Test Plan
npx vitest run tests/unit/librarySkillShadowedTooltip.mount.spec.js: 3 passed. It checks that:[object Object]orundefined;[object Object]).check-design-tokens: OK.npm run build: OK.Fixes #3135
🤖 Generated with Claude Code