Repository navigation
refactor: fix bugs, remove dead code, improve architecture - #1
Merged
Merged
Conversation
Bugs fixed: - detectAgentLinks had wrong paths for Cline (.agents/skills → .cline/skills) and Warp (.agents/skills → .warp/skills), and was missing 5 agents entirely. Refactored to derive paths from allAgents (single source of truth), store agent IDs instead of display names, and cover all 20 supported agents. - addSkill/removeSkill never checked process.terminationStatus, so failed installs/removals were silently swallowed. Both now throw CommandError on non-zero exit. - AddSkillSheet read manager.errorMessage to detect success/failure — fragile shared state. Now catches errors thrown directly from addSkill. Dead code removed: - swift-markdown dependency declared in Package.swift but never imported; markdown rendering uses SwiftUI's built-in AttributedString(markdown:). Removing it cuts ~35s from clean builds. - checkForUpdates() was never called from any view. - expandedSources state in SkillsSidebar was never read or written. - groupedBySource on SkillsManager was unused (SkillsSidebar reimplemented it). - MarketplaceSkill.installCommand and .authorAvatar were never used. Architecture improvements: - skillIcon/skillColor logic was duplicated across SkillRow and SkillDetailView; consolidated onto Skill model. skillColor moved to Skill+UI.swift extension so Skill.swift stays Foundation-only. - Skill.body stored at load time; SkillDetailView no longer re-parses SKILL.md frontmatter on every render. - Skill.agents now stores agent IDs; display names resolved via allAgents. AddToAgentsSheet compares agent.id instead of agent.name. - MarketplaceView search state replaced three booleans (isSearching, hasSearched, errorMessage) with a SearchState enum. - Remove errors and marketplace install errors now surface to the user via alerts instead of being silently dropped. - Added CLAUDE.md with build commands and architecture overview. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
detectAgentLinkshad wrong paths for Cline and Warp (both mapped to.agents/skills) and was missing 5 agents entirely; refactored to derive fromallAgentsand store agent IDs.addSkill/removeSkillnever checkedprocess.terminationStatus, silently dropping failures.AddSkillSheetread sharedmanager.errorMessageto detect success — replaced with properthrows.swift-markdowndependency (never imported — cuts ~35s from clean builds),checkForUpdates()(never called),expandedSourcesstate,groupedBySourceproperty,MarketplaceSkill.installCommandand.authorAvatar.skillIcon/skillColorif-chains ontoSkillmodel (skillColorin aSkill+UI.swiftextension to keepSkill.swiftFoundation-only).Skill.bodystored at scan time to avoid re-parsing on every render.MarketplaceViewsearch state replaced 3 booleans with aSearchStateenum. Remove and install errors now surface via alerts. AddedCLAUDE.md.Test plan
swift build🤖 Generated with Claude Code