Add Codex code review logs panel and parser support#404
Add Codex code review logs panel and parser support#404michaeltookes wants to merge 2 commits intosteipete:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ee3ab52fb1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return OpenAIDashboardSnapshot( | ||
| signedInEmail: scrape.signedInEmail, | ||
| codeReviewRemainingPercent: codeReview, | ||
| codeReviewLogs: [], |
There was a problem hiding this comment.
Preserve fetched code review logs in dashboard snapshot
loadLatestDashboard hard-codes codeReviewLogs to an empty array, so the app never persists any logs into openAIDashboard during normal refresh. In this same change, menu visibility for “Open Code Review Logs...” is gated on openAIDashboard.codeReviewLogs being non-empty (StatusItemController+Menu.openAIWebContext), so users with real code review history will never see an entry point to this new panel.
Useful? React with 👍 / 👎.
| self.codeReviewLogsRefreshTask?.cancel() | ||
| self.codeReviewLogsRefreshTask = Task { @MainActor [weak self] in | ||
| guard let self else { return } | ||
| defer { self.codeReviewLogsRefreshTask = nil } |
There was a problem hiding this comment.
Avoid clearing newer refresh task from canceled task defer
This defer clears codeReviewLogsRefreshTask unconditionally, which creates a race when the panel is opened repeatedly: task A is canceled, task B is stored, then task A eventually exits and sets the shared slot to nil while task B is still running. At that point later opens cannot cancel task B, so overlapping fetches can continue and produce stale/out-of-order refresh behavior.
Useful? React with 👍 / 👎.
Summary
This PR adds a dedicated Code Review Logs experience for the Codex provider so users can view and open recent code reviews without leaving the app menu flow.
What changed
Sources/CodexBar/CodeReviewLogsPanelWindowController.swiftSources/CodexBar/StatusItemController+Actions.swiftSources/CodexBar/StatusItemController.swiftSources/CodexBar/StatusItemController+Menu.swiftSources/CodexBarCore/OpenAIDashboardModels.swiftSources/CodexBarCore/OpenAIWeb/OpenAIDashboardFetcher.swiftSources/CodexBarCore/OpenAIWeb/OpenAIDashboardScrapeScript.swiftTests/CodexBarTests/CodeReviewLogsPanelWindowControllerTests.swiftTests/CodexBarTests/OpenAIDashboardParserTests.swiftTests/CodexBarTests/StatusMenuTests.swiftValidation
./Scripts/compile_and_run.shpnpm checkNotes