Skip to content

fix(skills): the shadowed badge names its sources, not "[object Object]" (#3135) - #3157

Merged
vybe merged 1 commit into
devfrom
fix/3135-shadowed-tooltip-names
Oct 1, 2026
Merged

vybe merged 1 commit into
devfrom
fix/3135-shadowed-tooltip-names

Conversation

@dolho

@dolho dolho commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Library → Skills: hovering a card's shadowed badge read "Shadowed by: [object Object]", because shadowed_by is a list of {source_id, source_name} objects (db_models.SkillInfo.shadowed_by) and the tooltip joined the objects themselves.
  • It now names each shadowing source, e.g. "Shadowed by: Team catalog, Vendor pack". It falls back to source_id when a name is missing, so it never reads "undefined". This matches LibrarySkillSets.vue and the MCP skills tool.
  • The badge gains data-testid="skill-shadowed-library-<name>", following the deprecated badge next to it.

Changes

Test Plan

  • npx vitest run tests/unit/librarySkillShadowedTooltip.mount.spec.js: 3 passed. It checks that:
    • both sources are named, in order;
    • the id fallback is used, never [object Object] or undefined;
    • an unshadowed skill has no badge.
  • On the unfixed component, 2 of the 3 fail ([object Object]).
  • Full frontend suite: 245 files, 4,497 tests. check-design-tokens: OK. npm run build: OK.

Fixes #3135

🤖 Generated with Claude Code

…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>
@dolho dolho added the ui PR touches the frontend UI — triggers Playwright e2e tests label Oct 1, 2026
@dolho

dolho commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

/review report: fix/3135-shadowed-tooltip-names → dev

Files changed: 2 (+89/-1). Scope: CLEAN. Plan completion: 2/2:

  • the tooltip names each source by source_name;
  • a mounted test exists.

Execution coverage

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:54 maps source_name without the source_id fallback (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.

@vybe vybe 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.

merge-train: batch validated on train #3172

@vybe
vybe merged commit 9761f12 into dev Oct 1, 2026
24 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui PR touches the frontend UI — triggers Playwright e2e tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants