Repository navigation
fix: replace isomorphic-git status with direct git diff for worktree support - #1706
Merged
adamdotdevin merged 2 commits intoAug 28, 2025
Merged
Conversation
…support Replace complex isomorphic-git status detection with direct git diff command to properly handle git worktrees. fix
ndraiman
force-pushed
the
ndraiman/read-file-git-worktree
branch
from
August 8, 2025 16:07
64f40b8 to
a8f8bf2
Compare
Rwanbt
pushed a commit
to Rwanbt/unifia
that referenced
this pull request
May 5, 2026
…support (anomalyco#1706) Co-authored-by: Adam <[email protected]>
bussard76
pushed a commit
to bussard76/openwork
that referenced
this pull request
May 12, 2026
…co#1706) After PR anomalyco#1702 introduced `localServerRef` to give `endpointForWorkspace` a stable identity, `refreshRouteState` synchronously fired `activateWorkspace` and `loadWorkspaceSessionsInBackground` immediately after `setBaseUrl`/`setToken`. The `useEffect` that mirrors `[baseUrl, token]` into the ref runs after the next React commit, so both calls saw an empty ref and `resolveWorkspaceEndpoint` returned null for local workspaces: - listSessions never fired -> sidebar stuck on per-workspace loading forever (`retryingWorkspaceIds` never cleared). - activateWorkspace never fired (but the workspace was still recorded as activated, so no retry) -> OpenCode runtime never bound to the workspace -> sending a message stayed on "Thinking" indefinitely. Update `localServerRef.current` synchronously inside refreshRouteState both on the disconnected path and on the connected path, before any synchronous `endpointForWorkspace` use. Verified end-to-end via Chrome MCP: sidebar loads sessions on first paint and a fresh message gets a streamed reply. Co-authored-by: src-opn <[email protected]>
AIALRA-0
pushed a commit
to AIALRA-0/opencode-turn-engine
that referenced
this pull request
Jun 10, 2026
…support (anomalyco#1706) Co-authored-by: Adam <[email protected]>
meSingh
pushed a commit
to meSingh/opencode
that referenced
this pull request
Sep 6, 2026
…support (anomalyco#1706) Co-authored-by: Adam <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace complex isomorphic-git status detection with direct git diff command to properly handle git worktrees.
At first, I tried detecting the git root dir using
git rev-parse --git-dirand passing it as thegitDirarg toisomorphic-gitBut
git.status()returned incorrect status.I saw that
packages/opencode/src/file/index.tsalready uses directgitcommands in thestatusfunction,so I updated the read function to do the same.
the
git diffcommand works correctly in worktreesBefore:
After:
Closes #891