Skip to content

fix: normalize string entries in loadComponents to prevent padEnd crash#273

Merged
avifenesh merged 1 commit intoagent-sh:mainfrom
havok-training:fix/list-padend-crash
Mar 1, 2026
Merged

fix: normalize string entries in loadComponents to prevent padEnd crash#273
avifenesh merged 1 commit intoagent-sh:mainfrom
havok-training:fix/list-padend-crash

Conversation

@havok-training
Copy link
Contributor

Summary

  • agentsys list --all, --agents, --skills, and --commands crash with Cannot read properties of undefined (reading 'padEnd') because loadComponents() returns raw string entries from components.json while the display code expects objects with a .name property
  • Normalizes string entries to {name} objects in loadComponents() so both string and object entries are handled correctly
  • Minimal fix in one place rather than defensive checks scattered across display code

Test plan

  • agentsys list --agents lists all 32 agents without error
  • agentsys list --skills lists all 30 skills without error
  • agentsys list --commands lists all 19 commands without error
  • agentsys list --all shows everything without error
  • All 3659 existing tests pass (88 suites)

`agentsys list` commands crash with "Cannot read properties of undefined
(reading 'padEnd')" because components.json stores entries as plain
strings while the display code expects objects with a .name property.
Normalize string entries to {name} objects when loading from JSON.
@avifenesh avifenesh assigned Copilot, Claude and Codex and unassigned Copilot, Claude and Codex Mar 1, 2026
@avifenesh avifenesh requested a review from Copilot March 1, 2026 00:35

This comment was marked as off-topic.

@avifenesh avifenesh requested a review from Copilot March 1, 2026 00:37

This comment was marked as off-topic.

@avifenesh
Copy link
Collaborator

@codex @claude review this pr

@avifenesh avifenesh requested a review from Copilot March 1, 2026 00:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@avifenesh avifenesh left a comment

Choose a reason for hiding this comment

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

LGTM Thanks! @havok-training

@avifenesh avifenesh merged commit ba4ec8b into agent-sh:main Mar 1, 2026
6 checks passed
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.

6 participants