-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
AgentsHubView.swift is 785 lines containing:
- The main
AgentsHubViewstruct (~630 lines) AgentsHubTabenumCommandHintBar,PromptListRow,AgentListRow,SwarmListRow,SwarmDiagramView
The main struct has deeply nested computed properties:
promptsContentalone is ~127 lines of nested view code with an inline prompt editor- Three nearly identical list panels (
promptListPanel,agentListPanel,swarmListPanel) that could be a genericListPanel<Item, Row> - Three list row types with identical selection card styling that should be a shared
ViewModifier
Suggested approach
- Extract
promptsContent→PromptEditorView(own file) - Extract
agentsContent→AgentDetailView(own file) - Extract
swarmsContent→SwarmDetailView(own file) - Create a generic
ListPanel<Item, Row>to replace the three identical list panel implementations (~60 lines saved) - Create a
SelectableCardStyleViewModifier for the repeated selection styling pattern:.padding(12) .frame(maxWidth: .infinity, alignment: .leading) .background(isSelected ? Color.accentColor.opacity(0.12) : Color.primary.opacity(0.03)) .clipShape(RoundedRectangle(cornerRadius: 10))
Files
apps/purepoint-macos/purepoint-macos/Views/Agents/AgentsHubView.swift
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request