You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a fact that whenever we use the remix feature ref: https://github.com/react-native-vibe-code/react-native-vibe-code-sdk/tree/main/packages/remix The flow for remixing works on the new user and it gets the code base with the last history as it should, but whenever a new change is done by prompting to the chat, the change happens. But the git commit does not. So in the back, we are on the sandbox and the changes to code are being made, but the commit for the last changes of that prompt in the remix code base are not being applied. fix.
When GitHub clone fails and the fallback path copies files via tarball, the tarball includes the source project's .git directory. The git remote add origin ... || true then silently fails (origin already exists pointing to the source repo). All subsequent commitAndPush calls push to the wrong repository.
Fix: Remove .git and run a clean git init in the extract script before setting up the new remote.
Bug 2 — commitAndPush never verifies the remote URL (github-service.ts)
The commitAndPush method receives repositoryName as a parameter but never used it — it trusted whatever remote was already in the sandbox. For a remixed sandbox with an incorrect or stale remote, all pushes silently failed (the caller uses fire-and-forget so errors were never surfaced).
Fix: Add git remote set-url || git remote add with the correct authenticated URL (owner + token + repositoryName) before every commit. Also switched from git push origin main to git push origin HEAD:main to handle cases where the local branch is named master (older git defaults).
Activity
bidah commentedon Feb 23, 2026
@claude implement fix to this
claude commentedon Feb 23, 2026
Claude finished @bidah's task in 7m 50s —— View job •
claude/issue-7-20260223-1021• Create PR ➔Implementing fix for git history lost on remixed projects
Root Cause Analysis
Two bugs caused git commits to silently fail after remixing a project:
Bug 1 — Wrong git remote after sandbox-copy fallback (
remix-handler.tsOption 2)When GitHub clone fails and the fallback path copies files via tarball, the tarball includes the source project's
.gitdirectory. Thegit remote add origin ... || truethen silently fails (origin already exists pointing to the source repo). All subsequentcommitAndPushcalls push to the wrong repository.Fix: Remove
.gitand run a cleangit initin the extract script before setting up the new remote.Bug 2 —
commitAndPushnever verifies the remote URL (github-service.ts)The
commitAndPushmethod receivesrepositoryNameas a parameter but never used it — it trusted whatever remote was already in the sandbox. For a remixed sandbox with an incorrect or stale remote, all pushes silently failed (the caller uses fire-and-forget so errors were never surfaced).Fix: Add
git remote set-url || git remote addwith the correct authenticated URL (owner + token + repositoryName) before every commit. Also switched fromgit push origin maintogit push origin HEAD:mainto handle cases where the local branch is namedmaster(older git defaults).Changes Made
packages/remix/src/api/remix-handler.tsrm -rf .git && git initinstead ofgit init || truepackages/sandbox/src/lib/github-service.tscommitAndPush: set correct remote URL before push; useHEAD:mainrefspec|
fix: ensure correct git remote in remixed projects to restore commit …