Skip to content

Refactor AgentBoard cleanup tickets#129

Merged
jbcrane13 merged 1 commit into
mainfrom
feat/issues-116-118-126
May 24, 2026
Merged

Refactor AgentBoard cleanup tickets#129
jbcrane13 merged 1 commit into
mainfrom
feat/issues-116-118-126

Conversation

@jbcrane13

Copy link
Copy Markdown
Owner

Summary

  • Unify desktop tab selection on AgentBoardAppModel.selectedDestination and remove DesktopTab
  • Replace work-board NSItemProvider drop delegate with Transferable draggable/dropDestination flow
  • Move nilIfEmpty into shared FoundationExtras
  • Extract ChatEndpointValidator, ChatConversationSyncCoordinator actor, ChatStreamCoordinator, and ChatScreen subviews

Verification

  • swiftlint lint --strict --config .swiftlint.yml
  • xcodebuild test -project AgentBoard.xcodeproj -scheme AgentBoard -destination 'platform=macOS' CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
  • xcodebuild build -project AgentBoard.xcodeproj -scheme AgentBoardMobile -destination 'generic/platform=iOS Simulator' CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
  • xcodebuild build -project AgentBoard.xcodeproj -scheme AgentBoardCompanion -destination 'platform=macOS' CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO

Closes #116
Closes #117
Closes #118
Closes #126

Copilot AI review requested due to automatic review settings May 24, 2026 16:39

Copilot AI 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.

Pull request overview

This PR refactors several “cleanup ticket” items across AgentBoard’s macOS UI, drag-and-drop on the work board, shared Foundation utilities, and Chat architecture to reduce duplication and break up large files/components.

Changes:

  • Unifies desktop tab selection around AgentBoardAppModel.selectedDestination and removes the DesktopTab enum.
  • Migrates Work board drag-and-drop to Transferable + .draggable / .dropDestination, removing the legacy DropDelegate.
  • Extracts chat responsibilities into ChatEndpointValidator, ChatConversationSyncCoordinator, ChatStreamCoordinator, and splits ChatScreen into smaller subviews; consolidates nilIfEmpty into FoundationExtras.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
AgentBoardUI/Screens/WorkScreen.swift Replaces legacy drag/drop delegate with Transferable-based drag/drop.
AgentBoardUI/Screens/ChatScreen.swift Slims the main chat screen and switches foreground handling to async notifications.
AgentBoardUI/Screens/ChatMessageList.swift New extracted message list with .scrollPosition behavior.
AgentBoardUI/Screens/ChatHeader.swift New extracted chat header UI.
AgentBoardUI/Screens/ChatComposeBar.swift New extracted compose UI (status, attachments, slash suggestions, send).
AgentBoardUI/Components/DesktopTab.swift Removes the old desktop-only tab enum.
AgentBoardUI/Components/DesktopSidebar.swift Updates selection/tagging to use AppDestination tabs.
AgentBoardTests/NativeSwiftUIInterfaceTests.swift Adds structural “shape” tests for the refactors (line counts, symbols, etc.).
AgentBoardTests/ChatEndpointValidatorTests.swift Adds unit coverage for endpoint validation behavior.
AgentBoardTests/AccessibilityIdentifierTests.swift Updates identifier assertions to reflect chat view extraction.
AgentBoardCore/Support/FoundationExtras.swift Adds shared String.nilIfEmpty.
AgentBoardCore/Stores/ChatStreamCoordinator.swift New coordinator owning send/stream/upload flow.
AgentBoardCore/Stores/ChatStore+SlashCommands.swift Extracts slash-command handling from ChatStore.
AgentBoardCore/Stores/ChatStore+Internals.swift Extracts persistence and internal helpers from ChatStore.
AgentBoardCore/Stores/ChatStore.swift Refactors store to delegate endpoint validation/sync/streaming to new collaborators.
AgentBoardCore/Stores/ChatConversationSyncCoordinator.swift New actor handling cache + companion sync snapshots and persistence.
AgentBoardCore/Services/HermesGatewayClient.swift Removes duplicated nilIfEmpty extension.
AgentBoardCore/Services/GitHubWorkService.swift Removes duplicated nilIfEmpty extension.
AgentBoardCore/Services/CompanionClient.swift Removes duplicated nilIfEmpty extension and adjusts comment style.
AgentBoardCore/Services/ChatEndpointValidator.swift New extracted endpoint validation and normalization logic.
AgentBoardCore/Persistence/AgentBoardCacheProtocol.swift Marks cache protocol as Sendable for actor usage.
AgentBoardCore/Models/AppDestination.swift Adds desktopTabs helper list.
AgentBoard/DesktopRootView.swift Binds desktop sidebar selection to appModel.selectedDestination (single source of truth).
AgentBoard.xcodeproj/project.pbxproj Wires new files into targets and removes DesktopTab.swift.

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

Comment on lines +61 to 66
private var tabSelection: Binding<AppDestination?> {
Binding {
activeTab
appModel.selectedDestination
} set: { newValue in
activeTab = newValue ?? .work
appModel.selectedDestination = desktopDestination(for: newValue)
activeSessionTerminal = nil
SessionsScreen()
case .settings:
SettingsScreen()
case .chat:
func dropExited(info _: DropInfo) {
draggedItemID = nil
static var transferRepresentation: some TransferRepresentation {
CodableRepresentation(contentType: .plainText)
@jbcrane13 jbcrane13 merged commit e4def26 into main May 24, 2026
4 of 5 checks passed
@jbcrane13 jbcrane13 deleted the feat/issues-116-118-126 branch May 25, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment