Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let packageDirectory = URL(fileURLWithPath: #filePath)
let localCodexKitPath = packageDirectory
.appendingPathComponent("dependencies/CodexKit", isDirectory: true)
.path
let codexKitFallbackRevision = "58c2dab605c3dad806e0ac90c6d3d1f67c5fd36d"
let codexKitFallbackRevision = "3f6216c01c91bf14737e6fe40c30efef7a5bbd04"
Comment thread
lynnswap marked this conversation as resolved.
let codexKitDependency: Package.Dependency =
FileManager.default.fileExists(atPath: "\(localCodexKitPath)/Package.swift")
? .package(path: localCodexKitPath)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,7 @@ private final class ReviewMonitorAccountsOutlineView: NSOutlineView {
return
}
beginContextMenuPresentation(with: contextMenu)
contextMenu.update()
presenter(contextMenu)
if isPresentingContextMenu {
endContextMenuPresentation()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import AppKit
import CodexKit
import Foundation
import ObservationBridge
import CodexReviewKit
import SwiftUI
Expand Down Expand Up @@ -276,7 +277,8 @@ final class ReviewMonitorSidebarViewController: NSViewController, NSOutlineViewD

static var defaultCodexSidebarDescriptor: CodexFetchDescriptor<CodexChat> {
CodexFetchDescriptor<CodexChat>(
sortBy: [CodexSortDescriptor(\.recencyAt, order: .reverse)]
predicate: #Predicate<CodexChat> { $0.isArchived == false },
sortBy: [SortDescriptor(\.recencyAt, order: .reverse)]
)
}

Expand Down Expand Up @@ -2170,6 +2172,7 @@ private final class ReviewMonitorSidebarOutlineView: NSOutlineView {
return
}
beginContextMenuPresentation(with: contextMenu)
contextMenu.update()
presenter(contextMenu)
if isPresentingContextMenu {
endContextMenuPresentation()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ struct ReviewMonitorCodexSelectionTitleResolverTests {
id: appThreadID,
workspace: app,
name: "App review",
sourceKind: .subAgentReview,
updatedAt: Date(timeIntervalSince1970: 3_000)
),
.init(
id: "thread-tools",
workspace: tools,
name: "Tools review",
sourceKind: .subAgentReview,
updatedAt: Date(timeIntervalSince1970: 2_000)
),
]
Expand Down Expand Up @@ -66,6 +68,7 @@ struct ReviewMonitorCodexSelectionTitleResolverTests {
id: "thread-repo",
workspace: repo,
name: "Repo review",
sourceKind: .subAgentReview,
updatedAt: Date(timeIntervalSince1970: 1_000)
)
]
Expand Down Expand Up @@ -98,6 +101,7 @@ struct ReviewMonitorCodexSelectionTitleResolverTests {
id: floatingThreadID,
name: "Floating review",
preview: "Uncategorized preview",
sourceKind: .subAgentReview,
updatedAt: Date(timeIntervalSince1970: 1_000)
)
]
Expand Down Expand Up @@ -137,14 +141,20 @@ struct ReviewMonitorCodexSelectionTitleResolverTests {
private func loadReviewChats(in context: CodexModelContext) async throws {
let results = context.fetchedResults(
for: CodexFetchDescriptor<CodexChat>(
predicate: .init(sourceKinds: [.subAgentReview]),
sortBy: [CodexSortDescriptor(\.updatedAt, order: .reverse)]
predicate: sourceKindChatPredicate([.subAgentReview]),
sortBy: [SortDescriptor(\.updatedAt, order: .reverse)]
),
sectionedBy: .workspaceGroup
)
try await results.performFetch()
}

private func sourceKindChatPredicate(_ sourceKinds: [CodexThreadSourceKind]) -> Predicate<CodexChat> {
#Predicate<CodexChat> { chat in
chat.sourceKind != nil && sourceKinds.contains(chat.sourceKind!)
Comment thread
lynnswap marked this conversation as resolved.
}
}

private func workspaceID(for url: URL) -> CodexWorkspaceID {
CodexWorkspaceID(rawValue: url.standardizedFileURL.resolvingSymlinksInPath().path)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ struct ReviewMonitorCodexSidebarResultsTests {

let request = try #require(await runtime.transport.recordedRequests(method: "thread/list").first)
let params = try request.decodeParams(ThreadListParams.self)
#expect(params.archived == false)
#expect(params.sourceKinds == nil)
}

Expand Down Expand Up @@ -1110,6 +1111,7 @@ struct ReviewMonitorCodexSidebarResultsTests {
}

private struct ThreadListParams: Decodable {
var archived: Bool?
var sourceKinds: [String]?
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.