Skip to content

Comments

Add Codex code review logs panel and parser support#404

Open
michaeltookes wants to merge 2 commits intosteipete:mainfrom
michaeltookes:pr-to-peter-code-review-logs
Open

Add Codex code review logs panel and parser support#404
michaeltookes wants to merge 2 commits intosteipete:mainfrom
michaeltookes:pr-to-peter-code-review-logs

Conversation

@michaeltookes
Copy link

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

  • Added a new Code Review Logs panel window:
    • Sources/CodexBar/CodeReviewLogsPanelWindowController.swift
  • Added menu action + refresh flow for opening and updating logs:
    • Sources/CodexBar/StatusItemController+Actions.swift
    • Sources/CodexBar/StatusItemController.swift
  • Added menu gating so "Open Code Review Logs..." appears only when logs exist:
    • Sources/CodexBar/StatusItemController+Menu.swift
  • Extended OpenAI dashboard models/fetching/scraping to parse code review log entries:
    • Sources/CodexBarCore/OpenAIDashboardModels.swift
    • Sources/CodexBarCore/OpenAIWeb/OpenAIDashboardFetcher.swift
    • Sources/CodexBarCore/OpenAIWeb/OpenAIDashboardScrapeScript.swift
  • Added/updated tests for parser, menu behavior, and URL sanitization:
    • Tests/CodexBarTests/CodeReviewLogsPanelWindowControllerTests.swift
    • Tests/CodexBarTests/OpenAIDashboardParserTests.swift
    • Tests/CodexBarTests/StatusMenuTests.swift
  • This is a new separate panel (not in the hover popout).

Validation

  • ./Scripts/compile_and_run.sh
  • pnpm check

Notes

  • This branch intentionally excludes fork-specific Claude GitHub Action workflow changes to keep this PR focused on the Code Review Logs feature.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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: [],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant