Conversation
|
/review |
|
Orc review failed. |
|
/review |
|
/review |
3 similar comments
|
/review |
|
/review |
|
/review |
|
Orc review failed. |
|
/review |
|
Orc review failed. |
|
/review |
|
Orc review failed. |
|
/review |
There was a problem hiding this comment.
LGTM. This PR implements a comprehensive upgrade from single-diff to multi-diff support using @pierre/diffs 1.2.7, adds enhanced git error logging with diagnostic dialogs, and improves LSP diagnostics with line-level highlighting. The changes are well-structured, follow existing patterns, and include proper cleanup logic.
|
/review |
There was a problem hiding this comment.
This PR introduces significant refactoring to support multi-diff views using @pierre/diffs 1.2.7, adds git command error logging functionality, and updates LSP document handling. The changes are extensive but well-structured. One potential race condition bug was identified in the git error logging implementation.
| const GIT_WRITE_RETRY_DELAY_MS = 120; | ||
| const GIT_ERROR_LOG_DIR = path.join(os.tmpdir(), "open-warden-git-logs"); | ||
|
|
||
| let lastGitCommandErrorLog: { repoPath: string; path: string } | null = null; |
There was a problem hiding this comment.
Module-level state creates a race condition: if multiple git operations fail concurrently, they will overwrite each other's error log paths. When getLastGitCommandErrorLogPath is called for a specific repo, it may return the wrong log path if another operation failed more recently. Consider using a Map<string, {path: string}> keyed by repoPath instead of a single value.
| await fs.writeFile(logPath, content, "utf8"); | ||
| lastGitCommandErrorLog = { repoPath: input.repoPath, path: logPath }; | ||
| return logPath; | ||
| } catch { |
There was a problem hiding this comment.
Silently catching all errors here may hide disk I/O problems. If the temp directory is full or permissions are incorrect, users won't know why error logging failed. Consider logging the error to console for debugging purposes.
|
/review |
|
Orc review failed. |
|
/review |
|
Orc review failed. |
|
/review |
There was a problem hiding this comment.
LGTM with minor issues
Findings not posted inline
- apps/desktop/src/features/source-control/actions.ts:3440 (RIGHT) — line is not commentable in the GitHub diff
ThebuildRepoActionErrorfunction callserrorMessageFrom(error, ...)without try/catch. IferrorMessageFromthrows, the error dialog won't render. Consider wrapping in try/catch to ensure the dialog always displays with a fallback message.
| const GIT_TIMEOUT_MS = 30_000; | ||
| const GIT_WRITE_RETRY_COUNT = 3; | ||
| const GIT_WRITE_RETRY_DELAY_MS = 120; | ||
| const GIT_ERROR_LOG_DIR = path.join(os.tmpdir(), "open-warden-git-logs"); |
There was a problem hiding this comment.
The GIT_ERROR_LOG_DIR is created but there's no cleanup mechanism for old log files. This could lead to disk space issues over time as failed git commands accumulate logs.
| const GIT_WRITE_RETRY_DELAY_MS = 120; | ||
| const GIT_ERROR_LOG_DIR = path.join(os.tmpdir(), "open-warden-git-logs"); | ||
|
|
||
| let lastGitCommandErrorLog: { repoPath: string; path: string } | null = null; |
There was a problem hiding this comment.
Using a module-level variable lastGitCommandErrorLog stores only the most recent error. If git commands fail in multiple repositories in quick succession, the log path for the first repository will be overwritten by the second. This could cause incorrect log paths to be displayed in error dialogs for earlier errors.
|
/review |
There was a problem hiding this comment.
LGTM. The PR implements comprehensive upgrades to the diff viewing infrastructure including migration to @pierre/diffs 1.2.7, new multi-diff support with CodeView component, improved git command error logging, and enhanced LSP diagnostics handling. The changes are well-structured with proper error handling, cleanup effects, and performance considerations. No critical bugs identified.
|
/review |
|
/review |
| () => | ||
| parsedDiffs.map(({ target }) => { | ||
| const anchorAnnotations = buildPullRequestAnchorAnnotations({ | ||
| anchors: anchorsByFile[target.path] ?? [], |
There was a problem hiding this comment.
Including parsedDiffs.length in the dependency array is a bug. Whenever ANY background diff finishes parsing, parsedDiffs.length increases, triggering this effect and instantly hijacking the scroll position back to activeItemId or focusedLineNumber. If the user is reading the current diff while other files are still parsing, their scroll will be abruptly reset. It should be removed, similar to how it is handled in ChangesCodeViewDiffPane.tsx.
| function useBranchFileVersionResults({ | ||
| activeRepo, | ||
| baseRef, | ||
| headRef, |
There was a problem hiding this comment.
Including targets in the dependency array defeats the purpose of the targetKey optimization. When branchFiles changes, the targets array reference changes, which will cause this effect to needlessly tear down and recreate all RTK Query subscriptions. Consider omitting targets from the dependency array (and suppressing the linter warning) or using a useRef to store the latest targets, so that subscriptions only reset when targetKey changes.
|
|
||
| function useFileVersionResults(activeRepo: string, targets: ChangesDiffTarget[]) { | ||
| const queryResults = useAppSelector( | ||
| (state) => |
There was a problem hiding this comment.
Having targets in the dependency array causes severe performance churn. Because targets is re-created whenever snapshot changes (which can happen very frequently on any git state update), this useEffect will unsubscribe and resubscribe to all file version endpoints on every single update. This floods Redux with actions and could drop the cache if ref counts hit zero. Consider removing targets from the dependency array or using a useRef to store the latest targets inside the effect.
|
Orc review failed. |
|
/review |
1 similar comment
|
/review |
|
/review |
|
/review |
|
Orc review failed. |
|
/review |
|
/review |
There was a problem hiding this comment.
This PR migrates from a single-file diff viewer (DiffWorkspace + DiffViewer) to a multi-file CodeView-based architecture for both changes and pull request screens. It adds new components (ChangesCodeViewDiffPane, PullRequestCodeViewDiffPane, DiffScrollbarMarkers, RepoActionErrorDialog), introduces a reusable useMultiDiffCodeViewOptions hook, and adds Git error logging with an error dialog. Overall the changes are well-structured but contain a few issues: a regex in stripAnsi that can corrupt error messages, a documentsKey keyed on text.length that can miss text changes, and unnecessary CodeView item update cycles while placeholder diffs are loading.
General comments
- The
buildHunkActionAnnotationsfunction inChangesCodeViewDiffPane.tsxduplicates similar logic fromDiffViewer.tsx, but this appears to be intentional since the oldDiffVieweris not yet removed. - In both
ChangesCodeViewDiffPaneandPullRequestCodeViewDiffPane, theuseEffectthat updates CodeView items hastargetResultsin its dependency array. SinceuseFileVersionResults/useBranchFileVersionResultsreturns a new array reference on every render (fromtargets.map(...)), this effect re-runs on every component render. For items still showing placeholder diffs,createPlaceholderDiffreturns a new object each time, causingloadedItem?.fileDiff === fileDiffto always fail andviewer.updateItemto be called with an incremented version on every render until the real diff loads. Consider memoizingtargetResultsor skipping placeholder updates when nothing meaningful changed.
| .trim(); | ||
| } | ||
|
|
There was a problem hiding this comment.
The second regex /\[\d+(?:;\d+)*m/gu in stripAnsi will strip any text matching [digits;...m from error messages even without the ANSI escape prefix character (ESC = 0x1B). The first ANSI regex already handles all properly-escaped CSI sequences (including \x1b[31m etc.). This second regex matches literal [0m, [1;31m etc. in plain text. For example, a Git error message containing a path like [file:1m would have [1m stripped from it. Remove this redundant regex or prefix it with the escape character.
|
|
||
| useEffect(() => { | ||
| const nextDocument = repoPath && relPath && text !== null ? { repoPath, relPath } : null; | ||
| const currentDocument = activeDocumentRef.current; | ||
| const nextDocuments = new Map(documents.map((document) => [documentKey(document), document])); | ||
|
|
There was a problem hiding this comment.
The documentsKey uses document.text.length to detect text changes, but different texts can have identical lengths (e.g. "abc" → "xyz"). The effect dependency array is [dispatch, documents, documentsKey]. If documents is memoized upstream and retains the same reference while a text length stays the same but content differs, the effect won't re-run and desktop.syncLspDocument won't be called. Use the full text content (or at least a hash) instead of text.length in the key.
|
@Orc hi bud |
|
Hey! 👋 I can see you're working on PR #25 in the What can I help you with today? I can:
Let me know what you'd like to do! |
|
@Orc can you check comments and fix what is relevant |
The patch file was for version 1.2.4 but the dependency has been upgraded to 1.2.7. The patch may no longer be needed or may need to be updated for the new version. Removing it to avoid potential conflicts.
|
Excellent! The workspace is now clean. Let me create a summary of what I found and fixed: SummaryI've analyzed the pull request #25 "Pierre diffs update" and identified and fixed a relevant issue: Issues Found:
What I Fixed:
About the Orc Review Failures:The comments show multiple Orc review bot failures with:
These failures are likely infrastructure-related rather than code issues. The code changes in the PR appear to be well-structured and include:
The fix I made should help ensure clean dependency management and prevent potential patch conflicts during installation. |
|
Remove me from this list.
… On Jun 26, 2026, at 12:30 AM, Shpetim ***@***.***> wrote:
Closed #25 <#25>.
—
Reply to this email directly, view it on GitHub <#25?email_source=notifications&email_token=AAAE5AQTCJGFUAXW7IK3XML5BYRC3A5CNFSNUABQM5UWIORPF5TWS5BNNB2WEL2JONZXKZKFOZSW45CON52GSZTJMNQXI2LPNYXTENZSGM2TMMBYHE3DRJTSMVQXG33OU5WWK3TUNFXW5JLFOZSW45FMMZXW65DFOJPWG3DJMNVQ#event-27235608968>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAAE5AXH3IFDQP76FQHJGX35BYRC3AVCNFSNUABGKJSXA33TNF2G64TZHMYTCNJRGQZTMOBSGI5US43TOVSTWNBXGA3DCNJWGE4DLILWAI>.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS <https://github.com/notifications/mobile/ios/AAAE5ASGUZ7SX7JMQG4M2C35BYRC3A5CNFSNUABQM5UWIORPF5TWS5BNNB2WEL2JONZXKZKFOZSW45CON52GSZTJMNQXI2LPNYXTENZSGM2TMMBYHE3DRJTSMVQXG33OU5WWK3TUNFXW5JLFOZSW45FKMZXW65DFOJPWS33T> and Android <https://github.com/notifications/mobile/android/AAAE5ASZAJHOKTEKVHZGEHL5BYRC3A5CNFSNUABQM5UWIORPF5TWS5BNNB2WEL2JONZXKZKFOZSW45CON52GSZTJMNQXI2LPNYXTENZSGM2TMMBYHE3DRJTSMVQXG33OU5WWK3TUNFXW5JLFOZSW45FOMZXW65DFOJPWC3TEOJXWSZA>. Download it today!
You are receiving this because you were mentioned.
|
No description provided.