fix(dashboard): handle dict-shaped _catalog.json (v4.3+ schema)#7
Merged
Luispitik merged 1 commit intoApr 18, 2026
Merged
Conversation
collect_skills() assumed _catalog.json is a flat list, but v4.3+ uses a dict with globalSkills/librarySkills arrays. Iterating over dict keys yielded strings, causing AttributeError: 'str' object has no attribute 'get' on the first run in any install with the current schema. Now detects both shapes: - dict → sum globalSkills + librarySkills, use real global count - list → legacy fallback (unchanged behavior) Also guards .get() with isinstance check so mixed content never crashes. Reproduced on fresh v4.4.1 install. /dashboard-sinapsis now runs green.
4 tasks
8 tasks
7 tasks
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
collect_skills()incore/_generate-dashboard.pyassumed_catalog.jsonis a flat list, but the v4.3+ schema uses a dict withglobalSkills/librarySkillsarrays. Iterating over a dict yielded its keys (strings), so the very first/dashboard-sinapsisrun on any fresh v4.4.1 install crashes with:Fix
collect_skills()now detects both shapes:globalSkills + librarySkills, derive real global count.get()calls guarded withisinstance(s, dict)so mixed content never crashesReproduction
bash install.sh)python ~/.claude/skills/_generate-dashboard.py→ AttributeErrorTest plan
tests/test-dashboard.sh(I didn't update the fixture — worth confirming the existing 12 tests still pass; the fix is backwards compatible with list-shaped input)Related to #4 (v4.4.0 dashboard introduction). Follows the pattern of #3 (upstream regression sweep).
🤖 Generated with Claude Code